A modified Gram–Schmidt sweep
Library · Source module
A modified Gram–Schmidt sweep
NLAlib.MGS.sweepRoutine is [n, k] (Q : k * n, v : n) → (v, unreported r : 1): it reduces the vector v in place against the first k columns of the packed matrix Q, with the scalar cell r as scratch. It is a routine, not a fragment of one: in-place modified Gram–Schmidt (NLAlib.MGS.factorRoutine) and the probe projection of Hutch++ both run it. Its operands are separated by block, so v may be a later column of the buffer that holds Q. The loop follows the mathematical recurrence NLAlib.MGS.mgsSweep, with no orthogonality or rank assumption.
Main definitions
* NLAlib.MGS.sweepRoutine, NLAlib.MGS.sweepSpec.
Main results
* NLAlib.MGS.sweepRoutine_meets: the sweep meets its specification. * NLAlib.MGS.sweep_writes: the same, read with the columns of Q given one by one.