From 9f21e2aab7953b84c323258177b615ea6cff91ce Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Tue, 17 Nov 2009 08:14:54 -0500 Subject: port the QR module to PermutationMatrix --- test/qr_fullpivoting.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'test/qr_fullpivoting.cpp') diff --git a/test/qr_fullpivoting.cpp b/test/qr_fullpivoting.cpp index 65d9a071f..c82ba4c7e 100644 --- a/test/qr_fullpivoting.cpp +++ b/test/qr_fullpivoting.cpp @@ -51,11 +51,8 @@ template void qr() // FIXME need better way to construct trapezoid for(int i = 0; i < rows; i++) for(int j = 0; j < cols; j++) if(i>j) r(i,j) = Scalar(0); - MatrixType b = qr.matrixQ() * r; + MatrixType c = qr.matrixQ() * r * qr.colsPermutation().inverse(); - MatrixType c = MatrixType::Zero(rows,cols); - - for(int i = 0; i < cols; ++i) c.col(qr.colsPermutation().coeff(i)) = b.col(i); VERIFY_IS_APPROX(m1, c); MatrixType m2 = MatrixType::Random(cols,cols2); -- cgit v1.2.3