Added a note to the Gram Schmidt code and improved some formatting.

This commit is contained in:
Hauke Heibel
2010-09-25 14:15:35 +02:00
parent 72d4d45133
commit 327ed3d1d3
2 changed files with 8 additions and 5 deletions

View File

@@ -458,6 +458,7 @@ SVD<MatrixType>& SVD<MatrixType>::compute(const MatrixType& matrix)
typename MatrixUType::ColXpr prevColVec = m_matU.col(prevCol);
colVec -= colVec.dot(prevColVec)*prevColVec;
}
// Here we can run into troubles when colVec.norm() = 0.
m_matU.col(col) = colVec.normalized();
}