46 [[maybe_unused]]
crvec Σ, [[maybe_unused]]
real_t γ_0,
47 [[maybe_unused]]
crvec x_0, [[maybe_unused]]
crvec x̂_0,
48 [[maybe_unused]]
crvec p_0,
49 [[maybe_unused]]
crvec grad_ψx_0) {
59 [[maybe_unused]]
crvec grad_ψxₖ,
60 [[maybe_unused]]
crvec grad_ψxₙₑₓₜ) {
67 [[maybe_unused]]
crvec grad_ψxₖ,
rvec qₖ)
const {
85 return "LBFGSDirection<" + std::string(config_t::get_name()) +
'>';
LBFGSParams< config_t > Params
const Params & get_params() const
Get the parameters.
void resize(length_t n)
Re-allocate storage for a problem with a different size.
void reset()
Throw away the approximation and all previous vectors s and y.
bool apply(rvec q, real_t γ=-1) const
Apply the inverse Hessian approximation to the given vector q.
void scale_y(real_t factor)
Scale the stored y vectors by the given factor.
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ₙₑₓₜ.
length_t get_n() const
[Required] Number of decision variables.
#define USING_ALPAQA_CONFIG(Conf)
typename Conf::real_t real_t
bool rescale_on_step_size_changes
typename Conf::crvec crvec
Parameters for the LBFGSDirection class.
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ₙₑₓₜ)
LBFGSDirection(const LBFGS &lbfgs, const DirectionParams &directionparams={})
typename LBFGS::Params AcceleratorParams
LBFGSDirection(LBFGS &&lbfgs, 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)
bool apply(real_t γₖ, crvec xₖ, crvec x̂ₖ, crvec pₖ, crvec grad_ψxₖ, rvec qₖ) const
bool has_initial_direction() const
AcceleratorParams accelerator
LBFGSDirection(const Params ¶ms)
LBFGSDirection(const typename LBFGS::Params ¶ms, const DirectionParams &directionparams={})