23 #ifndef O2SCL_GEN_INTE_H 24 #define O2SCL_GEN_INTE_H 30 #ifndef DOXYGEN_NO_O2NS 63 template<
class func_t,
class lfunc_t,
class ufunc_t,
92 virtual double ginteg(func_t &func,
size_t ndim, lfunc_t &a, ufunc_t &b)=0;
98 virtual int ginteg_err(func_t &func,
size_t ndim, lfunc_t &a,
99 ufunc_t &b,
double &res,
double &err) {
100 res=
ginteg(func,ndim,a,b);
113 const char *
type() {
return "inte_gen"; }
115 #ifndef DOXYGEN_INTERNAL 126 #ifndef DOXYGEN_NO_O2NS
double get_error()
Return the error in the result from the last call to ginteg() or ginteg_err()
virtual int ginteg_err(func_t &func, size_t ndim, lfunc_t &a, ufunc_t &b, double &res, double &err)
Integrate function func from to for .
The main O<span style='position: relative; top: 0.3em; font-size: 0.8em'>2</span>scl O$_2$scl names...
const char * type()
Return string denoting type ("inte_gen")
Generalized multi-dimensional integration [abstract base].
bool err_nonconv
If true, call the error handler if the routine does not "converge".
double tol_rel
The maximum "uncertainty" in the value of the integral.
double interror
The uncertainty for the last integration computation.
virtual double ginteg(func_t &func, size_t ndim, lfunc_t &a, ufunc_t &b)=0
Integrate function func from to for .