31 #include <o2scl/err_hnd.h> 32 #include <o2scl/funct.h> 34 #ifndef DOXYGEN_NO_O2NS 44 template<
class func_t=funct>
class inte {
85 virtual double integ(func_t &func,
double a,
double b) {
89 O2SCL_ERR2(
"Integration failed in inte::integ(), ",
98 virtual int integ_err(func_t &func,
double a,
double b,
99 double &res,
double &err)=0;
110 virtual const char *
type() {
return "inte"; }
112 #ifndef DOXYGEN_INTERNAL 123 #ifndef DOXYGEN_NO_O2NS The main O<span style='position: relative; top: 0.3em; font-size: 0.8em'>2</span>scl O$_2$scl names...
virtual int integ_err(func_t &func, double a, double b, double &res, double &err)=0
Integrate function func from a to b and place the result in res and the error in err.
double get_error()
Return the numerically estimated error in the result from the last call to integ() ...
size_t last_iter
The most recent number of iterations taken.
bool err_nonconv
If true, call the error handler if the routine does not converge or reach the desired tolerance (defa...
virtual double integ(func_t &func, double a, double b)
Integrate function func from a to b.
double tol_abs
The maximum absolute uncertainty in the value of the integral (default )
Base integration class [abstract base].
#define O2SCL_ERR2(d, d2, n)
Set an error, two-string version.
double interror
The uncertainty for the last integration computation.
double tol_rel
The maximum relative uncertainty in the value of the integral (default )
virtual const char * type()
Return string denoting type ("inte")