NLA-lib Explorer

Test case: classical Gram–Schmidt in finite precision, one column

Library · Source module

Test case: classical Gram–Schmidt in finite precision, one column

NLAlib.Ops.Examples.cgsCol computes column j of the factorization A = Q R of an n × p matrix stored by columns: the coefficients r_ij := q_iᵀ a_j (cgsDots), the work vector v := a_j, the updates v := v - r_ij q_i (cgsProj), r_jj := ‖v‖, v := v / r_jj, q_j := v. It calls dot, copy, axpy, nrm2, scal and the scalar negation.

Main results

* NLAlib.Ops.Examples.cgsCol_writes: the column as one block specification, for every interpretation satisfying the contracts: the store changes only in column j of R (up to the diagonal), column j of Q and the two scratch buffers, and the new entries are described by NLAlib.Ops.Examples.CgsCol. Proved in the program logic (NLAlib.Ops.Logic): a relational fill (the coefficients), a loop of updates and three steps.

Declarations