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 };
99 double operator()(
double argument )
const override;
101 double operator()(
const Argument& argument )
const override;
107 Derivative partial(
unsigned int index )
const override;
111 const AbsFunction&
function()
const {
return *m_function; }
113 size_t index()
const {
return m_index; }
118 const Type& setType(
const Type& value );
121 double result()
const {
return m_result; }
123 double error()
const {
return m_error; }
150 #if defined( __clang__ ) || defined( __CLING__ ) 151 #pragma clang diagnostic pop 152 #elif defined( __GNUC__ ) && __GNUC__ >= 5 153 #pragma GCC diagnostic pop 159 #endif // GAUDIMATH_NUMERICALDERIVATIVE_H constexpr static const auto FAILURE
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