mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
big huge changes, so i dont remember everything.
* renaming, e.g. LU ---> FullPivLU * split tests framework: more robust, e.g. dont generate empty tests if a number is skipped * make all remaining tests use that splitting, as needed. * Fix 4x4 inversion (see stable branch) * Transform::inverse() and geo_transform test : adapt to new inverse() API, it was also trying to instantiate inverse() for 3x4 matrices. * CMakeLists: more robust regexp to parse the version number * misc fixes in unit tests
This commit is contained in:
@@ -36,7 +36,7 @@ template<typename MatrixType> void qr()
|
||||
typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, 1> VectorType;
|
||||
MatrixType m1;
|
||||
createRandomMatrixOfRank(rank,rows,cols,m1);
|
||||
FullPivotingHouseholderQR<MatrixType> qr(m1);
|
||||
FullPivHouseholderQR<MatrixType> qr(m1);
|
||||
VERIFY_IS_APPROX(rank, qr.rank());
|
||||
VERIFY(cols - qr.rank() == qr.dimensionOfKernel());
|
||||
VERIFY(!qr.isInjective());
|
||||
@@ -84,7 +84,7 @@ template<typename MatrixType> void qr_invertible()
|
||||
m1 += a * a.adjoint();
|
||||
}
|
||||
|
||||
FullPivotingHouseholderQR<MatrixType> qr(m1);
|
||||
FullPivHouseholderQR<MatrixType> qr(m1);
|
||||
VERIFY(qr.isInjective());
|
||||
VERIFY(qr.isInvertible());
|
||||
VERIFY(qr.isSurjective());
|
||||
@@ -108,7 +108,7 @@ template<typename MatrixType> void qr_verify_assert()
|
||||
{
|
||||
MatrixType tmp;
|
||||
|
||||
FullPivotingHouseholderQR<MatrixType> qr;
|
||||
FullPivHouseholderQR<MatrixType> qr;
|
||||
VERIFY_RAISES_ASSERT(qr.matrixQR())
|
||||
VERIFY_RAISES_ASSERT(qr.solve(tmp,&tmp))
|
||||
VERIFY_RAISES_ASSERT(qr.matrixQ())
|
||||
@@ -126,23 +126,23 @@ void test_qr_fullpivoting()
|
||||
{
|
||||
for(int i = 0; i < 1; i++) {
|
||||
// FIXME : very weird bug here
|
||||
// CALL_SUBTEST( qr(Matrix2f()) );
|
||||
CALL_SUBTEST( qr<MatrixXf>() );
|
||||
CALL_SUBTEST( qr<MatrixXd>() );
|
||||
CALL_SUBTEST( qr<MatrixXcd>() );
|
||||
// CALL_SUBTEST(qr(Matrix2f()) );
|
||||
CALL_SUBTEST_1( qr<MatrixXf>() );
|
||||
CALL_SUBTEST_2( qr<MatrixXd>() );
|
||||
CALL_SUBTEST_3( qr<MatrixXcd>() );
|
||||
}
|
||||
|
||||
for(int i = 0; i < g_repeat; i++) {
|
||||
CALL_SUBTEST( qr_invertible<MatrixXf>() );
|
||||
CALL_SUBTEST( qr_invertible<MatrixXd>() );
|
||||
CALL_SUBTEST( qr_invertible<MatrixXcf>() );
|
||||
CALL_SUBTEST( qr_invertible<MatrixXcd>() );
|
||||
CALL_SUBTEST_1( qr_invertible<MatrixXf>() );
|
||||
CALL_SUBTEST_2( qr_invertible<MatrixXd>() );
|
||||
CALL_SUBTEST_4( qr_invertible<MatrixXcf>() );
|
||||
CALL_SUBTEST_3( qr_invertible<MatrixXcd>() );
|
||||
}
|
||||
|
||||
CALL_SUBTEST(qr_verify_assert<Matrix3f>());
|
||||
CALL_SUBTEST(qr_verify_assert<Matrix3d>());
|
||||
CALL_SUBTEST(qr_verify_assert<MatrixXf>());
|
||||
CALL_SUBTEST(qr_verify_assert<MatrixXd>());
|
||||
CALL_SUBTEST(qr_verify_assert<MatrixXcf>());
|
||||
CALL_SUBTEST(qr_verify_assert<MatrixXcd>());
|
||||
CALL_SUBTEST_5(qr_verify_assert<Matrix3f>());
|
||||
CALL_SUBTEST_6(qr_verify_assert<Matrix3d>());
|
||||
CALL_SUBTEST_1(qr_verify_assert<MatrixXf>());
|
||||
CALL_SUBTEST_2(qr_verify_assert<MatrixXd>());
|
||||
CALL_SUBTEST_4(qr_verify_assert<MatrixXcf>());
|
||||
CALL_SUBTEST_3(qr_verify_assert<MatrixXcd>());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user