37 #ifndef AIMS_MATH_TRAPEZEITG_H 38 #define AIMS_MATH_TRAPEZEITG_H 57 REAL a, REAL b,
int n )
const;
66 template <
class REAL>
inline 68 REAL a, REAL b,
int n )
const 70 REAL x, tnm,
sum, del;
82 for ( it = 1, j = 1; j < n - 1; j++ )
85 del = ( b - a ) / tnm;
87 for ( sum = 0.0, j = 1; j <= it; j++, x += del )
89 s = 0.5 * ( s + ( b - a ) * sum / tnm );
94 template <
class REAL>
inline 96 REAL a, REAL b )
const 102 for (
int j = 1; j <= _nStep + 1; j++ ) {
103 s =
stage( func, a, b, j );
105 if ( fabs( s - olds ) < EPS * fabs( olds ) ||
106 ( s == 0.0 && olds == 0.0 ) )
virtual REAL valueAt(REAL) const =0
TrapezeIntegratorOf< float > TrapezeIntegrator
DataTypeTraits< T >::LongType sum(const Volume< T > &vol)
The class for EcatSino data write operation.
virtual ~TrapezeIntegratorOf()
virtual REAL eval(const Integrable &func, REAL a, REAL b) const
TrapezeIntegratorOf(int nStep=10)
virtual REAL stage(const Integrable &func, REAL a, REAL b, int n) const