#include <gradientFunction.h>
Collaboration diagram for dlr::optimization::GradientFunction< Functor >:

Public Member Functions | |
| GradientFunction (const Functor &functor, double epsilon=1.0e-6) | |
| This is the default constructor. | |
| virtual | ~GradientFunction () |
| Destructor. | |
| Functor::argument_type | gradient (const typename Functor::argument_type &theta) |
| This method numerically approximates the gradient of this->operator() by divided differences. | |
| Functor::result_type | operator() (const typename Functor::argument_type &theta) |
| This method evaluates the function value a the specified point. | |
Template argument Functor is assumed to be a subclass of std::unary_function. Functor::result_type is assumed to be a continuous scalar type. Functor::argument_type is assumed to be a vector or 1D array type which supports the following interface:
argument_type(size_t N): construct an N-element vector. size_t size(): return the number of elements in the vector. element_type& operator[](size_t i): return a reference to the (i)th element of the array. const element_type& operator[](size_t i) const: return a const reference to the (i)th element of the array.
It is further assumed that element type of argument_type is a continuous scalar, and can be implicitly cast to and from double.
Definition at line 49 of file gradientFunction.h.
| dlr::optimization::GradientFunction< Functor >::GradientFunction | ( | const Functor & | functor, | |
| double | epsilon = 1.0e-6 | |||
| ) | [inline] |
This is the default constructor.
| functor | This argument is the function object to be adapted. | |
| epsilon | If the gradient() method is not overridden in a subclass, the gradient will be computed by using symmetric divided differences with a total step size of 2 * epsilon. |
Definition at line 64 of file gradientFunction.h.
References DLR_THROW3.
| virtual dlr::optimization::GradientFunction< Functor >::~GradientFunction | ( | ) | [inline, virtual] |
| Functor::argument_type dlr::optimization::GradientFunction< Functor >::gradient | ( | const typename Functor::argument_type & | theta | ) | [inline] |
This method numerically approximates the gradient of this->operator() by divided differences.
This method should often be overridden by a subclass.
| theta | The point around which to compute the gradient. |
Definition at line 133 of file gradientFunction.h.
| Functor::result_type dlr::optimization::GradientFunction< Functor >::operator() | ( | const typename Functor::argument_type & | theta | ) | [inline] |
This method evaluates the function value a the specified point.
| theta | The point at which to evaluate the function. |
Definition at line 95 of file gradientFunction.h.
1.5.2