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. |
These functions and functor calculate the gradient of a functor using a centered difference scheme.
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().