Adaptive numerical integration of a function (without singularities) on a bounded interval (GSL) More...
#include <inte_qag_gsl.h>
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 routines in the User's guide for general information about the GSL integration classes.
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.
Definition at line 80 of file inte_qag_gsl.h.
Public Member Functions | |
inte_qag_gsl () | |
Create an integrator with the specified rule. | |
virtual int | integ_err (func_t &func, double a, double b, double &res, double &err) |
Integrate function func from a to b and place the result in res and the error in err . More... | |
const char * | type () |
Return string denoting type ("inte_qag_gsl") | |
![]() | |
int | get_rule () |
Get the Gauss-Kronrod integration rule. More... | |
void | set_rule (int rule) |
Set the Gauss-Kronrod integration rule to be used. | |
int | set_limit (size_t lim) |
Set the limit for the number of subdivisions of the integration region (default 1000) More... | |
void | gauss_kronrod_base (func2_t &func, double a, double b, double *result, double *abserr, double *resabs, double *resasc) |
The base Gauss-Kronrod integration function template. More... | |
virtual void | gauss_kronrod (funct &func, double a, double b, double *result, double *abserr, double *resabs, double *resasc) |
Integration wrapper for user-specified function type. | |
![]() | |
virtual double | integ (funct &func, double a, double b) |
Integrate function func from a to b . | |
virtual int | integ_err (funct &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() More... | |
Protected Member Functions | |
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 . More... | |
![]() | |
double | rescale_error (double err, const double result_abs, const double result_asc) |
QUADPACK's nonlinear rescaling of the absolute-error estimate. More... | |
Additional Inherited Members | |
![]() | |
int | verbose |
Verbosity. | |
size_t | last_iter |
The most recent number of iterations taken. | |
double | tol_rel |
The maximum relative uncertainty in the value of the integral (default ![]() | |
double | tol_abs |
The maximum absolute uncertainty in the value of the integral (default ![]() | |
bool | err_nonconv |
If true, call the error handler if the routine does not converge or reach the desired tolerance (default true) More... | |
![]() | |
inte_workspace_gsl * | w |
The integration workspace. | |
int | n_gk |
Size of Gauss-Kronrod arrays. | |
const double * | x_gk |
Gauss-Kronrod abscissae pointer. | |
const double * | w_g |
Gauss weight pointer. | |
const double * | w_gk |
Gauss-Kronrod weight pointer. | |
double * | f_v1 |
Scratch space. | |
double * | f_v2 |
Scratch space. | |
![]() | |
double | interror |
The uncertainty for the last integration computation. | |
|
inlinevirtual |
Definition at line 95 of file inte_qag_gsl.h.
|
inlineprotected |
Definition at line 109 of file inte_qag_gsl.h.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).