Class inte (o2scl)¶
-
template<class
func_t
= funct, classfp_t
= double>
classo2scl
::
inte
¶ Base integration class [abstract base].
- 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.
- Note
Currently supports only types
double
and, for some integration methods,long
double
for the floating point typefp_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.
Public Functions
-
inte
()¶
-
~inte
()¶
-
fp_t
get_error
()¶ Return the numerically estimated error in the result from the last call to integ()
This will quietly return zero if no integrations have been performed or if the integrator does not estimate the error.
-
int
integ_err
(func_t &func, fp_t a, fp_t b, fp_t &res, fp_t &err)¶ Integrate function
func
froma
tob
and place the result inres
and the error inerr
.
-
int
integ_iu_err
(func_t &func, fp_t a, fp_t &res, fp_t &err)¶ Integrate function
func
froma
to \( \infty \) and place the result inres
and the error inerr
.
-
int
integ_il_err
(func_t &func, fp_t b, fp_t &res, fp_t &err)¶ Integrate function
func
from \( -\infty \) tob
and place the result inres
and the error inerr
.
-
int
integ_i_err
(func_t &func, fp_t &res, fp_t &err)¶ Integrate function
func
from \( -\infty \) to \( \infty \) and place the result inres
and the error inerr
.
-
const char *
type
()¶ Return string denoting type (“inte”)
Public Members
-
int
verbose
¶ Verbosity.
-
size_t
last_iter
¶ The most recent number of iterations taken.
-
bool
err_nonconv
¶ If true, call the error handler if the routine does not converge or reach the desired tolerance (default true)
If this is false, the function proceeds normally and may provide convergence information in the integer return value.