6 #include "gsl/gsl_interp.h" 7 #include "gsl/gsl_spline.h" 23 namespace GaudiMathImplementation {
31 : m_x( x ), m_y( y ), m_type( type ) {}
44 for (
const auto& i : data ) {
55 const gsl_interp_type* T =
nullptr;
59 T = gsl_interp_linear;
62 T = gsl_interp_polynomial;
65 T = gsl_interp_cspline;
68 T = gsl_interp_cspline_periodic;
74 T = gsl_interp_akima_periodic;
77 T = gsl_interp_cspline;
141 : AbsFunction(),
m_spline( x, y, type ) {}
165 : AbsFunction(),
m_spline( data, type ) {}
186 return Genfun::FunctionNoop( &aux );
189 return Genfun::FunctionNoop( &aux );
217 : AbsFunction(),
m_spline( x, y, type ) {}
241 : AbsFunction(),
m_spline( data, type ) {}
268 return Genfun::FunctionNoop( &aux );
271 return Genfun::FunctionNoop( &aux );
299 : AbsFunction(),
m_spline( x, y, type ) {}
323 : AbsFunction(),
m_spline( data, type ) {}
344 return Genfun::FunctionNoop( &aux );
347 return Genfun::FunctionNoop( &aux );
375 : AbsFunction(),
m_spline( x, y, type ), m_low( low ) {}
422 return Genfun::FunctionNoop( &aux );
424 const AbsFunction& aux =
GSLSpline( *
this );
425 return Genfun::FunctionNoop( &aux );
double integ(const double a, const double b) const
evaluate the integral on [a,b]
double operator()(double a) const override
main method: evaluate the function
SplineBase(const Data1D &x, const Data1D &y, const GaudiMath::Interpolation::Type type)
constructor from vectors and type
double eval(const double x) const
evaluate the function
double operator()(double a) const override
main method: evaluate the function
double operator()(double a) const override
main method: evaluate the function
Genfun::Derivative partial(unsigned int i) const override
Derivatives.
std::unique_ptr< gsl_spline, details::gsl_deleter > m_spline
Genfun::GaudiMathImplementation::NumericalDerivative Derivative
GaudiMath::Interpolation::Type m_type
transient
Genfun::Derivative partial(unsigned int i) const override
Derivatives.
double deriv2(const double x) const
evaluate the second derivative
double deriv(const double x) const
evaluate the first derivative
GSLSplineDeriv2(const Data1D &x, const Data1D &y, const GaudiMath::Interpolation::Type type)
constructor from vectors and type
GSLSplineDeriv()
default construtor is desabled ;
std::vector< double > m_y
double operator()(double a) const override
main methgod: evaluate teh function
GSLSpline(const Data1D &x, const Data1D &y, const GaudiMath::Interpolation::Type type)
constructor from vectors and type
Genfun::Derivative partial(unsigned int i) const override
Derivatives.
std::unique_ptr< gsl_interp_accel, details::gsl_deleter > m_accel
transient
GSLSplineInteg(const Data1D &x, const Data1D &y, const GaudiMath::Interpolation::Type type, const double low=0)
constructor from vectors and type
Genfun::GaudiMathImplementation::Constant Constant
std::vector< double > m_x
Genfun::Derivative partial(unsigned int i) const override
Derivatives.