#include <NumericalIntegration.h>
|
double | a0 |
|
double | b0 |
|
unsigned int | i |
|
double | result |
|
unsigned int | samples_ |
|
std::vector< double > | w |
|
std::vector< double > | x |
|
Definition at line 41 of file NumericalIntegration.h.
funct::GaussLegendreIntegrator::GaussLegendreIntegrator |
( |
| ) |
|
|
inline |
funct::GaussLegendreIntegrator::GaussLegendreIntegrator |
( |
unsigned int |
samples, |
|
|
double |
epsilon |
|
) |
| |
Definition at line 5 of file NumericalIntegration.cc.
References edm::errors::Configuration, funct::cos(), edm::hlt::Exception, i, j, funct::m, p1, p2, p3, createTree::pp, w, x, and detailsBasic3DVector::z.
9 <<
"gauss_legendre_integral: number of samples must be positive\n";
12 <<
"gauss_legendre_integral: numerical precision must be positive\n";
16 const unsigned int m = (samples + 1)/2;
20 for (
unsigned int i = 0;
i <
m; ++
i) {
21 z =
std::cos(3.14159265358979323846 * (
i + 0.75)/(samples + 0.5));
26 for (
unsigned int j = 0;
j < samples; ++
j) {
29 p1 = ((2.0*
j + 1.0)*z*p2 -
j*
p3)/(
j + 1.0);
31 pp = samples*(z*p1 -
p2)/(zSqr - 1.0);
33 }
while (std::fabs(p1/pp) >
epsilon);
36 x[samples -
i - 1] =
z;
37 w[
i] = 2.0/((1.0 - zSqr)*pp*pp);
38 w[samples -
i -1] =
w[
i];
Cos< T >::type cos(const T &t)
template<typename F >
double funct::GaussLegendreIntegrator::operator() |
( |
const F & |
f, |
|
|
double |
min, |
|
|
double |
max |
|
) |
| const |
|
inline |
double funct::GaussLegendreIntegrator::a0 |
|
mutableprivate |
double funct::GaussLegendreIntegrator::b0 |
|
mutableprivate |
unsigned int funct::GaussLegendreIntegrator::i |
|
mutableprivate |
double funct::GaussLegendreIntegrator::result |
|
mutableprivate |
unsigned int funct::GaussLegendreIntegrator::samples_ |
|
private |
std::vector<double> funct::GaussLegendreIntegrator::w |
|
private |
std::vector<double> funct::GaussLegendreIntegrator::x |
|
private |