Gradient with the Centered Difference Scheme

Classes

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

Functions

template<int N, class Functor , typename T >
void 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 > 
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> 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.

References gradient_centered_difference().

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