Class inte_qng_gsl (o2scl)¶
-
template<class func_t = funct>
class inte_qng_gsl : public o2scl::inte<funct>, public o2scl::inte_gsl¶ 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::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.
Public Functions
-
inline inte_qng_gsl()¶
-
inline virtual int integ_err(func_t &func, double a, double b, double &res, double &err2)¶
Integrate function
func
froma
tob
giving resultres
and errorerr
.
-
inline virtual const char *type()¶
Return string denoting type (“inte_qng_gsl”)
Public Members
-
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 87.
-
double min_rel_tol¶
Minimum relative tolerance for integration (default \( 5 \times 10^{-29} \) )
-
inline inte_qng_gsl()¶