Skip to content

num::dispatch::subspace::mgs_orthogonalize

Defined in header <linear/subspace.hpp>

real mgs_orthogonalize(const array<vec<real>> &basis, vec<real> &v, array<real> &h,
                       idx k);  // (1)

real mgs_orthogonalize(const mat<real> &basis, idx k, vec<real> &v);  // (2)

(1) Modified Gram–Schmidt orthogonalization against basis vectors \(\mathbf{v}_0, \dots, \mathbf{v}_{k-1}\).

(2) Modified Gram–Schmidt orthogonalization against columns \(0, \dots, k-1\) of a row-major matrix.