compbio
|
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. More...
#include <NumericalDiff.h>
Public Member Functions | |
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 T2 &a2) | |
int | df (const InputType &_x, JacobianType &jac) const |
return the number of evaluation of functor | |
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.