69 assert(g_it != g_end);
76 xₖ_aa = α * G̃.col((*g_it).circular);
77 while (++g_it != g_end) {
78 auto [i, g_idx] = *g_it;
79 α = γ_LS(i) - γ_LS(i - 1);
80 xₖ_aa += α * G̃.col(g_idx);
Incremental QR factorization using modified Gram-Schmidt with reorthogonalization.
CircularRange< index_t > ring_iter() const
Get iterators in the circular buffer.
length_t num_columns() const
Get the number of columns that are currently stored.
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, real_t tol=0) const
Solve the least squares problem Ax = b.
index_t ring_tail() const
Get the tail index of the circular buffer (points to one past the most recent element).
real_t get_max_eig() const
Get the maximum eigenvalue of R.
void minimize_update_anderson(LimitedMemoryQR &qr, rmat G̃, crvec rₖ, crvec rₗₐₛₜ, crvec gₖ, real_t min_div, 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.