gsl_inte_qng Class Template Reference

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

#include <gsl_inte_qng.h>

Inheritance diagram for gsl_inte_qng:

inte gsl_inte

Detailed Description

template<class param_t, class func_t>
class gsl_inte_qng< param_t, func_t >

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

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::tolx and inte::tolf .

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.

Todo:
Shouldn't feval be last_iter ?
Idea for future:
Compare directly with GSL as is done in gsl_inte_qag_ts.

Definition at line 237 of file gsl_inte_qng.h.


Public Member Functions

virtual double integ (func_t &func, double a, double b, param_t &pa)
 Integrate function func from a to b.
virtual int integ_err (func_t &func, double a, double b, param_t &pa, 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.

Member Function Documentation

virtual int integ_err ( func_t &  func,
double  a,
double  b,
param_t &  pa,
double &  res,
double &  err2 
) [inline, virtual]

Integrate function func from a to b giving result res and error err.

Idea for future:
Allow user to change 0.5e28

Implements inte.

Definition at line 267 of file gsl_inte_qng.h.


Field Documentation

size_t feval

The number of function evalutions for the last integration.

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 set to 88.

Definition at line 252 of file gsl_inte_qng.h.


The documentation for this class was generated from the following file:

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page