diff options
Diffstat (limited to 'test/sparseqr.cpp')
-rw-r--r-- | test/sparseqr.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/sparseqr.cpp b/test/sparseqr.cpp index 66c7c005e..6edba30b2 100644 --- a/test/sparseqr.cpp +++ b/test/sparseqr.cpp @@ -71,6 +71,14 @@ template<typename Scalar> void test_sparseqr_scalar() VERIFY((dA * refX - b).norm() * 2 > (A * x - b).norm() ); else VERIFY_IS_APPROX(x, refX); + + // Compute explicitly the matrix Q + MatrixType Q, QtQ, idM; + Q = solver.matrixQ(); + //Check ||Q' * Q - I || + QtQ = Q * Q.adjoint(); + idM.resize(Q.rows(), Q.rows()); idM.setIdentity(); + VERIFY(idM.isApprox(QtQ)); } void test_sparseqr() { |