Class inte_il_transform (o2scl)

O2scl : Class List

template<class func_t, class def_inte_t, class fp_t = double>
class o2scl::inte_il_transform : public o2scl::inte<func_t, double>

Integrate over \( (-\infty,b] \).

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 \]
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.

int set_inte(inte<internal_funct, fp_t> &i)

Set the base integration object to use.

const char *type()

Return string denoting type (“inte_il_transform”)

Public Types

typedef std::function<fp_t(fp_t)> internal_funct

Internal function type based on floating-point type.

Public Functions

inte_il_transform()
int integ_il_err(func_t &func, fp_t b, fp_t &res, fp_t &err)

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

int integ_err(func_t &func, fp_t a, fp_t b, fp_t &res, fp_t &err)

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

The value given is a is ignored.

Protected Functions

fp_t transform(fp_t t)

Transform from \( t \in (0,1] \) to \( x \in (-\infty,b] \).

Protected Attributes

func_t *user_func

A pointer to the user-specified function.

fp_t upper_limit

The upper limit.

inte<internal_funct, fp_t> *it

The base integration object.

internal_funct fo

Function object.