bring the modern comfort also to ColPivotingHouseholderQR

+ some fixes in FullPivotingHouseholderQR
This commit is contained in:
Benoit Jacob
2009-08-24 11:11:41 -04:00
parent 3288e5157a
commit 0eb142f559
4 changed files with 196 additions and 20 deletions

View File

@@ -28,7 +28,6 @@
template<typename MatrixType> void qr()
{
/* this test covers the following files: QR.h */
int rows = ei_random<int>(20,200), cols = ei_random<int>(20,200), cols2 = ei_random<int>(20,200);
int rank = ei_random<int>(1, std::min(rows, cols)-1);
@@ -44,7 +43,6 @@ template<typename MatrixType> void qr()
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);
@@ -110,6 +108,12 @@ template<typename MatrixType> void qr_verify_assert()
VERIFY_RAISES_ASSERT(qr.matrixR())
VERIFY_RAISES_ASSERT(qr.solve(tmp,&tmp))
VERIFY_RAISES_ASSERT(qr.matrixQ())
VERIFY_RAISES_ASSERT(qr.dimensionOfKernel())
VERIFY_RAISES_ASSERT(qr.isInjective())
VERIFY_RAISES_ASSERT(qr.isSurjective())
VERIFY_RAISES_ASSERT(qr.isInvertible())
VERIFY_RAISES_ASSERT(qr.computeInverse(&tmp))
VERIFY_RAISES_ASSERT(qr.inverse())
}
void test_qr_fullpivoting()