diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-12-02 11:11:09 -0500 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-12-02 11:11:09 -0500 |
commit | 3e73f6036c4f28ae8d11ae43641c213e608529e6 (patch) | |
tree | f9287eac5106ed6618f7b58b4dc8ab311b186bb2 /test/qr.cpp | |
parent | 3279e3934013d28b3870dd861eb64aec241a38b7 (diff) |
* HouseholderSequence:
* be aware of number of actual householder vectors
(optimization in non-full-rank case, no behavior change)
* fix applyThisOnTheRight, it was using k instead of actual_k
* QR: rename matrixQ() to householderQ() where applicable
Diffstat (limited to 'test/qr.cpp')
-rw-r--r-- | test/qr.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/qr.cpp b/test/qr.cpp index 90b5c4446..3848ce0a5 100644 --- a/test/qr.cpp +++ b/test/qr.cpp @@ -38,13 +38,13 @@ template<typename MatrixType> void qr(const MatrixType& m) HouseholderQR<MatrixType> qrOfA(a); MatrixType r = qrOfA.matrixQR(); - MatrixQType q = qrOfA.matrixQ(); + 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); - VERIFY_IS_APPROX(a, qrOfA.matrixQ() * r); + VERIFY_IS_APPROX(a, qrOfA.householderQ() * r); } template<typename MatrixType, int Cols2> void qr_fixedsize() @@ -58,7 +58,7 @@ template<typename MatrixType, int Cols2> void qr_fixedsize() // 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); - VERIFY_IS_APPROX(m1, qr.matrixQ() * r); + VERIFY_IS_APPROX(m1, qr.householderQ() * r); Matrix<Scalar,Cols,Cols2> m2 = Matrix<Scalar,Cols,Cols2>::Random(Cols,Cols2); Matrix<Scalar,Rows,Cols2> m3 = m1*m2; @@ -93,7 +93,7 @@ template<typename MatrixType> void qr_invertible() m1.setZero(); for(int i = 0; i < size; i++) m1(i,i) = ei_random<Scalar>(); RealScalar absdet = ei_abs(m1.diagonal().prod()); - m3 = qr.matrixQ(); // get a unitary + m3 = qr.householderQ(); // get a unitary m1 = m3 * m1 * m3; qr.compute(m1); VERIFY_IS_APPROX(absdet, qr.absDeterminant()); @@ -107,7 +107,7 @@ template<typename MatrixType> void qr_verify_assert() HouseholderQR<MatrixType> qr; VERIFY_RAISES_ASSERT(qr.matrixQR()) VERIFY_RAISES_ASSERT(qr.solve(tmp)) - VERIFY_RAISES_ASSERT(qr.matrixQ()) + VERIFY_RAISES_ASSERT(qr.householderQ()) VERIFY_RAISES_ASSERT(qr.absDeterminant()) VERIFY_RAISES_ASSERT(qr.logAbsDeterminant()) } |