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" 26 namespace GaudiMathImplementation {
45 enum Type { Central, Forward, Backward };
96 double operator()(
double argument )
const override;
98 double operator()(
const Argument& argument )
const override;
104 Derivative partial(
unsigned int index )
const override;
108 const AbsFunction&
function()
const {
return *m_function; }
110 size_t index()
const {
return m_index; }
115 const Type& setType(
const Type& value );
118 double result()
const {
return m_result; }
120 double error()
const {
return m_error; }
147 #if defined( __clang__ ) || defined( __CLING__ ) 148 # pragma clang diagnostic pop 149 #elif defined( __GNUC__ ) && __GNUC__ >= 5 150 # pragma GCC diagnostic pop 156 #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
constexpr static const auto FAILURE
double result() const
the result of the last call