From 80b513378948f78bc7729c431eb68ca5513a1d62 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 6 Oct 2016 09:55:50 +0200 Subject: Fix compilation of qr.inverse() for column and full pivoting variants. --- test/qr_fullpivoting.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/qr_fullpivoting.cpp') diff --git a/test/qr_fullpivoting.cpp b/test/qr_fullpivoting.cpp index 05a705887..70e89c198 100644 --- a/test/qr_fullpivoting.cpp +++ b/test/qr_fullpivoting.cpp @@ -54,6 +54,18 @@ template void qr() m2 = MatrixType::Random(cols,cols2); m2 = qr.solve(m3); VERIFY_IS_APPROX(m3, m1*m2); + + { + Index size = rows; + do { + m1 = MatrixType::Random(size,size); + qr.compute(m1); + } while(!qr.isInvertible()); + MatrixType m1_inv = qr.inverse(); + m3 = m1 * MatrixType::Random(size,cols2); + m2 = qr.solve(m3); + VERIFY_IS_APPROX(m2, m1_inv*m3); + } } template void qr_invertible() -- cgit v1.2.3