diff options
author | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2010-06-04 09:40:35 +0100 |
---|---|---|
committer | Jitse Niesen <jitse@maths.leeds.ac.uk> | 2010-06-04 09:40:35 +0100 |
commit | 1ff1bd69acc8f2d50348a57855c8ec35521590bd (patch) | |
tree | e5b3b1f7143bfdab3d1910f4f157552a8ad23b4b | |
parent | 9178e2bd54f64febb43025b9710387d2e98fea34 (diff) |
Schur decomposition of 1-by-1 always converges.
-rw-r--r-- | test/schur_complex.cpp | 11 | ||||
-rw-r--r-- | test/schur_real.cpp | 11 |
2 files changed, 14 insertions, 8 deletions
diff --git a/test/schur_complex.cpp b/test/schur_complex.cpp index 67c41d41f..7c4dcb21a 100644 --- a/test/schur_complex.cpp +++ b/test/schur_complex.cpp @@ -68,10 +68,13 @@ template<typename MatrixType> void schur(int size = MatrixType::ColsAtCompileTim VERIFY_IS_EQUAL(cs1.matrixT(), csOnlyT.matrixT()); VERIFY_RAISES_ASSERT(csOnlyT.matrixU()); - // Test matrix with NaN - A(0,0) = std::numeric_limits<typename MatrixType::RealScalar>::quiet_NaN(); - ComplexSchur<MatrixType> csNaN(A); - VERIFY_IS_EQUAL(csNaN.info(), NoConvergence); + if (size > 1) + { + // Test matrix with NaN + A(0,0) = std::numeric_limits<typename MatrixType::RealScalar>::quiet_NaN(); + ComplexSchur<MatrixType> csNaN(A); + VERIFY_IS_EQUAL(csNaN.info(), NoConvergence); + } } void test_schur_complex() diff --git a/test/schur_real.cpp b/test/schur_real.cpp index 1e8c4b0ba..2eae52956 100644 --- a/test/schur_real.cpp +++ b/test/schur_real.cpp @@ -85,10 +85,13 @@ template<typename MatrixType> void schur(int size = MatrixType::ColsAtCompileTim VERIFY_IS_EQUAL(rs1.matrixT(), rsOnlyT.matrixT()); VERIFY_RAISES_ASSERT(rsOnlyT.matrixU()); - // Test matrix with NaN - A(0,0) = std::numeric_limits<typename MatrixType::Scalar>::quiet_NaN(); - RealSchur<MatrixType> rsNaN(A); - VERIFY_IS_EQUAL(rsNaN.info(), NoConvergence); + if (size > 1) + { + // Test matrix with NaN + A(0,0) = std::numeric_limits<typename MatrixType::Scalar>::quiet_NaN(); + RealSchur<MatrixType> rsNaN(A); + VERIFY_IS_EQUAL(rsNaN.info(), NoConvergence); + } } void test_schur_real() |