diff options
Diffstat (limited to 'test/qr_fullpivoting.cpp')
-rw-r--r-- | test/qr_fullpivoting.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
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<typename MatrixType> 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); |