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

Implements the Broyden–Fletcher–Goldfarb–Shanno algorithm. More...

#include <bfgs_api.h>

Inheritance diagram for optimo::solvers::BFGS< Scalar >:
optimo::solvers::Solver< Scalar >

Public Member Functions

TERMINATION_TYPE operator() (const ProblemLS< Scalar > &problem, Eigen::Matrix< Scalar, Eigen::Dynamic, 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>
class optimo::solvers::BFGS< Scalar >

Implements the Broyden–Fletcher–Goldfarb–Shanno algorithm.

Implementation of the Broyden–Fletcher–Goldfarb–Shanno quasi newton algorithm. This algorithm solves unconstrained problems. The implementation can be summarized as follows:

  1. Compute a descent direction by computing

    \[ \mathbf{p}_k = -H_k \nabla f_0(\mathbf{x}_k) \]

  2. Compute a step size \( t_k \)by a line search (Backtracking)
  3. Update: \( \mathbf{x}_{k+1} = \mathbf{x}_k + t_k \mathbf{p}_k \)
  4. Set \( \mathbf{s}_k = t_k \mathbf{p}_k \)
  5. Compute

    \[ \mathbf{y}_k = \nabla f_0(\mathbf{x}_{k+1}) - \nabla f_0(\mathbf{x}_k) \]

  1. Compute \( H_{k+1} \) as follows:

    \[ H_{k+1} = H_k + T_1 - T_2 \]

    where

    \begin{eqnarray*} T_1 &=& \alpha \frac{\mathbf{s}_k \mathbf{s}_k^T}{\beta^2} \\ T_2 &=& \frac{H_k \mathbf{y}_k \mathbf{s}_k^T + \mathbf{s}_k \mathbf{y}_k^T H_k} {\beta} \\ \alpha & = & \mathbf{s}_k^T \mathbf{y}_k + \mathbf{y}_k^T H_k\mathbf{y}_k \\ \beta & = & \mathbf{s}_k^T \mathbf{y} \\ \end{eqnarray*}

    and \( f_0 \) is the objective function. Further information can be found in the Wikipedia article of the BFGS this algoritm.

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