Template Function gram_schmidt¶
Defined in File vector_num.hpp
Function Documentation¶
-
template<typename T>
void gram_schmidt(vector<vector<T>> &b, size_t k, double accur = 1.0e-12)¶ Performs the modified Gram-Schmidt method on the set of vectors b, assuming that the first k are already orthonormal When a vector has zero norm, it drops it from the list.
the list returned has the correct number of nonzero vectors
- Parameters:
b – basis to orthonormalize
k – index of the vector where to start the procedure
accur – accuracy that sets a vector to a null vector