1 #ifndef GAUDIMATH_NUMERICALDERIVATIVE_H 2 #define GAUDIMATH_NUMERICALDERIVATIVE_H 1 12 #include "CLHEP/GenericFunctions/AbsFunction.hh" 17 #if defined( __clang__ ) || defined( __CLING__ ) 18 #pragma clang diagnostic push 19 #pragma clang diagnostic ignored "-Winconsistent-missing-override" 20 #elif defined( __GNUC__ ) && __GNUC__ >= 5 21 #pragma GCC diagnostic push 22 #pragma GCC diagnostic ignored "-Wsuggest-override" 27 namespace GaudiMathImplementation
48 enum Type { Central, Forward, Backward };
102 double operator()(
double argument )
const override;
104 double operator()(
const Argument& argument )
const override;
110 Derivative partial(
unsigned int index )
const override;
114 const AbsFunction&
function()
const {
return *m_function; }
116 size_t index()
const {
return m_index; }
121 const Type& setType(
const Type& value );
124 double result()
const {
return m_result; }
126 double error()
const {
return m_error; }
153 #if defined( __clang__ ) || defined( __CLING__ ) 154 #pragma clang diagnostic pop 155 #elif defined( __GNUC__ ) && __GNUC__ >= 5 156 #pragma GCC diagnostic pop 162 #endif // GAUDIMATH_NUMERICALDERIVATIVE_H size_t index() const
index
bool hasAnalyticDerivative() const override
Does this function have an analytic derivative?
double error() const
the absolute error estimate for the last call
const Type & type() const
type
Type
the type of numerical differentiation
std::unique_ptr< const AbsFunction > m_function
Genfun::GaudiMathImplementation::NumericalDerivative Derivative
PropertyMgr & operator=(const PropertyMgr &)=delete
unsigned int dimensionality() const override
dimensionality of the problem
This class is used for returning status codes from appropriate routines.
Numerical derivative (using GSL adaptive numerical differentiation)
virtual Out operator()(const vector_of_const_< In > &inputs) const =0
double result() const
the result of the last call