Constructor.
Constructor Set Vavilov parameters kappa and beta2 and define whether to calculate density fcn or distribution fcn
50 const double xp[9] = { 9.29,2.47,.89,.36,.15,.07,.03,.02,0.0 };
51 const double xq[7] = { .012,.03,.08,.26,.87,3.83,11.0 };
53 double q, u,
x,
c1, c2, c3, c4, d1, h4, h5, h6,
q2, x1, d, ll, ul, xf1, xf2, rv;
58 if(kappa < 0.01) kappa = 0.01;
59 if(kappa > 10.) kappa = 10.;
60 if(beta2 < 0.) beta2 = 0.;
61 if(beta2 > 1.) beta2 = 1.;
63 h_[4] = 1. - beta2*0.42278433999999998 + 7.6/kappa;
66 h4 = -7.6/kappa - (beta2 * .57721566 + 1);
73 for (lp = 0; lp < 9; ++lp) {
74 if (kappa >= xp[lp])
break;
77 for (lq = 0; lq < 7; ++lq) {
78 if (kappa <= xq[lq])
break;
87 h_[0] = kappa * (beta2 * .57721566 + 2.) + 9.9166128600000008;
88 if (kappa >= .07) {h_[0] += 6.90775527;}
89 h_[1] = beta2 * kappa;
91 h_[3] = omega_ * 1.5707963250000001;
92 auto f1 = [h_](
double x){
return h_[0]+h_[1]*
std::log(h_[2]*x)-h_[3]*
x;};
95 d =
exp(kappa * (beta2 * (.57721566 - h5) + 1.)) * .31830988654751274;
98 a_[n - 1] = omega_ * .31830988654751274;
102 for (k = 1; k <
n; ++
k) {
110 xf1 = kappa * (beta2 * c1 - c4) - x * c2;
111 xf2 = x * c1 + kappa * (c3 + beta2 * c2) +
t0_ * x;
113 d1 = q * d * omega_ *
exp(xf1);
114 a_[l - 1] = d1 *
cos(xf2);
115 b_[l - 1] = -d1 *
sin(xf2);
117 d1 = q * d *
exp(xf1)/
k;
118 a_[l - 1] = d1 *
sin(xf2);
119 b_[l - 1] = d1 *
cos(xf2);
120 a_[n - 1] += q2 *
a_[l - 1];
Sin< T >::type sin(const T &t)
int dzero(double a, double b, double &x0, double &rv, double eps, int mxf, F func)
Private version of the exponential integral.
Cos< T >::type cos(const T &t)
void sincosint(double x, double &sint, double &cint)
const int mode_
returns the limits on the non-zero (mode=0) or normalized region (mode=1)
double expint(double x)
Private version of the sine integral.