mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
merge with main repository
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user