6 #include "gsl/gsl_interp.h" 7 #include "gsl/gsl_spline.h" 24 namespace GaudiMathImplementation
33 : m_x( x ), m_y( y ), m_type( type )
48 for (
const auto& i : data ) {
62 const gsl_interp_type* T =
nullptr;
66 T = gsl_interp_linear;
69 T = gsl_interp_polynomial;
72 T = gsl_interp_cspline;
75 T = gsl_interp_cspline_periodic;
81 T = gsl_interp_akima_periodic;
84 T = gsl_interp_cspline;
160 : AbsFunction(),
m_spline( x, y, type )
186 : AbsFunction(),
m_spline( data, type )
210 return Genfun::FunctionNoop( &aux );
213 return Genfun::FunctionNoop( &aux );
241 : AbsFunction(),
m_spline( x, y, type )
267 : AbsFunction(),
m_spline( data, type )
297 return Genfun::FunctionNoop( &aux );
300 return Genfun::FunctionNoop( &aux );
328 : AbsFunction(),
m_spline( x, y, type )
354 : AbsFunction(),
m_spline( data, type )
378 return Genfun::FunctionNoop( &aux );
381 return Genfun::FunctionNoop( &aux );
409 : AbsFunction(),
m_spline( x, y, type ), m_low( low )
463 return Genfun::FunctionNoop( &aux );
465 const AbsFunction& aux =
GSLSpline( *
this );
466 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.