num::low_rank_difference¶
Defined in header <linear/factorization/woodbury.hpp>
low_rank_update low_rank_difference(const spmat &base, const spmat ¤t,
view<const idx> changed);
Express \(B - A\) as \(PQ^{T}\) when the two differ only in the listed rows and columns.
Changing k indices of a square matrix touches at most k rows and k columns, so the difference has rank at most 2k. The first k columns of P are the corresponding unit vectors and carry the changed rows in Q; the last k columns of Q are the unit vectors and carry the changed columns in P, excluding entries a changed row already accounts for.