40 #include "gsl/gsl_chebyshev.h"
50 fOrder(n) , fSeries(0), fFunction(0)
56 Initialize( &adapter.
F, const_cast<void *>(p), a, b );
61 fOrder(n) , fSeries(0), fFunction(0)
76 fOrder(n) , fSeries(0), fFunction(0)
90 if (
this == &rhs)
return *
this;
118 return std::make_pair( result, error);
130 return std::make_pair( result, error);
Class describing a Chebyshev series which can be used to approximate a function in a defined range [a...
std::pair< double, double > EvalErr(double x) const
Evaluate the series at a given point x estimating both the series result and its absolute error...
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
ChebyshevApprox * Integral()
Compute the integral of the series and return a pointer to a new Chebyshev series with the integral c...
void Initialize(GSLFuncPointer f, void *params, double a, double b)
Initialize series passing function and range.
wrapper class for C struct gsl_cheb_series
double operator()(double x) const
Evaluate the series at a given point x.
GSLFunctionWrapper * fFunction
ChebyshevApprox & operator=(const ChebyshevApprox &)
ChebyshevApprox(const ROOT::Math::IGenFunction &f, double a, double b, size_t n)
Construct a Chebyshev series approximation to a Function f in range [a,b]; constructor based on funct...
double(* GSLFuncPointer)(double, void *)
Function pointer corresponding to gsl_function signature.
Class for adapting any C++ functor class to C function pointers used by GSL.
ChebyshevApprox * Deriv()
Compute the derivative of the series and return a pointer to a new Chebyshev series with the derivati...
void SetFuncPointer(GSLFuncPointer f)
set in the GSL C struct the pointer to the function evaluation
Wrapper class to the gsl_function C structure.
void SetParams(void *p)
set in the GSL C struct the extra-object pointer
gsl_cheb_series * get() const
static double F(double x, void *p)
virtual ~ChebyshevApprox()