46 assert(g_it != g_end);
53 xₖ_aa =
α * G.col((*g_it).circular);
54 while (++g_it != g_end) {
55 auto [i, g_idx] = *g_it;
56 α = γ_LS(i) - γ_LS(i - 1);
57 xₖ_aa +=
α * G.col(g_idx);
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 remove_column()
Remove the leftmost column.
void add_column(const VecV &v)
Add the given column to the right.
void solve_col(const VecB &b, VecX &x) const
Solve the least squares problem Ax = b.
size_t num_columns() const
Get the number of columns that are currently stored.
CircularRange< size_t > ring_iter() const
Get iterators in the circular buffer.
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.
Eigen::Ref< mat > rmat
Default type for mutable references to matrices.
double real_t
Default floating point type.
Eigen::Ref< vec > rvec
Default type for mutable references to vectors.