#include <EvtItgSimpsonIntegrator.hh>
|
virtual double | evaluateIt (double, double) const |
|
virtual double | evaluateIt (double, double) const |
|
double | trapezoid (double lower, double higher, int n, double &result) const |
|
virtual double | evaluateIt (double lower, double higher) const =0 |
|
double | myFunction (double x) const |
|
double | trapezoid (double lower, double higher, int n, double &result) const |
|
virtual double | evaluateIt (double lower, double higher) const =0 |
|
double | myFunction (double x) const |
|
◆ EvtItgSimpsonIntegrator() [1/2]
EvtItgSimpsonIntegrator::EvtItgSimpsonIntegrator |
( |
const EvtItgAbsFunction & |
theFunction, |
|
|
double |
precision = 1.0e-5 , |
|
|
int |
maxLoop = 20 |
|
) |
| |
◆ ~EvtItgSimpsonIntegrator() [1/2]
EvtItgSimpsonIntegrator::~EvtItgSimpsonIntegrator |
( |
| ) |
|
|
virtual |
◆ EvtItgSimpsonIntegrator() [2/2]
EvtItgSimpsonIntegrator::EvtItgSimpsonIntegrator |
( |
const EvtItgAbsFunction & |
, |
|
|
double |
precision = 1.0e-5 , |
|
|
int |
maxLoop = 20 |
|
) |
| |
◆ ~EvtItgSimpsonIntegrator() [2/2]
virtual EvtItgSimpsonIntegrator::~EvtItgSimpsonIntegrator |
( |
| ) |
|
|
virtual |
◆ evaluateIt() [1/2]
double EvtItgSimpsonIntegrator::evaluateIt |
( |
double |
lower, |
|
|
double |
higher |
|
) |
| const |
|
protectedvirtual |
Implements EvtItgAbsIntegrator.
Definition at line 64 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenModels/EvtItgSimpsonIntegrator.cc.
64 {
65
66
67 int j;
68 double result(0.0);
69 double s, st, ost(0.0);
70 for (j=1;j<4;j++) {
72 s = (4.0 * st - ost)/3.0;
73 ost=st;
74 }
75
78 s = (4.0 * st - ost)/3.0;
79
80 if (fabs(
s - olds) < _precision*fabs(olds) || (
s==0.0 && olds==0.0))
return s;
81
82 ost=st;
83
84 for (j=5;j<_maxLoop;j++){
85
87 s = (4.0 * st - ost)/3.0;
88
89 if (fabs(
s - olds) < _precision*fabs(olds) || (
s==0.0 && olds==0.0))
return s;
91 ost=st;
92 }
93
94 report(
ERROR,
"EvtGen") <<
"Severe error in EvtItgSimpsonIntegrator. Failed to converge after loop with 2**"
95 << _maxLoop << " calls to the integrand in." << endl;
96
97 return 0.0;
98
99}
ostream & report(Severity severity, const char *facility)
double trapezoid(double lower, double higher, int n, double &result) const
◆ evaluateIt() [2/2]
virtual double EvtItgSimpsonIntegrator::evaluateIt |
( |
double |
, |
|
|
double |
|
|
) |
| const |
|
protectedvirtual |
The documentation for this class was generated from the following files: