Numerical integrator.
More...
#include <gausskronrod.h>
|
static double | eval (double x, void *ptr_radf) |
| Evaluates radial function supplied in a pointer. More...
|
|
template<typename Functor>
class GaussKronrod< Functor >
The class is initialized by a lambda-function (= the integrand) and serves as a QuadPack wrapper. The member function integrate performs the actual integration. The getters result and abserr return the computed numbers.
For the initialization you will mostly want to use the structure
template<typename Functor>
template<typename Functor>
template<typename Functor>
template<typename Functor>
template<typename Functor>
template<typename Functor>
static double GaussKronrod< Functor >::eval |
( |
double |
x, |
|
|
void * |
ptr_radf |
|
) |
| |
|
inlinestatic |
This function serves as a workaround for impossibility of passing pointer-to-member to the GSL routines.
template<typename Functor>
bool GaussKronrod< Functor >::integrate |
( |
double |
a, |
|
|
double |
b |
|
) |
| |
|
inline |
Performs the integration on a given interval. Uses specialized routines from GSL (that is, in this case, nothing than C-port of QuadPack).
You can compute improper integrals. For specifying "infinity" as one or both bounds use either
std::numeric_limits<double>::infinity()
for positive infinity or
-std::numeric_limits<double>::infinity()
for negative infinity.
- Returns
- The value of "Ok" (i.e. whether the last integration has been successful according to the library).
template<typename Functor>
template<typename Functor>
double GaussKronrod< Functor >::operator() |
( |
double |
x | ) |
const |
|
inlinevirtual |
template<typename Functor>
template<typename Functor>
template<typename Functor>
template<typename Functor>
std::string const& GaussKronrod< Functor >::status |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: