diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-01-11 08:48:39 -0500 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-01-11 08:48:39 -0500 |
commit | 24a09ceae86590925102493fffcf3973ff2c8358 (patch) | |
tree | e3455ddcd97d84bd9115f22d33fdcecd85a07092 /test/qr.cpp | |
parent | 325da2ea3c00436a042468b77cf97ac6b61baf7d (diff) |
* Fix a bug in HouseholderQR with mixed fixed/dynamic size: must use EIGEN_SIZE_MIN instead of EIGEN_ENUM_MIN, and there are many other occurences throughout Eigen!
* HouseholderSequence:
- add shift parameter
- add essentialVector() method to start abstracting the direction
- add unit test in householder.cpp
Diffstat (limited to 'test/qr.cpp')
-rw-r--r-- | test/qr.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/test/qr.cpp b/test/qr.cpp index 3848ce0a5..f2393c13b 100644 --- a/test/qr.cpp +++ b/test/qr.cpp @@ -36,14 +36,11 @@ template<typename MatrixType> void qr(const MatrixType& m) MatrixType a = MatrixType::Random(rows,cols); HouseholderQR<MatrixType> qrOfA(a); - MatrixType r = qrOfA.matrixQR(); MatrixQType q = qrOfA.householderQ(); VERIFY_IS_UNITARY(q); - // 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 r = qrOfA.matrixQR().template triangularView<Upper>(); VERIFY_IS_APPROX(a, qrOfA.householderQ() * r); } @@ -114,7 +111,7 @@ template<typename MatrixType> void qr_verify_assert() void test_qr() { - for(int i = 0; i < 1; i++) { + for(int i = 0; i < g_repeat; i++) { CALL_SUBTEST_1( qr(MatrixXf(47,40)) ); CALL_SUBTEST_2( qr(MatrixXcd(17,7)) ); CALL_SUBTEST_3(( qr_fixedsize<Matrix<float,3,4>, 2 >() )); |