37 #define declareV(arg) const VectorType &arg
38 #define declareT(arg) typename getScalarType<VectorType>::scalar arg
39 #define declareI(arg) int arg
42 #define elementV(arg,i) (typename getScalarType<VectorType>::scalar) arg[arg.indexmin()+i]
43 #define elementT(arg,i) arg
44 #define elementI(arg,i) arg
45 #define elementN(arg,i)
52 #define outputsizeV(n,arg) n = ((arg.indexmax()-arg.indexmin()+1)>n ? (arg.indexmax()-arg.indexmin()+1) : n)
53 #define outputsizeT(n,arg)
54 #define outputsizeI(n,arg)
55 #define outputsizeN(n,arg)
63 #define GVECTORIZE(FUN,Type1,Type2,Type3,Type4,Type5,Type6) \
64 template<class VectorType> \
65 VectorType FUN( declare##Type1(arg1) comma##Type2 \
66 declare##Type2(arg2) comma##Type3 \
67 declare##Type3(arg3) comma##Type4 \
68 declare##Type4(arg4) comma##Type5 \
69 declare##Type5(arg5) comma##Type6 \
70 declare##Type6(arg6) ) \
73 outputsize##Type1(n,arg1); \
74 outputsize##Type2(n,arg2); \
75 outputsize##Type3(n,arg3); \
76 outputsize##Type4(n,arg4); \
77 outputsize##Type5(n,arg5); \
78 outputsize##Type6(n,arg6); \
79 VectorType res(1,n); \
80 for(int i=0;i<n;i++) res[i+1] = FUN( element##Type1(arg1,i) comma##Type2 \
81 element##Type2(arg2,i) comma##Type3 \
82 element##Type3(arg3,i) comma##Type4 \
83 element##Type4(arg4,i) comma##Type5 \
84 element##Type5(arg5,i) comma##Type6 \
85 element##Type6(arg6,i) ); \
90 #define VECTORIZE1_t(FUN) \
91 GVECTORIZE(FUN,V,N,N,N,N,N)
98 #define VECTORIZE2_tt(FUN) \
99 GVECTORIZE(FUN,V,T,N,N,N,N) \
100 GVECTORIZE(FUN,T,V,N,N,N,N) \
101 GVECTORIZE(FUN,V,V,N,N,N,N)
108 #define VECTORIZE3_tti(FUN) \
109 GVECTORIZE(FUN,V,T,I,N,N,N) \
110 GVECTORIZE(FUN,T,V,I,N,N,N) \
111 GVECTORIZE(FUN,V,V,I,N,N,N)
118 #define VECTORIZE3_ttt(FUN) \
119 GVECTORIZE(FUN,V,T,T,N,N,N) \
120 GVECTORIZE(FUN,T,V,T,N,N,N) \
121 GVECTORIZE(FUN,T,T,V,N,N,N) \
122 GVECTORIZE(FUN,V,V,T,N,N,N) \
123 GVECTORIZE(FUN,T,V,V,N,N,N) \
124 GVECTORIZE(FUN,V,T,V,N,N,N) \
125 GVECTORIZE(FUN,V,V,V,N,N,N)
132 #define VECTORIZE4_ttti(FUN) \
133 GVECTORIZE(FUN,V,T,T,I,N,N) \
134 GVECTORIZE(FUN,T,V,T,I,N,N) \
135 GVECTORIZE(FUN,T,T,V,I,N,N) \
136 GVECTORIZE(FUN,V,V,T,I,N,N) \
137 GVECTORIZE(FUN,T,V,V,I,N,N) \
138 GVECTORIZE(FUN,V,T,V,I,N,N) \
139 GVECTORIZE(FUN,V,V,V,I,N,N)
146 #define VECTORIZE6_ttttti(FUN) \
147 GVECTORIZE(FUN,V,T,T,T,T,I) \
148 GVECTORIZE(FUN,T,V,T,T,T,I) \
149 GVECTORIZE(FUN,T,T,V,T,T,I) \
150 GVECTORIZE(FUN,V,V,T,T,T,I) \
151 GVECTORIZE(FUN,T,V,V,T,T,I) \
152 GVECTORIZE(FUN,V,T,V,T,T,I) \
153 GVECTORIZE(FUN,V,V,V,T,T,I)
double pbeta(const double x, const double a, const double b, int maxit)
beta distribution function for constant objects (alias of ibeta function with same arguments order as...
Vector of double precision numbers.
double qbeta(double x, double a, double b, double eps)
Description not yet available.
Description not yet available.
Description not yet available.
#define VECTORIZE3_ttt(FUN)
Vectorize 3-argument functions.
Fundamental data type for reverse mode automatic differentiation.