1 #ifndef GAUDIMATH_SPLINES_H 2 #define GAUDIMATH_SPLINES_H 1 15 #include "CLHEP/GenericFunctions/AbsFunction.hh" 16 #include "CLHEP/GenericFunctions/Argument.hh" 17 #include "CLHEP/GenericFunctions/GenericFunctions.hh" 25 #include "gsl/gsl_interp.h" 26 #include "gsl/gsl_spline.h" 31 #pragma clang diagnostic push 32 #pragma clang diagnostic ignored "-Winconsistent-missing-override" 37 namespace GaudiMathImplementation
44 if ( p ) gsl_spline_free( p );
48 if ( p ) gsl_interp_accel_free( p );
77 template <
class DATAX,
class DATAY>
97 m_x.reserve( end - begin );
98 m_y.reserve( end - begin );
100 m_x.push_back( begin->first );
101 m_y.push_back( begin->second );
123 double eval(
const double x )
const;
125 double deriv(
const double x )
const;
127 double deriv2(
const double x )
const;
129 double integ(
const double a,
const double b )
const;
133 void initialize()
const;
221 : m_spline( type, begin_x, end_x, begin_y )
235 template <
class DATA>
246 double operator()(
const Argument& x )
const override;
346 : AbsFunction(), m_spline( type, begin_x, end_x, begin_y )
360 template <
class DATA>
362 : AbsFunction(), m_spline( type, begin, end )
374 double operator()(
const Argument& x )
const override;
478 : AbsFunction(), m_spline( type, begin_x, end_x, begin_y )
492 template <
class DATA>
494 : AbsFunction(), m_spline( type, begin, end )
506 double operator()(
const Argument& x )
const override;
561 const
double low = 0 );
612 : AbsFunction(), m_spline( type, begin_x, end_x, begin_y ), m_low( low )
627 template <
class DATA>
629 : m_spline( type,
std::forward<DATA>(
begin ),
std::forward<DATA>(
end ) ), m_low( low )
641 double operator()(
const Argument& x )
const override;
669 #pragma clang diagnostic pop 672 #endif // GAUDIMATH_SPLINES_H SplineBase(const GaudiMath::Interpolation::Type type, DATA begin, DATA end)
templated constructor from the sequence of (x,y(x)) pairs as sequence of pairs the class TabulatedPro...
SplineBase(const SplineBase &rhs)
copy constructor
const SplineBase & spline() const
acess to the spline function
std::vector< std::pair< double, double > > Data2D
GSLSplineDeriv2(const GaudiMath::Interpolation::Type type, DATA begin, DATA end)
templated constructor from the sequence of pairs as sequence of pairs the class TabulatedProperty can...
unsigned int dimensionality() const override
SplineBase::Data2D Data2D
SplineBase::Data2D Data2D
const SplineBase & spline() const
acess to the spline function
SplineBase::Data1D Data1D
const SplineBase & spline() const
acess to the spline function
GSLSplineDeriv(const GaudiMath::Interpolation::Type type, DATA begin, DATA end)
templated constructor from the sequence of pairs as sequence of pairs the class TabulatedProperty can...
std::unique_ptr< gsl_spline, details::gsl_deleter > m_spline
SplineBase::Data2D Data2D
Genfun::GaudiMathImplementation::NumericalDerivative Derivative
constexpr auto size(const C &c) noexcept(noexcept(c.size())) -> decltype(c.size())
PropertyMgr & operator=(const PropertyMgr &)=delete
GSLSplineInteg(const GaudiMath::Interpolation::Type type, DATA &&begin, DATA &&end, const double low)
templated constructor from the sequence of pairs as sequence of pairs the class TabulatedProperty can...
unsigned int dimensionality() const override
SplineBase::Data1D Data1D
void operator()(gsl_interp_accel *p)
GSLSpline(const GaudiMath::Interpolation::Type type, DATA begin, DATA end)
templated constructor from the sequence of pairs as sequence of pairs the class TabulatedProperty can...
bool hasAnalyticDerivative() const override
Does this function have an analytic derivative?
std::vector< double > Data1D
GaudiMath::Interpolation::Type m_type
transient
SplineBase & operator=(const SplineBase &rhs)
assignment
std::vector< double > m_y
SplineBase::Data1D Data1D
SplineBase(const GaudiMath::Interpolation::Type type, DATAX begin_x, DATAX end_x, DATAY begin_y)
templated constructor in the spirit of STL-algorithms
SplineBase::Data2D Data2D
unsigned int dimensionality() const override
bool hasAnalyticDerivative() const override
Does this function have an analytic derivative?
bool hasAnalyticDerivative() const override
Does this function have an analytic derivative?
SplineBase::Data1D Data1D
T back_inserter(T...args)
bool hasAnalyticDerivative() const override
Does this function have an analytic derivative?
GaudiMath.h GaudiMath/GaudiMath.h.
std::unique_ptr< gsl_interp_accel, details::gsl_deleter > m_accel
transient
const SplineBase & spline() const
acess to the spline function
AttribStringParser::Iterator begin(const AttribStringParser &parser)
void operator()(gsl_spline *p)
Type
the list of available types for ntuples
std::vector< double > m_x
unsigned int dimensionality() const override