50template <Config Conf = DefaultConfig>
88 const bool force =
true;
107 return "StructuredLBFGSDirection<" + std::string(config_t::get_name()) +
120 std::optional<crvec>
y = std::nullopt;
121 std::optional<crvec>
Σ = std::nullopt;
123 std::optional<vec>
y = std::nullopt;
124 std::optional<vec>
Σ = std::nullopt;
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_IF_QUADF(...)
#define ALPAQA_IF_LONGD(...)
#define ALPAQA_IF_FLOAT(...)
#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.
real_t hessian_vec_factor
Set this option to a nonzero value to include the Hessian-vector product from equation 12b in ,...
bool full_augmented_hessian
If hessian_vec_factor is nonzero and hessian_vec_finite_differences is true, set this option to true ...
bool hessian_vec_finite_differences
If hessian_vec_factor is nonzero, set this option to true to approximate that term using finite diffe...
@ 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