diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-10-28 18:19:29 -0400 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-10-28 18:19:29 -0400 |
commit | 2840ac7e948ecb3c7b19ba8f581f829a4a4e1fea (patch) | |
tree | 14adcd3aa33c4207b14455707bc247cea29029e6 /unsupported | |
parent | 1f1c04cac1d8a87cbb34741d141df646b2da2827 (diff) |
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
Diffstat (limited to 'unsupported')
-rw-r--r-- | unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h | 2 | ||||
-rw-r--r-- | unsupported/test/BVH.cpp | 6 | ||||
-rw-r--r-- | unsupported/test/alignedvector3.cpp | 2 | ||||
-rw-r--r-- | unsupported/test/matrixExponential.cpp | 28 |
4 files changed, 22 insertions, 16 deletions
diff --git a/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h b/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h index 36d13b7eb..636f37655 100644 --- a/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h +++ b/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h @@ -192,7 +192,7 @@ MatrixExponential<MatrixType>::MatrixExponential(const MatrixType &M, MatrixType computeUV(RealScalar()); m_tmp1 = m_U + m_V; // numerator of Pade approximant m_tmp2 = -m_U + m_V; // denominator of Pade approximant - m_tmp2.partialLu().solve(m_tmp1, result); + *result = m_tmp2.partialPivLu().solve(m_tmp1); for (int i=0; i<m_squarings; i++) *result *= *result; // undo scaling by repeated squaring } diff --git a/unsupported/test/BVH.cpp b/unsupported/test/BVH.cpp index da694e101..6d4bb70dc 100644 --- a/unsupported/test/BVH.cpp +++ b/unsupported/test/BVH.cpp @@ -206,22 +206,28 @@ struct TreeTest void test_BVH() { for(int i = 0; i < g_repeat; i++) { +#ifdef EIGEN_TEST_PART_1 TreeTest<2> test2; CALL_SUBTEST(test2.testIntersect1()); CALL_SUBTEST(test2.testMinimize1()); CALL_SUBTEST(test2.testIntersect2()); CALL_SUBTEST(test2.testMinimize2()); +#endif +#ifdef EIGEN_TEST_PART_2 TreeTest<3> test3; CALL_SUBTEST(test3.testIntersect1()); CALL_SUBTEST(test3.testMinimize1()); CALL_SUBTEST(test3.testIntersect2()); CALL_SUBTEST(test3.testMinimize2()); +#endif +#ifdef EIGEN_TEST_PART_3 TreeTest<4> test4; CALL_SUBTEST(test4.testIntersect1()); CALL_SUBTEST(test4.testMinimize1()); CALL_SUBTEST(test4.testIntersect2()); CALL_SUBTEST(test4.testMinimize2()); +#endif } } diff --git a/unsupported/test/alignedvector3.cpp b/unsupported/test/alignedvector3.cpp index 52d39ce50..f4b6dd4d9 100644 --- a/unsupported/test/alignedvector3.cpp +++ b/unsupported/test/alignedvector3.cpp @@ -69,6 +69,6 @@ void alignedvector3() void test_alignedvector3() { for(int i = 0; i < g_repeat; i++) { - CALL_SUBTEST(( alignedvector3<float>() )); + CALL_SUBTEST( alignedvector3<float>() ); } } diff --git a/unsupported/test/matrixExponential.cpp b/unsupported/test/matrixExponential.cpp index 7d65a701a..f7ee71768 100644 --- a/unsupported/test/matrixExponential.cpp +++ b/unsupported/test/matrixExponential.cpp @@ -110,18 +110,18 @@ void randomTest(const MatrixType& m, double tol) void test_matrixExponential() { - CALL_SUBTEST(test2dRotation<double>(1e-14)); - CALL_SUBTEST(test2dRotation<float>(1e-5)); - CALL_SUBTEST(test2dHyperbolicRotation<double>(1e-14)); - CALL_SUBTEST(test2dHyperbolicRotation<float>(1e-5)); - CALL_SUBTEST(testPascal<float>(1e-5)); - CALL_SUBTEST(testPascal<double>(1e-14)); - CALL_SUBTEST(randomTest(Matrix2d(), 1e-13)); - CALL_SUBTEST(randomTest(Matrix<double,3,3,RowMajor>(), 1e-13)); - CALL_SUBTEST(randomTest(Matrix4cd(), 1e-13)); - CALL_SUBTEST(randomTest(MatrixXd(8,8), 1e-13)); - CALL_SUBTEST(randomTest(Matrix2f(), 1e-4)); - CALL_SUBTEST(randomTest(Matrix3cf(), 1e-4)); - CALL_SUBTEST(randomTest(Matrix4f(), 1e-4)); - CALL_SUBTEST(randomTest(MatrixXf(8,8), 1e-4)); + CALL_SUBTEST_2(test2dRotation<double>(1e-14)); + CALL_SUBTEST_1(test2dRotation<float>(1e-5)); + CALL_SUBTEST_2(test2dHyperbolicRotation<double>(1e-14)); + CALL_SUBTEST_1(test2dHyperbolicRotation<float>(1e-5)); + CALL_SUBTEST_1(testPascal<float>(1e-5)); + CALL_SUBTEST_2(testPascal<double>(1e-14)); + CALL_SUBTEST_2(randomTest(Matrix2d(), 1e-13)); + CALL_SUBTEST_2(randomTest(Matrix<double,3,3,RowMajor>(), 1e-13)); + CALL_SUBTEST_3(randomTest(Matrix4cd(), 1e-13)); + CALL_SUBTEST_4(randomTest(MatrixXd(8,8), 1e-13)); + CALL_SUBTEST_1(randomTest(Matrix2f(), 1e-4)); + CALL_SUBTEST_5(randomTest(Matrix3cf(), 1e-4)); + CALL_SUBTEST_1(randomTest(Matrix4f(), 1e-4)); + CALL_SUBTEST_6(randomTest(MatrixXf(8,8), 1e-4)); } |