Public Member Functions | Public Attributes | Protected Attributes | List of all members
o2scl::inte< func_t, fp_t > Class Template Referenceabstract

Base integration class [abstract base]. More...

#include <inte.h>

Detailed Description

template<class func_t = funct, class fp_t = double>
class o2scl::inte< func_t, fp_t >

Note
Currently O2scl supports only types double and, for some integration methods, long double for the floating point type fp_t . Also, the default values of tol_rel and tol_abs are designed for double precision and likely need to be decreased for long double precision integration.
Idea for Future:
It might be useful to have all of the integration classes report the number of function evaluations used in addition to the number of iterations which were taken.

Definition at line 51 of file inte.h.

Public Member Functions

virtual fp_t integ (func_t &func, fp_t a, fp_t b)
 Integrate function func from a to b.
 
virtual int integ_err (func_t &func, fp_t a, fp_t b, fp_t &res, fp_t &err)=0
 Integrate function func from a to b and place the result in res and the error in err.
 
fp_t 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")
 

Public Attributes

int verbose
 Verbosity.
 
size_t last_iter
 The most recent number of iterations taken.
 
fp_t tol_rel
 The maximum relative uncertainty in the value of the integral (default $ 10^{-8} $)
 
fp_t tol_abs
 The maximum absolute uncertainty in the value of the integral (default $ 10^{-8} $)
 
bool err_nonconv
 If true, call the error handler if the routine does not converge or reach the desired tolerance (default true) More...
 

Protected Attributes

fp_t interror
 The uncertainty for the last integration computation.
 

Member Function Documentation

◆ get_error()

template<class func_t = funct, class fp_t = double>
fp_t o2scl::inte< func_t, fp_t >::get_error ( )
inline

This will quietly return zero if no integrations have been performed or if the integrator does not estimate the error.

Definition at line 114 of file inte.h.

Member Data Documentation

◆ err_nonconv

template<class func_t = funct, class fp_t = double>
bool o2scl::inte< func_t, fp_t >::err_nonconv

If this is false, the function proceeds normally and may provide convergence information in the integer return value.

Definition at line 88 of file inte.h.


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

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