num::woodbury_solver¶
Defined in header <linear/factorization/woodbury.hpp>
template <factorization F>
class woodbury_solver;
Solver for a low-rank change of a factored matrix (Woodbury): \((A + P Q^T)^{-1} b\). \(x = y - W G^{-1} P^T y\) with \(G = I + P^T W\).
Warning
References the base factorization; it must outlive the solver.
Members¶
| member | description |
|---|---|
woodbury_solver(const F &base, low_rank_update update) |
|
idx rank() const |
Return the rank \(p\) of the change. |
idx size() const |
Return the order \(n\). |
const mat<real> &left() const |
Return the left factor \(P\). |
const mat<real> &transpose_right() const |
Return \(W = A^{-T} Q\). |
const mat<real> &inverse_left() const |
Return \(A^{-1} P\), computed on first use. |
const mat<real> &transpose_right_squared() const |
Return \(A^{-T} W\), computed on first use. |
void right_solve(mat<real> &y, vec<real> &scratch) const |
Solve from the right: \(Y \leftarrow Y G^{-1}\). |
vec<real> inverse_diagonal(view<const real> base_diagonal) const |
Update the diagonal of the inverse for the change: \(\mathrm{diag}(A_{\mathrm{new}}^{-1})\). |