Class inte_qag_gsl (o2scl)¶
-
template<class func_t = funct>
class inte_qag_gsl : public o2scl::inte_kronrod_gsl<funct>¶ Adaptive numerical integration of a function (without singularities) on a bounded interval (GSL)
Adaptive integration of a univariate function requires two main procedures: approximating the integral on a bounded interval, and estimating the approximation error. The algorithm recursively refines the interval, computing the integral and its error estimate on each subinterval, until the total error estimate over all subintervals falls within the user-specified tolerance. The value returned is the sum of the (approximated) integrals over all subintervals.
See GSL-based integration details in the User’s guide for general information about the GSL integration classes.
- Idea for Future:
There are a few fine-tuned parameters which should be re-expressed as data members in the convergence tests.
Should QUADPACK parameters in round-off tests be subject to adjustments by the end user?
Add functions to examine the contents of the workspace to detect regions where the integrand may be problematic; possibly call these functions automatically depending on verbosity settings.
Public Functions
-
inline inte_qag_gsl()¶
Create an integrator with the specified rule.
-
inline virtual ~inte_qag_gsl()¶
-
inline virtual int integ_err(func_t &func, double a, double b, double &res, double &err)¶
Integrate function
func
froma
tob
and place the result inres
and the error inerr
.
-
inline virtual const char *type()¶
Return string denoting type (“inte_qag_gsl”)
Protected Functions
-
inline int qag(func_t &func, const double a, const double b, const double l_epsabs, const double l_epsrel, double *result, double *abserr)¶
Perform an adaptive integration given the coefficients, and returning
result
.- Idea for Future:
Just move this function to integ_err().