Optimo  0.1.0
A C++ header library for optimization
 All Classes Functions Variables Pages
optimo::SecantGradientFunctorLS< Scalar > Class Template Reference

Numerical Gradient Computation using the Secant Method. More...

#include <numerical_gradient.h>

Inheritance diagram for optimo::SecantGradientFunctorLS< Scalar >:
optimo::GradientFunctorLS< Scalar >

Public Member Functions

 SecantGradientFunctorLS (const ObjectiveFunctorLS< Scalar > &obj, const Scalar h)
virtual void operator() (const Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > &x, Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > *g) const
 Compute gradient.
- Public Member Functions inherited from optimo::GradientFunctorLS< Scalar >
virtual void operator() (const Matrix< Scalar, Dynamic, 1 > &x, Matrix< Scalar, Dynamic, 1 > *g) const =0
 Computes the gradient.

Detailed Description

template<typename Scalar>
class optimo::SecantGradientFunctorLS< Scalar >

Numerical Gradient Computation using the Secant Method.

This class computes the gradient using the secant method.

\[ \nabla f_0(\mathbf{x}) \approx \frac{f_0(\mathbf{x}_r) - f_0(\mathbf{x}_l)}{2*h} \]


\begin{eqnarray*} \mathbf{x}_r & = & \mathbf{x} + h\mathbb{1} \\ \mathbf{x}_l & = & \mathbf{x} - h\mathbb{1} \\ \end{eqnarray*}

and \(\mathbb{1}\) is a vector of ones.

The documentation for this class was generated from the following file: