Class inte_transform (o2scl)¶
-
template<class func_t, class def_inte_t, class fp_t = double>
class inte_transform : public o2scl::inte<func_t, double>¶ Integration using variable transformations for semi-infinite and infinite intervals.
Note
This class only works if the base integration type
def_inte_t
avoids evaluating the function at the left-hand end point.Integration object
-
def_inte_t def_inte¶
Default integration object.
-
inline int set_inte(inte<internal_funct, fp_t> &i)¶
Set the base integration object to use.
-
inline virtual const char *type()¶
Return string denoting type (“inte_transform”)
Public Types
Public Functions
-
inline inte_transform()¶
-
inline virtual 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
.This class uses the GSL approach, employing the transformation \( x = b - (1-t)/t \), and giving
\[ \int_{-\infty}^{b}~dx f(x) = \int_0^1~dt~f[b-(1-t)/t]/t^2 \]
-
inline virtual 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
.This class uses the GSL approach, employing the transformation \( x = a + (1-t)/t \), and giving
\[ \int_a^{\infty}~dx f(x) = \int_0^1~dt~f[a+(1-t)/t]/t^2 \]
-
inline virtual 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
.This class uses the GSL approach, employing the transformation \( x = (1-t)/t \), and giving
\[ \int_{-\infty}^{\infty}~dx f(x) = \int_0^1~dt~\left\{f[(1-t)/t] + f[-(1-t)/t]\right\}/t^2 \]
Protected Functions
-
inline virtual fp_t iu_transform(fp_t t)¶
Transform from \( t \in (0,1] \) to \( x \in [a,\infty) \).
-
inline virtual fp_t il_transform(fp_t t)¶
Transform from \( t \in (0,1] \) to \( x \in (-\infty,b] \).
Protected Attributes
-
def_inte_t *it¶
The base integration object.
-
internal_funct fo_il¶
Function object.
-
internal_funct fo_iu¶
Function object.
-
internal_funct fo_i¶
Function object.
-
internal_funct fo_no¶
Function object.
-
def_inte_t def_inte¶