1 #ifndef FP_GSL_INTEGRATE_H 2 #define FP_GSL_INTEGRATE_H 3 #include <boost/function.hpp> 4 #include <boost/utility.hpp> 5 #include <gsl/gsl_integration.h> 18 double xmin,
double xmax,
19 double &Res,
double& Error_est,
21 double eps_rel = 1e-8,
22 int key = GSL_INTEG_GAUSS15)
const;
24 double xmin,
double xmax,
25 const std::vector<double>& breakpoints,
26 double &Res,
double& Error_est,
28 double eps_rel = 1e-8,
29 int key = GSL_INTEG_GAUSS15)
const;
31 double integrate(
const boost::function<
double (
double)>& F,
32 double xmin,
double xmax,
34 double eps_rel = 1e-8,
35 int key = GSL_INTEG_GAUSS15)
const;
36 double integrate(
const boost::function<
double (
double)>& F,
37 double xmin,
double xmax,
38 const std::vector<double>& breakpoints,
40 double eps_rel = 1e-8,
41 int key = GSL_INTEG_GAUSS15)
const;
44 gsl_integration_workspace *w;
GslIntegrate(int Max_intervals=1000)
This sets up the workspace need by GSL for integration.
void integrate_err_est(const boost::function< double(double)> &F, double xmin, double xmax, double &Res, double &Error_est, double eps_abs=0.0, double eps_rel=1e-8, int key=GSL_INTEG_GAUSS15) const
Calculate the definite integral of F from xmin to xmax.
This is a thin wrapper around the GSL integration function.
Contains classes to abstract away details in various Spurr Radiative Transfer software.
double integrate(const boost::function< double(double)> &F, double xmin, double xmax, double eps_abs=0.0, double eps_rel=1e-8, int key=GSL_INTEG_GAUSS15) const
Version of integrate that only returns the results, without the error estimate.