diff options
author | Desire NUENTSA <desire.nuentsa_wakam@inria.fr> | 2013-05-21 17:35:10 +0200 |
---|---|---|
committer | Desire NUENTSA <desire.nuentsa_wakam@inria.fr> | 2013-05-21 17:35:10 +0200 |
commit | cf939f154fe1ec9904276f5f3f2dbdbc8e98156a (patch) | |
tree | 7f68884a51d66a3bc1272c660f6436b5e8ecacda /test/sparseqr.cpp | |
parent | bd7511fc3651c70d20473dc0c6beab3013fd229a (diff) |
Fix bug #596 : Recover plain SparseMatrix from SparseQR matrixQ()
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() { |