vtf-logo

Derivative with the Centered Difference Scheme


Classes

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

Functions

template<class Functor>
void numerical::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 numerical::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 Fri Aug 24 12:56:06 2007 for Numerical Algorithms Package by  doxygen 1.4.7