aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/qr_colpivoting.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2009-09-16 15:56:20 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2009-09-16 15:56:20 +0200
commit24950bdfcb60830bc615220f993c12082dd42059 (patch)
treef4e3321a8a7461f239320ee27d3c7f559d6206c9 /test/qr_colpivoting.cpp
parent49dd5d7847e4439f30de37de8372c9483b63b425 (diff)
make ColPivotingQR use HouseholderSequence
Diffstat (limited to 'test/qr_colpivoting.cpp')
-rw-r--r--test/qr_colpivoting.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/qr_colpivoting.cpp b/test/qr_colpivoting.cpp
index 9c387005a..588a41e56 100644
--- a/test/qr_colpivoting.cpp
+++ b/test/qr_colpivoting.cpp
@@ -42,18 +42,18 @@ template<typename MatrixType> void qr()
VERIFY(!qr.isInjective());
VERIFY(!qr.isInvertible());
VERIFY(!qr.isSurjective());
-
+
MatrixType r = qr.matrixQR();
// 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 = 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);
MatrixType m3 = m1*m2;
m2 = MatrixType::Random(cols,cols2);