Normalize eigenvectors returned by EigenSolver (fixes bug #249)

because the documentation says that we do this.
Also, add a unit test to cover this.
This commit is contained in:
Jitse Niesen
2011-04-15 17:39:59 +01:00
parent e654405900
commit c9b5531d6c
2 changed files with 2 additions and 0 deletions

View File

@@ -343,6 +343,7 @@ typename EigenSolver<MatrixType>::EigenvectorsType EigenSolver<MatrixType>::eige
{
// we have a real eigen value
matV.col(j) = m_eivec.col(j).template cast<ComplexScalar>();
matV.col(j).normalize();
}
else
{