18 #ifndef ADAPTIVESIMPSON_H
19 #define ADAPTIVESIMPSON_H
23 #define MAX_RECURSION 1e+7
36 static double Simpson (
const double& h,
const double &fa,
const double &fc,
const double &fb );
40 const double& h,
const double &a,
const double &c,
const double &b,
41 const double &fa,
const double &fc,
const double &fb,
42 const double &sx,
const double &tol,
long &recursion );
48 const double& a,
const double& b,
Static class implementing integration using Simpson's rule.
static double SimpsonAd(FunctorBase< double > &func, const double &h, const double &a, const double &c, const double &b, const double &fa, const double &fc, const double &fb, const double &sx, const double &tol, long &recursion)
the recursive method
static double AdaptSimpson(FunctorBase< double > &func, const double &a, const double &b, const double &tol)
main method that starts the evaluation and calls the recursion
static double Simpson(const double &h, const double &fa, const double &fc, const double &fb)
Evaluates the Simpson's rule.
Abstract templated explicit functor class.