aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-12-30 04:18:40 -0500
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-12-30 04:18:40 -0500
commitdbd9c5fd50cde5d5beaae44147eca3ba11934721 (patch)
treeddd24b94e4c3b83a6aaaae11f4015e966946f113 /test
parente112ad8124ef725149ab6b5ca5c1b6c2008aadf7 (diff)
fix HouseholderSequence API, bug #50:
* remove ctors taking more than 2 ints * rename actualVectors to length * add length/shift/trans accessors/mutators
Diffstat (limited to 'test')
-rw-r--r--test/householder.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/householder.cpp b/test/householder.cpp
index 244ae8e5f..fe865b6ce 100644
--- a/test/householder.cpp
+++ b/test/householder.cpp
@@ -102,7 +102,12 @@ template<typename MatrixType> void householder(const MatrixType& m)
m2 = m1;
m2.block(shift,0,brows,cols) = qr.matrixQR();
HCoeffsVectorType hc = qr.hCoeffs().conjugate();
- HouseholderSequence<MatrixType, HCoeffsVectorType> hseq(m2, hc, false, hc.size(), shift);
+ HouseholderSequence<MatrixType, HCoeffsVectorType> hseq(m2, hc);
+ hseq.setLength(hc.size()).setShift(shift);
+ VERIFY(hseq.trans() == false);
+ VERIFY(hseq.length() == hc.size());
+ VERIFY(hseq.shift() == shift);
+
MatrixType m5 = m2;
m5.block(shift,0,brows,cols).template triangularView<StrictlyLower>().setZero();
VERIFY_IS_APPROX(hseq * m5, m1); // test applying hseq directly
@@ -112,7 +117,8 @@ template<typename MatrixType> void householder(const MatrixType& m)
// test householder sequence on the right with a shift
TMatrixType tm2 = m2.transpose();
- HouseholderSequence<TMatrixType, HCoeffsVectorType, OnTheRight> rhseq(tm2, hc, false, hc.size(), shift);
+ HouseholderSequence<TMatrixType, HCoeffsVectorType, OnTheRight> rhseq(tm2, hc);
+ rhseq.setLength(hc.size()).setShift(shift);
VERIFY_IS_APPROX(rhseq * m5, m1); // test applying rhseq directly
m3 = rhseq;
VERIFY_IS_APPROX(m3 * m5, m1); // test evaluating rhseq to a dense matrix, then applying