Basic Gauss-Kronrod integration class (GSL) More...
#include <inte_kronrod_gsl.h>
This class provides the basic Gauss-Kronrod integration function and integration workspace for some of the GSL-based integration classes.
The main function of interest is set_rule(), which sets the integration rule for the GSL integration classes which inherit from this base class. The argument to set rule should be selected from the following list:
The integration coefficients for use with this class and associated children are stored in the o2scl_inte_gk_coeffs namespace.
Definition at line 614 of file inte_kronrod_gsl.h.
Public Member Functions | |
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... | |
template<class func2_t > | |
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 (func_t &func, double a, double b, double *result, double *abserr, double *resabs, double *resasc) |
Integration wrapper for user-specified function type. | |
![]() | |
virtual double | integ (func_t &func, double a, double b) |
Integrate function func from a to b . | |
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() More... | |
virtual const char * | type () |
Return string denoting type ("inte") | |
Protected Attributes | |
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. | |
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... | |
![]() | |
double | rescale_error (double err, const double result_abs, const double result_asc) |
QUADPACK's nonlinear rescaling of the absolute-error estimate. More... | |
|
inline |
Given abcissas and weights, this performs the integration of func
between a
and b
, providing a result with uncertainties.
The Gauss-Kronrod rule uses abscissae
to estimate the integral of a function as a linear combination of values,
where the weights are intrinsic to the abscissae. The data are designed so that the even-indexed abscissae yield a coarser estimate,
and their difference is the "raw" error estimate. The various quantities that the function computes are
The "absolute" error abserr
is computed from the raw error value using the function inte_gsl::rescale_error.
This function is designed for use with the values given in the o2scl_inte_gk_coeffs namespace.
This function never calls the error handler.
Definition at line 798 of file inte_kronrod_gsl.h.
|
inline |
This returns the index of the GSL integration rule a number between 1 and 6 (inclusive)
Definition at line 663 of file inte_kronrod_gsl.h.
|
inline |
If the value of size
is zero, the error handler will be called.
Definition at line 745 of file inte_kronrod_gsl.h.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).