vtf-logo

centered_difference.h File Reference

Numerical differentiation with centered difference schemes. More...

#include "../defs.h"
#include "../../ads/array/FixedArray.h"
#include <functional>
#include <limits>
#include <cmath>

Go to the source code of this file.

Namespaces

namespace  numerical

Classes

class  numerical::DerivativeCenteredDifference< Functor >
 The numerical derivative of a functor. More...
class  numerical::GradientCenteredDifference< N, Functor, T >
 The numerical gradient 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).
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

Numerical differentiation with centered difference schemes.


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