14 size_t m_AA = std::min(
n,
m);
30 std::string
get_name()
const {
return "AndersonAccel"; }
40 if (newest_g_idx != 0)
41 G.col(0) =
G.col(newest_g_idx);
std::string get_name() const
void initialize(crvec g₀, crvec r₀)
void compute(crvec gₖ, crvec rₖ, rvec xₖ_aa)
void resize(size_t n, size_t m)
void reinitialize(real_t γₖ, real_t old_γₖ)
Incremental QR factorization using modified Gram-Schmidt with reorthogonalization.
size_t ring_tail() const
Get the tail index of the circular buffer (points to one past the most recent element).
void resize(size_t n, size_t m)
Re-allocate storage for a problem with a different size.
void reset()
Reset all indices, clearing the Q and R matrices.
void minimize_update_anderson(LimitedMemoryQR &qr, rmat G, crvec rₖ, crvec rₖ₋₁, crvec gₖ, rvec γ_LS, rvec xₖ_aa)
Solve one step of Anderson acceleration to find a fixed point of a function g(x):
Eigen::Ref< const vec > crvec
Default type for immutable references to vectors.
realmat mat
Default type for matrices.
realvec vec
Default type for vectors.
double real_t
Default floating point type.
Eigen::Ref< vec > rvec
Default type for mutable references to vectors.
static void initialize(AndersonAccel &aa, crvec x₀, crvec x̂₀, crvec p₀, crvec grad₀)
static bool apply(AndersonAccel &aa, crvec xₖ, crvec x̂ₖ, crvec pₖ, real_t γ, rvec qₖ)
static bool update(AndersonAccel &aa, crvec xₖ, crvec xₖ₊₁, crvec pₖ, crvec pₖ₊₁, crvec grad_new, const Box &C, real_t γ_new)
static void changed_γ(AndersonAccel &aa, real_t γₖ, real_t old_γₖ)