37 #ifndef AIMS_MATH_ROMBERGITG_H
38 #define AIMS_MATH_ROMBERGITG_H
71 REAL a, REAL b )
const
74 std::vector< REAL > s( _jmax ), h( _jmax + 1 );
80 for(
int j = 0; j < _jmax; j++ )
83 s[ j ] = integrator.
stage( func, a, b, j + 1 );
86 std::vector< REAL > tmph( _k ), tmps( _k );
87 for(
int kk = 0; kk < _k; kk++ )
89 tmph[ kk ] = h[ j - _k + kk + 1 ];
90 tmps[ kk ] = s[ j - _k + kk + 1 ];
93 if( fabs( dss ) <= _eps * fabs( ss ) )
96 h[ j + 1 ] = 0.25 * h[ j ];
virtual ~RombergIntegratorOf()
virtual REAL eval(const Integrable &func, REAL a, REAL b) const
RombergIntegratorOf(const REAL &eps, int jmax, int k)
virtual REAL stage(const Integrable &func, REAL a, REAL b, int n) const
The class for EcatSino data write operation.
AIMSDATA_API REAL AimsLagrangeInterpolation(const std::vector< REAL > &xa, const std::vector< REAL > &ya, REAL x, REAL *dy)
Returns the interpolation of a function defined at (xa,ya) points at x (dy is the error)
RombergIntegratorOf< float > RombergIntegrator