16 #error no need to expose this header to Swig
20 #ifndef BORNAGAIN_BASE_MATH_INTEGRATORGK_H
21 #define BORNAGAIN_BASE_MATH_INTEGRATORGK_H
25 #include <gsl/gsl_integration.h>
32 double integrate(
const std::function<
double(
double)>& f,
double lmin,
double lmax);
37 return (*(
const std::function<
double(
double)>*)(p))(x);
Defines complex_t, and a few elementary functions.
std::complex< double > complex_t
To integrate a complex function of a real variable.
complex_t integrate(const std::function< complex_t(double)> &f, double lmin, double lmax)
To integrate a real function of a real variable.
double integrate(const std::function< double(double)> &f, double lmin, double lmax)
static double m_Cfunction(double x, void *p)
gsl_integration_workspace * m_workspace