diff options
author | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2011-04-15 17:39:59 +0100 |
---|---|---|
committer | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2011-04-15 17:39:59 +0100 |
commit | c9b5531d6c51fc8a4ee0b69beb42a5b8dba0b172 (patch) | |
tree | 5c90c663f92b39e9834908b9a86328db54284235 /test | |
parent | e654405900d2fa6d958bb0eefbeb8523f6a38099 (diff) |
Normalize eigenvectors returned by EigenSolver (fixes bug #249)
because the documentation says that we do this.
Also, add a unit test to cover this.
Diffstat (limited to 'test')
-rw-r--r-- | test/eigensolver_generic.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/eigensolver_generic.cpp b/test/eigensolver_generic.cpp index 26bea9b44..8476f026d 100644 --- a/test/eigensolver_generic.cpp +++ b/test/eigensolver_generic.cpp @@ -61,6 +61,7 @@ template<typename MatrixType> void eigensolver(const MatrixType& m) VERIFY_IS_APPROX(a * ei1.pseudoEigenvectors(), ei1.pseudoEigenvectors() * ei1.pseudoEigenvalueMatrix()); VERIFY_IS_APPROX(a.template cast<Complex>() * ei1.eigenvectors(), ei1.eigenvectors() * ei1.eigenvalues().asDiagonal()); + VERIFY_IS_APPROX(ei1.eigenvectors().colwise().norm(), RealVectorType::Ones(rows).transpose()); VERIFY_IS_APPROX(a.eigenvalues(), ei1.eigenvalues()); EigenSolver<MatrixType> eiNoEivecs(a, false); |