aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Jitse Niesen <jitse@maths.leeds.ac.uk>2011-04-15 17:39:59 +0100
committerGravatar Jitse Niesen <jitse@maths.leeds.ac.uk>2011-04-15 17:39:59 +0100
commitc9b5531d6c51fc8a4ee0b69beb42a5b8dba0b172 (patch)
tree5c90c663f92b39e9834908b9a86328db54284235 /test
parente654405900d2fa6d958bb0eefbeb8523f6a38099 (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.cpp1
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);