![]() |
Object-oriented Scientific Computing Library: Version 0.910
|
Basic Gauss-Kronrod integration class (GSL) More...
#include <gsl_inte_kronrod.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 610 of file gsl_inte_kronrod.h.
Public Member Functions | |
int | get_rule () |
Get the Gauss-Kronrod integration rule. | |
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) | |
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. | |
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. | |
Protected Attributes | |
gsl_inte_workspace * | 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. |
int gsl_inte_kronrod< func_t >::get_rule | ( | ) | [inline] |
This returns the index of the GSL integration rule a number between 1 and 6 (inclusive)
Definition at line 659 of file gsl_inte_kronrod.h.
int gsl_inte_kronrod< func_t >::set_limit | ( | size_t | lim | ) | [inline] |
If the value of size
is zero, the error handler will be called.
Definition at line 741 of file gsl_inte_kronrod.h.
void gsl_inte_kronrod< func_t >::gauss_kronrod_base | ( | func2_t & | func, |
double | a, | ||
double | b, | ||
double * | result, | ||
double * | abserr, | ||
double * | resabs, | ||
double * | resasc | ||
) | [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 gsl_inte::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 794 of file gsl_inte_kronrod.h.
Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).