89 return "AndersonDirection<" + std::string(config_t::get_name()) +
'>';
void compute(crvec gₖ, crvec rₖ, rvec xₖ_aa)
Compute the accelerated iterate , given the function value at the current iterate and the correspond...
const Params & get_params() const
Get the parameters.
void initialize(crvec g_0, crvec r_0)
Call this function on the first iteration to initialize the accelerator.
void resize(length_t n)
Change the problem dimension.
void reset()
Reset the accelerator (but keep the last function value and residual, so calling initialize is not ne...
AndersonAccelParams< config_t > Params
void scale_R(real_t scal)
Scale the factorization.
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 AndersonDirection class.
AndersonDirection(AndersonAccel &&anderson, const DirectionParams &directionparams={})
std::string get_name() const
void changed_γ(real_t γₖ, real_t old_γₖ)
AndersonDirection(const typename AndersonAccel::Params ¶ms, const DirectionParams &directionparams={})
AndersonDirection()=default
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ₙₑₓₜ)
typename AndersonAccel::Params AcceleratorParams
AndersonDirection(const Params ¶ms)
AndersonDirection(const AndersonAccel &anderson, 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