vtf-logo

Gradient with the Centered Difference Scheme


Classes

class  numerical::GradientCenteredDifference< N, Functor, T >
 The numerical gradient of a functor. More...

Functions

template<int N, class Functor, typename T>
void numerical::gradient_centered_difference (const Functor &f, typename Functor::argument_type x, ads::FixedArray< N, typename Functor::result_type > &gradient, const T delta=std::pow(std::numeric_limits< T >::epsilon(), 1.0/3.0))
 Calculate the gradient of f at x.
template<int N, class Functor, typename T>
ads::FixedArray< N, typename
Functor::result_type > 
numerical::gradient_centered_difference (const Functor &f, typename Functor::argument_type x, const T delta=std::pow(std::numeric_limits< T >::epsilon(), 1.0/3.0))
 Return the gradient of f at x.

Detailed Description

These functions and functor calculate the gradient of a functor using a centered difference scheme.

Function Documentation

template<int N, class Functor, typename T>
ads::FixedArray<N,typename Functor::result_type> numerical::gradient_centered_difference ( const Functor &  f,
typename Functor::argument_type  x,
const T  delta = std::pow( std::numeric_limits<T>::epsilon(), 1.0 / 3.0 ) 
) [inline]

Return the gradient of f at x.

You must specify N explicitly as it cannot be inferred from the arguments.


Generated on Fri Aug 24 12:56:06 2007 for Numerical Algorithms Package by  doxygen 1.4.7