Object-oriented Scientific Computing Library: Version 0.910
Public Member Functions | Data Fields
gsl_inte_qng< func_t > Class Template Reference

Non-adaptive integration from a to b (GSL) More...

#include <gsl_inte_qng.h>

Inheritance diagram for gsl_inte_qng< func_t >:
inte< func_t > gsl_inte

Detailed Description

template<class func_t = funct>
class gsl_inte_qng< func_t >

The function integ() uses 10-point, 21-point, 43-point, and 87-point Gauss-Kronrod integration successively until the integral is returned within the accuracy specified by inte::tol_abs and inte::tol_rel. The 10-point rule is only used to estimate the error for the 21-point rule. The result of the 21-point calculation is used to estimate the error for the 43-point rule, and so forth.

The error handler is called if the 87-point integration fails to produce the desired accuracy. If inte::err_nonconv is false (the default is true), then the error handler is never called and when the desired accuracy is not obtained the result of the 87-point integration is returned along with the associated error.

The return value of the function to be integrated is ignored.

The integration fails and the error handler is called if the tolerances are too small, i.e. if either $ \mathrm{tol_{abs}} \leq 0 $ or if $ \mathrm{tol_{rel}} < 50 \cdot \epsilon_\mathrm{double} $ where $ \epsilon_\mathrm{double} \approx 1.11 \times 10^{-14}) $.

The integration coefficients are stored in the o2scl_inte_qng_coeffs namespace.

Definition at line 251 of file gsl_inte_qng.h.

Public Member Functions

virtual int integ_err (func_t &func, double a, double b, double &res, double &err2)
 Integrate function func from a to b giving result res and error err.
const char * type ()
 Return string denoting type ("gsl_inte_qng")

Data Fields

size_t feval
 The number of function evalutions for the last integration.
double min_rel_tol
 Minimum relative tolerance for integration (default $ 5 \times 10^{-29} $ )

Field Documentation

template<class func_t = funct>
size_t gsl_inte_qng< func_t >::feval

Set to either 0, 21, 43, or 87, depending on the number of function evaluations that were used. This variable is zero if an error occurs before any function evaluations were performed and is never equal 10, since in the 10-point method, the 21-point result is used to estimate the error. If the function fails to achieve the desired precision, feval is 87.

Definition at line 270 of file gsl_inte_qng.h.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).

Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads.