33 double*
x,
unsigned int& np,
double* )
35 static const double y[10] = {.9931285991, .9639719272, .9122344282, .8391169718, .7463319064, .6360536807, .5108670019, .3737060887, .2277858511, .0765265211 };
37 double dint = (b -
a) /
double(n);
38 double delt = dint * 0.5;
39 double orig = a - delt;
43 for(
unsigned int i = 1; i <=
n; i++)
49 for(
unsigned int j = 1; j <= 10; j++)
53 x[j1-1] = orig - delt * y[j-1];
54 x[j2-1] = dorig - x[j1-1];
64 const double W[10] = {.0176140071,.0406014298,.0626720483,.0832767415,.1019301198,.1181945319,.1316886384,.1420961093,.1491729864,.1527533871};
68 for(
unsigned int i = 1; i <=
N; ++i)
72 for(
unsigned int j = 1; j <= 10; ++j)
76 CR += W[j-1] * (CF[J1-1]+CF[J2-1]);
80 cdouble CRES = CR*0.5*(B-
A)/Double_t(N);
87 const unsigned int nsamp, std::vector<cdouble>& cres)
92 static const double w[10] = {.0176140071,.0406014298,.0626720483,.0832767415,.1019301198,.1181945319,.1316886384,.1420961093,.1491729864,.1527533871};
94 std::vector<cdouble>
cr(4,
cdouble(0.0,0.0));
101 for(
unsigned int i = 0; i !=
n; ++i)
105 for(
unsigned int j = 0; j != 10; ++j)
110 for(
unsigned int ll = l; ll <=
m; ++ll)
112 cr[ll] += w[j] * ( cf[ll][j1] + cf[ll][j2] );
117 for(
unsigned int i = 0; i != 4; ++i)
119 cres[i] = cr[i] * 0.5 * (b-
a) / static_cast<double>(n);
128 double*
x,
unsigned int& np,
double* )
130 static const double y[24] = {0.9987710072, 0.9935301722, 0.9841245873, 0.9705915925, 0.9529877031,
131 0.9313866907, 0.9058791367, 0.8765720202, 0.8435882616, 0.8070662040, 0.7671590325, 0.7240341309,
132 0.6778723796, 0.6288673967, 0.5772247260, 0.5231609747, 0.4669029047, 0.4086864819, 0.3487558862,
133 0.2873624873, 0.2247637903, 0.1612223560, 0.0970046992, 0.0323801709};
135 double dint = (b -
a) /
double(n);
136 double delt = dint * 0.5;
137 double orig = a - delt;
141 for(
unsigned int i = 1; i <=
n; i++)
147 for(
unsigned int j = 1; j <= 24; j++)
151 x[j1-1] = orig - delt * y[j-1];
152 x[j2-1] = dorig - x[j1-1];
161 static const double W[24] = {0.0031533460, 0.0073275539, 0.0114772345, 0.0155793157, 0.0196161604,
162 0.0235707608, 0.0274265097, 0.0311672278, 0.0347772225, 0.0382413510, 0.0415450829, 0.0446745608,
163 0.0476166584, 0.0503590355, 0.0528901894, 0.0551995036, 0.0572772921, 0.0591148396, 0.0607044391,
164 0.0620394231, 0.0631141922, 0.0639242385, 0.0644661644, 0.0647376968 };
165 cdouble CR(0.0, 0.0);
168 for(
unsigned int i = 1; i <=
N; ++i)
172 for(
unsigned int j = 1; j <= 24; ++j)
176 CR += W[j-1] * (CF[J1-1]+CF[J2-1]);
180 cdouble CRES = CR*0.5*(B-
A)/Double_t(N);
186 unsigned int m,
std::vector< std::vector<cdouble> >& cf,
187 const unsigned int nsamp, std::vector<cdouble>& cres)
192 static const double w[24] = {0.0031533460, 0.0073275539, 0.0114772345, 0.0155793157, 0.0196161604,
193 0.0235707608, 0.0274265097, 0.0311672278, 0.0347772225, 0.0382413510, 0.0415450829, 0.0446745608,
194 0.0476166584, 0.0503590355, 0.0528901894, 0.0551995036, 0.0572772921, 0.0591148396, 0.0607044391,
195 0.0620394231, 0.0631141922, 0.0639242385, 0.0644661644, 0.0647376968 };
197 std::vector<cdouble>
cr(4,
cdouble(0.0,0.0));
204 for(
unsigned int i = 0; i !=
n; ++i)
208 for(
unsigned int j = 0; j != 24; ++j)
213 for(
unsigned int ll = l; ll <=
m; ++ll)
215 cr[ll] += w[j] * ( cf[ll][j1] + cf[ll][j2] );
220 for(
unsigned int i = 0; i != 4; ++i)
222 cres[i] = cr[i] * 0.5 * (b-
a) / static_cast<double>(n);
229 double*
x,
unsigned int& np,
double*
w)
234 else if (nsamp==48) {
238 std::cerr<<
"IntegrationTools/SGNR >> Unsupported nuclear sampling: "<<nsamp<<
std::endl;
248 else if (nsamp==48) {
252 std::cerr<<
"IntegrationTools/RGN1D >> Unsupported nuclear sampling: "<<nsamp<<
std::endl;
258 unsigned int m,
std::vector< std::vector<cdouble> >& cf,
259 const unsigned int nsamp, std::vector<cdouble>& cres)
264 else if (nsamp==48) {
268 std::cerr<<
"IntegrationTools/RGN2D >> Unsupported nuclear sampling: "<<nsamp<<
std::endl;
std::complex< double > cdouble
THE MAIN GENIE PROJECT NAMESPACE
QTextStream & endl(QTextStream &s)