#include <NumericalDiff.h>
Public Types | |
enum | { InputsAtCompileTime = Functor::InputsAtCompileTime, ValuesAtCompileTime = Functor::ValuesAtCompileTime } |
typedef _Functor | Functor |
typedef Functor::InputType | InputType |
typedef Functor::JacobianType | JacobianType |
typedef Functor::Scalar | Scalar |
typedef Functor::ValueType | ValueType |
Public Member Functions | |
int | df (const InputType &_x, JacobianType &jac) const |
NumericalDiff (Scalar _epsfcn=0.) | |
NumericalDiff (const Functor &f, Scalar _epsfcn=0.) | |
template<typename T0 > | |
NumericalDiff (const T0 &a0) | |
template<typename T0 , typename T1 > | |
NumericalDiff (const T0 &a0, const T1 &a1) | |
template<typename T0 , typename T1 , typename T2 > | |
NumericalDiff (const T0 &a0, const T1 &a1, const T1 &a2) | |
Private Member Functions | |
NumericalDiff & | operator= (const NumericalDiff &) |
Private Attributes | |
Scalar | epsfcn |
This class allows you to add a method df() to your functor, which will use numerical differentiation to compute an approximate of the derivative for the functor. Of course, if you have an analytical form for the derivative, you should rather implement df() by yourself.
More information on http://en.wikipedia.org/wiki/Numerical_differentiation
Currently only "Forward" and "Central" scheme are implemented.
Definition at line 49 of file NumericalDiff.h.
typedef _Functor NumericalDiff< _Functor, mode >::Functor |
Definition at line 52 of file NumericalDiff.h.
typedef Functor::InputType NumericalDiff< _Functor, mode >::InputType |
Definition at line 54 of file NumericalDiff.h.
typedef Functor::JacobianType NumericalDiff< _Functor, mode >::JacobianType |
Definition at line 56 of file NumericalDiff.h.
typedef Functor::Scalar NumericalDiff< _Functor, mode >::Scalar |
Definition at line 53 of file NumericalDiff.h.
typedef Functor::ValueType NumericalDiff< _Functor, mode >::ValueType |
Definition at line 55 of file NumericalDiff.h.
anonymous enum |
Definition at line 69 of file NumericalDiff.h.
NumericalDiff< _Functor, mode >::NumericalDiff | ( | Scalar | _epsfcn = 0. | ) | [inline] |
Definition at line 58 of file NumericalDiff.h.
NumericalDiff< _Functor, mode >::NumericalDiff | ( | const Functor & | f, |
Scalar | _epsfcn = 0. |
||
) | [inline] |
Definition at line 59 of file NumericalDiff.h.
NumericalDiff< _Functor, mode >::NumericalDiff | ( | const T0 & | a0 | ) | [inline] |
Definition at line 63 of file NumericalDiff.h.
NumericalDiff< _Functor, mode >::NumericalDiff | ( | const T0 & | a0, |
const T1 & | a1 | ||
) | [inline] |
Definition at line 65 of file NumericalDiff.h.
NumericalDiff< _Functor, mode >::NumericalDiff | ( | const T0 & | a0, |
const T1 & | a1, | ||
const T1 & | a2 | ||
) | [inline] |
Definition at line 67 of file NumericalDiff.h.
int NumericalDiff< _Functor, mode >::df | ( | const InputType & | _x, |
JacobianType & | jac | ||
) | const [inline] |
return the number of evaluation of functor
Definition at line 77 of file NumericalDiff.h.
NumericalDiff& NumericalDiff< _Functor, mode >::operator= | ( | const NumericalDiff< _Functor, mode > & | ) | [private] |
Scalar NumericalDiff< _Functor, mode >::epsfcn [private] |
Definition at line 132 of file NumericalDiff.h.