31 #include <o2scl/err_hnd.h> 32 #include <o2scl/funct.h> 34 #ifndef DOXYGEN_NO_O2NS 51 template<
class func_t=funct,
class fp_t=
double>
class inte {
92 virtual fp_t
integ(func_t &func, fp_t a, fp_t b) {
96 O2SCL_ERR2(
"Integration failed in inte::integ(), ",
105 virtual int integ_err(func_t &func, fp_t a, fp_t b,
106 fp_t &res, fp_t &err)=0;
117 virtual const char *
type() {
return "inte"; }
119 #ifndef DOXYGEN_INTERNAL 130 #ifndef DOXYGEN_NO_O2NS fp_t tol_abs
The maximum absolute uncertainty in the value of the integral (default )
The main O<span style='position: relative; top: 0.3em; font-size: 0.8em'>2</span>scl O$_2$scl names...
virtual fp_t integ(func_t &func, fp_t a, fp_t b)
Integrate function func from a to b.
fp_t tol_rel
The maximum relative uncertainty in the value of the integral (default )
virtual int integ_err(func_t &func, fp_t a, fp_t b, fp_t &res, fp_t &err)=0
Integrate function func from a to b and place the result in res and the error in err.
virtual const char * type()
Return string denoting type ("inte")
bool err_nonconv
If true, call the error handler if the routine does not converge or reach the desired tolerance (defa...
fp_t 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.
Base integration class [abstract base].
#define O2SCL_ERR2(d, d2, n)
Set an error, two-string version.
fp_t interror
The uncertainty for the last integration computation.