45template <Config Conf = DefaultConfig>
83 const bool force =
true;
84 return lbfgs.
update(xₖ, xₙₑₓₜ, grad_ψxₖ, grad_ψxₙₑₓₜ,
102 return "StructuredLBFGSDirection<" + std::string(config_t::get_name()) +
115 std::optional<crvec>
y = std::nullopt;
116 std::optional<crvec>
Σ = std::nullopt;
118 std::optional<vec>
y = std::nullopt;
119 std::optional<vec>
Σ = std::nullopt;
140#ifdef ALPAQA_WITH_QUAD_PRECISION
LBFGSParams< config_t > Params
const Params & get_params() const
Get the parameters.
void reset()
Throw away the approximation and all previous vectors s and y.
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ₙₑₓₜ.
#define USING_ALPAQA_CONFIG(Conf)
#define ALPAQA_EXPORT_EXTERN_TEMPLATE(...)
typename Conf::indexvec indexvec
typename Conf::real_t real_t
typename Conf::crvec crvec
typename Conf::crindexvec crindexvec
Double-precision double configuration.
Single-precision float configuration.
long double configuration.
Parameters for the StructuredLBFGSDirection class.
bool hessian_vec
Set this option to true to include the Hessian-vector product from equation 12b in ,...
bool full_augmented_hessian
If both hessian_vec and hessian_vec_finite_differences are true, set this option to true to compute t...
bool hessian_vec_finite_differences
If hessian_vec is true, set this option to true to approximate that term using finite differences ins...
@ FallbackToProjectedGradient
If L-BFGS fails, propagate the failure and tell PANOC that no accelerated step is available,...
@ UseScaledLBFGSInput
If L-BFGS fails, return as the accelerated step (effectively approximating ).
enum alpaqa::StructuredLBFGSDirectionParams::FailurePolicy failure_policy
What to do when L-BFGS failed (e.g.
std::string get_name() const
void changed_γ(real_t γₖ, real_t old_γₖ)
DirectionParams direction_params
DirectionParams direction
bool update(real_t γₖ, real_t γₙₑₓₜ, crvec xₖ, crvec xₙₑₓₜ, crvec pₖ, crvec pₙₑₓₜ, crvec grad_ψxₖ, crvec grad_ψxₙₑₓₜ)
StructuredLBFGSDirection(LBFGS &&lbfgs, const DirectionParams &directionparams={})
typename LBFGS::Params AcceleratorParams
StructuredLBFGSDirection(const LBFGS &lbfgs, const DirectionParams &directionparams={})
StructuredLBFGSDirection(const Params ¶ms)
StructuredLBFGSDirection(const typename LBFGS::Params ¶ms, const DirectionParams &directionparams={})
void initialize(const Problem &problem, crvec y, crvec Σ, real_t γ_0, crvec x_0, crvec x̂_0, crvec p_0, crvec grad_ψx_0)
void approximate_hessian_vec_term(crvec xₖ, crvec grad_ψxₖ, rvec qₖ, crindexvec J) const
bool apply(real_t γₖ, crvec xₖ, crvec x̂ₖ, crvec pₖ, crvec grad_ψxₖ, rvec qₖ) const
bool has_initial_direction() const
StructuredLBFGSDirection()=default
AcceleratorParams accelerator
TypeErasedProblem< config_t > Problem