D&C SVD: add scaling to avoid overflow, fix handling of fixed size matrices

This commit is contained in:
Gael Guennebaud
2014-10-06 19:35:57 +02:00
parent d44d432baa
commit dbdd8b0883
3 changed files with 28 additions and 23 deletions

View File

@@ -70,13 +70,13 @@ void test_bdcsvd()
CALL_SUBTEST_7(( svd_verify_assert<BDCSVD<MatrixXf> >(MatrixXf(10,12)) ));
CALL_SUBTEST_8(( svd_verify_assert<BDCSVD<MatrixXcd> >(MatrixXcd(7,5)) ));
// svd_all_trivial_2x2(bdcsvd<Matrix2cd>);
// svd_all_trivial_2x2(bdcsvd<Matrix2d>);
CALL_SUBTEST_1(( svd_all_trivial_2x2(bdcsvd<Matrix2cd>) ));
CALL_SUBTEST_1(( svd_all_trivial_2x2(bdcsvd<Matrix2d>) ));
for(int i = 0; i < g_repeat; i++) {
// CALL_SUBTEST_3(( bdcsvd<Matrix3f>() ));
// CALL_SUBTEST_4(( bdcsvd<Matrix4d>() ));
// CALL_SUBTEST_5(( bdcsvd<Matrix<float,3,5> >() ));
CALL_SUBTEST_3(( bdcsvd<Matrix3f>() ));
CALL_SUBTEST_4(( bdcsvd<Matrix4d>() ));
CALL_SUBTEST_5(( bdcsvd<Matrix<float,3,5> >() ));
int r = internal::random<int>(1, EIGEN_TEST_MAX_SIZE/2),
c = internal::random<int>(1, EIGEN_TEST_MAX_SIZE/2);