#include <alpaqa/inner/directions/decl/lbfgs.hpp>
Limited memory Broyden–Fletcher–Goldfarb–Shanno (L-BFGS) algorithm.
Definition at line 29 of file decl/lbfgs.hpp.
|
| LBFGS (Params params) |
|
| LBFGS (Params params, size_t n) |
|
bool | update (crvec xₖ, crvec xₖ₊₁, crvec pₖ, crvec pₖ₊₁, Sign sign, bool forced=false) |
| Update the inverse Hessian approximation using the new vectors xₖ₊₁ and pₖ₊₁. More...
|
|
template<class Vec > |
bool | apply (Vec &&q, real_t γ) |
| Apply the inverse Hessian approximation to the given vector q. More...
|
|
template<class Vec , class IndexVec > |
bool | apply (Vec &&q, real_t γ, const IndexVec &J) |
| Apply the inverse Hessian approximation to the given vector q, applying only the columns and rows of the Hessian in the index set J. More...
|
|
void | reset () |
| Throw away the approximation and all previous vectors s and y. More...
|
|
void | resize (size_t n) |
| Re-allocate storage for a problem with a different size. More...
|
|
void | scale_y (real_t factor) |
| Scale the stored y vectors by the given factor. More...
|
|
std::string | get_name () const |
|
const Params & | get_params () const |
|
size_t | n () const |
| Get the size of the s and y vectors in the buffer. More...
|
|
size_t | history () const |
| Get the number of previous vectors s and y stored in the buffer. More...
|
|
size_t | succ (size_t i) const |
| Get the next index in the circular buffer of previous s and y vectors. More...
|
|
auto | s (size_t i) |
|
auto | s (size_t i) const |
|
auto | y (size_t i) |
|
auto | y (size_t i) const |
|
real_t & | ρ (size_t i) |
|
const real_t & | ρ (size_t i) const |
|
real_t & | α (size_t i) |
|
const real_t & | α (size_t i) const |
|
◆ Params
◆ storage_t
◆ Sign
The sign of the vectors \( p \) passed to the LBFGS::update method.
Enumerator |
---|
Positive | \( p \sim \nabla \psi(x) \)
|
Negative | \( p \sim -\nabla \psi(x) \)
|
Definition at line 35 of file decl/lbfgs.hpp.
◆ LBFGS() [1/2]
◆ LBFGS() [2/2]
◆ update_valid()
Check if the new vectors s and y allow for a valid BFGS update that preserves the positive definiteness of the Hessian approximation.
Definition at line 9 of file lbfgs.hpp.
◆ update()
Update the inverse Hessian approximation using the new vectors xₖ₊₁ and pₖ₊₁.
Definition at line 33 of file lbfgs.hpp.
◆ apply() [1/2]
bool apply |
( |
Vec && |
q, |
|
|
real_t |
γ |
|
) |
| |
Apply the inverse Hessian approximation to the given vector q.
Definition at line 59 of file lbfgs.hpp.
◆ apply() [2/2]
bool apply |
( |
Vec && |
q, |
|
|
real_t |
γ, |
|
|
const IndexVec & |
J |
|
) |
| |
Apply the inverse Hessian approximation to the given vector q, applying only the columns and rows of the Hessian in the index set J.
Definition at line 99 of file lbfgs.hpp.
◆ reset()
Throw away the approximation and all previous vectors s and y.
Definition at line 183 of file lbfgs.hpp.
◆ resize()
Re-allocate storage for a problem with a different size.
Causes a reset.
Definition at line 188 of file lbfgs.hpp.
◆ scale_y()
Scale the stored y vectors by the given factor.
Definition at line 195 of file lbfgs.hpp.
◆ get_name()
std::string get_name |
( |
| ) |
const |
|
inline |
◆ get_params()
const Params & get_params |
( |
| ) |
const |
|
inline |
◆ n()
Get the size of the s and y vectors in the buffer.
Definition at line 76 of file decl/lbfgs.hpp.
◆ history()
Get the number of previous vectors s and y stored in the buffer.
Definition at line 78 of file decl/lbfgs.hpp.
◆ succ()
size_t succ |
( |
size_t |
i | ) |
const |
|
inline |
Get the next index in the circular buffer of previous s and y vectors.
Definition at line 80 of file decl/lbfgs.hpp.
◆ s() [1/2]
◆ s() [2/2]
◆ y() [1/2]
◆ y() [2/2]
◆ ρ() [1/2]
◆ ρ() [2/2]
const real_t & ρ |
( |
size_t |
i | ) |
const |
|
inline |
◆ α() [1/2]
◆ α() [2/2]
const real_t & α |
( |
size_t |
i | ) |
const |
|
inline |
◆ sto
◆ idx
◆ full
◆ params
The documentation for this class was generated from the following files: