merge with main repository

This commit is contained in:
Thomas Capricelli
2009-11-09 19:02:52 +01:00
123 changed files with 3010 additions and 2213 deletions

View File

@@ -29,7 +29,7 @@ namespace Eigen {
template<typename A, typename B>
struct ei_make_coherent_impl {
static void run(A& a, B& b) {}
static void run(A&, B&) {}
};
// resize a to match b is a.size()==0, and conversely.

View File

@@ -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
}

View File

@@ -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
}
}

View File

@@ -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>() );
}
}

View File

@@ -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));
}