Derivative with the Centered Difference Scheme

Classes

class  DerivativeCenteredDifference< Functor >
 The numerical derivative of a functor. More...

Functions

template<class Functor >
void derivative_centered_difference (const Functor &f, const typename Functor::argument_type x, typename Functor::result_type &deriv, const typename Functor::argument_type delta=std::pow(std::numeric_limits< typename Functor::argument_type >::epsilon(), 1.0/3.0))
 Calculate f'(x).
template<class Functor >
Functor::result_type derivative_centered_difference (const Functor &f, const typename Functor::argument_type x, const typename Functor::argument_type delta=std::pow(std::numeric_limits< typename Functor::argument_type >::epsilon(), 1.0/3.0))
 Return f'(x).

Detailed Description

These functions and functor calculate the derivative of a functor using a centered difference scheme:

\[ f'(x) = \frac{ f(x + \Delta x) - f(x - \Delta x) }{ 2 \Delta x } + \mathcal{O}( \Delta x^2 ). \]

Generated on Thu Jun 30 02:15:00 2016 for Numerical Algorithms Package by  doxygen 1.6.3