32 #ifndef __FUNCGRIDBSPL__
33 #define __FUNCGRIDBSPL__
55 class FuncGrid_Bspline
60 std::vector<double> m_x;
63 std::vector<double> m_fx;
75 std::shared_ptr<gsl_bspline_workspace> m_bspline;
78 std::shared_ptr<gsl_vector> m_Bcoeff;
81 std::shared_ptr<gsl_vector> m_weights;
84 std::shared_ptr<gsl_matrix> m_covariance;
107 void m_set_bspline(
const std::vector<double> x,
const std::vector<double> fx,
const int nbreakpoints,
const int order);
131 void m_set_knots (
const std::vector<double> breakpoints);
145 void m_linear_fit (
const double frac=0.1);
154 void m_compute_func_integral ();
168 FuncGrid_Bspline () {}
185 FuncGrid_Bspline (
const std::vector<double> x,
const std::vector<double> fx,
const int nbreakpoints,
const int order=4,
const double frac=0.1,
const double xmin=
cbl::par::defaultDouble,
const double xmax=
cbl::par::defaultDouble);
200 FuncGrid_Bspline (
const std::vector<double> x,
const std::vector<double> fx,
const std::vector<double> breakpoints,
const int order=4,
const double frac=0.1);
206 ~FuncGrid_Bspline () =
default;
245 void set (
const std::vector<double> x,
const std::vector<double> fx,
const std::vector<double> breakpoints,
const int order=4,
const double frac=0.1);
270 std::vector<double> eval_func (
const std::vector<double> xx,
const double integral=
cbl::par::defaultDouble)
const;
functions that wrap GSL routines for integration, root finding and minimization
static const double defaultDouble
default double value
The global namespace of the CosmoBolognaLib