template<Config Conf = DefaultConfig>
class alpaqa::LBFGS< Conf >
Limited memory Broyden–Fletcher–Goldfarb–Shanno (L-BFGS) algorithm.
Definition at line 108 of file lbfgs.hpp.
|
| | LBFGS ()=default |
| |
| | LBFGS (Params params) |
| |
| | LBFGS (Params params, length_t n) |
| |
| bool | update_sy (crvec s, crvec y, real_t pₙₑₓₜᵀpₙₑₓₜ, bool forced=false) |
| | Update the inverse Hessian approximation using the new vectors sₖ = xₙₑₓₜ - xₖ and yₖ = pₙₑₓₜ - pₖ.
|
| |
| bool | update_sy_impl (const auto &s, const auto &y, real_t pₙₑₓₜᵀpₙₑₓₜ, bool forced=false) |
| |
| bool | update (crvec xₖ, crvec xₙₑₓₜ, crvec pₖ, crvec pₙₑₓₜ, Sign sign=Sign::Positive, bool forced=false) |
| | Update the inverse Hessian approximation using the new vectors xₙₑₓₜ and pₙₑₓₜ.
|
| |
| bool | apply (rvec q, real_t γ=-1) const |
| | Apply the inverse Hessian approximation to the given vector q.
|
| |
| bool | apply_masked (rvec q, real_t γ, crindexvec J) const |
| | Apply the inverse Hessian approximation to the given vector q, applying only the columns and rows of the Hessian in the index set J.
|
| |
| bool | apply_masked (rvec q, real_t γ, const std::vector< index_t > &J) const |
| | Apply the inverse Hessian approximation to the given vector q, applying only the columns and rows of the Hessian in the index set J.
|
| |
| bool | apply_masked_impl (rvec q, real_t γ, const auto &J) const |
| | Apply the inverse Hessian approximation to the given vector q, applying only the columns and rows of the Hessian in the index set J.
|
| |
| void | reset () |
| | Throw away the approximation and all previous vectors s and y.
|
| |
| void | resize (length_t n) |
| | Re-allocate storage for a problem with a different size.
|
| |
| void | scale_y (real_t factor) |
| | Scale the stored y vectors by the given factor.
|
| |
| std::string | get_name () const |
| | Get a string identifier for this accelerator.
|
| |
| const Params & | get_params () const |
| | Get the parameters.
|
| |
| length_t | n () const |
| | Get the size of the s and y vectors in the buffer.
|
| |
| length_t | history () const |
| | Get the number of previous vectors s and y stored in the buffer.
|
| |
| index_t | succ (index_t i) const |
| | Get the next index in the circular buffer of previous s and y vectors.
|
| |
| index_t | pred (index_t i) const |
| | Get the previous index in the circular buffer of s and y vectors.
|
| |
| length_t | current_history () const |
| | Get the number of previous s and y vectors currently stored in the buffer.
|
| |
| auto | s (index_t i) |
| |
| auto | s (index_t i) const |
| |
| auto | y (index_t i) |
| |
| auto | y (index_t i) const |
| |
| real_t & | ρ (index_t i) |
| |
| real_t & | ρ (index_t i) const |
| |
| real_t & | α (index_t i) |
| |
| real_t & | α (index_t i) const |
| |
| template<class F > |
| void | foreach_fwd (const F &fun) const |
| | Iterate over the indices in the history buffer, oldest first.
|
| |
| template<class F > |
| void | foreach_rev (const F &fun) const |
| | Iterate over the indices in the history buffer, newest first.
|
| |