Optimo  0.1.0
A C++ header library for optimization
 All Classes Functions Variables Pages
optimo::solvers::GradientDescent< Scalar, m, n > Class Template Reference

Standard Gradient Descent method. More...

#include <gradient_descent.h>

Inheritance diagram for optimo::solvers::GradientDescent< Scalar, m, n >:
optimo::solvers::Solver< Scalar >

Public Member Functions

 GradientDescent (const Scalar step_size=1e-3)
 Constructor. More...
 
TERMINATION_TYPE operator() (const Problem< Scalar, m, n > &problem, Eigen::Matrix< Scalar, n, 1 > *x, Scalar *min_value)
 Solve the problem.
 

Additional Inherited Members

- Public Attributes inherited from optimo::solvers::Solver< Scalar >
struct
optimo::solvers::Solver::Options 
options
 Solver parameters.
 

Detailed Description

template<typename Scalar, uint m, uint n>
class optimo::solvers::GradientDescent< Scalar, m, n >

Standard Gradient Descent method.

This class implements the following procedure:

  1. Computes a descent direction \(\mathbf{g}_k=-\nabla f_0(\mathbf{x}_k)\)
  2. Stop if the norm of the gradient is \(\|\mathbf{g}_k\|\leq\epsilon\)
  3. Take a step in the descent direction

    \[ \mathbf{x}_{k + 1} = \mathbf{x}_k + \alpha\mathbf{g}_k \]

where \(\alpha\) is the step size.

This implementation works well for small problems that fit in the stack m < 16, n < 16. If the problem does not fit in the stack, consider using the GradientDescentLS class.

Constructor & Destructor Documentation

template<typename Scalar , uint m, uint n>
optimo::solvers::GradientDescent< Scalar, m, n >::GradientDescent ( const Scalar  step_size = 1e-3)
inlineexplicit

Constructor.

Parameters
step_sizeStep size

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