Constructor.
Constructor Set Vavilov parameters kappa and beta2 and define whether to calculate density fcn or distribution fcn
54 const double xp[9] = { 9.29,2.47,.89,.36,.15,.07,.03,.02,0.0 };
55 const double xq[7] = { .012,.03,.08,.26,.87,3.83,11.0 };
57 double q, u,
x,
c1, c2, c3, c4, d1, h4, h5, h6,
q2, x1, d, ll, ul, xf1, xf2, rv;
62 if(kappa < 0.01) kappa = 0.01;
63 if(kappa > 10.) kappa = 10.;
64 if(beta2 < 0.) beta2 = 0.;
65 if(beta2 > 1.) beta2 = 1.;
67 h_[4] = 1. - beta2*0.42278433999999998 + 7.6/kappa;
70 h4 = -7.6/kappa - (beta2 * .57721566 + 1);
77 for (lp = 0; lp < 9; ++lp) {
78 if (kappa >= xp[lp])
break;
81 for (lq = 0; lq < 7; ++lq) {
82 if (kappa <= xq[lq])
break;
91 h_[0] = kappa * (beta2 * .57721566 + 2.) + 9.9166128600000008;
92 if (kappa >= .07) {h_[0] += 6.90775527;}
93 h_[1] = beta2 * kappa;
95 h_[3] = omega_ * 1.5707963250000001;
99 d =
exp(kappa * (beta2 * (.57721566 - h5) + 1.)) * .31830988654751274;
102 a_[n - 1] = omega_ * .31830988654751274;
106 for (k = 1; k <
n; ++
k) {
114 xf1 = kappa * (beta2 * c1 - c4) - x * c2;
115 xf2 = x * c1 + kappa * (c3 + beta2 * c2) +
t0_ * x;
117 d1 = q * d * omega_ *
exp(xf1);
118 a_[l - 1] = d1 *
cos(xf2);
119 b_[l - 1] = -d1 *
sin(xf2);
121 d1 = q * d *
exp(xf1)/
k;
122 a_[l - 1] = d1 *
sin(xf2);
123 b_[l - 1] = d1 *
cos(xf2);
124 a_[n - 1] += q2 *
a_[l - 1];
double expint(double x)
Private version of the sine integral.
void sincosint(double x, double &sint, double &cint)
Sin< T >::type sin(const T &t)
const int mode_
returns the limits on the non-zero (mode=0) or normalized region (mode=1)
int dzero(double a, double b, double &x0, double &rv, double eps, int mxf, F func)
Cos< T >::type cos(const T &t)
double f1(double x, double const *h_)
Private version of the exponential integral.
double f2(double x, double const *h_)