void test_matrix_power() { CALL_SUBTEST_2(test2dRotation<double>(1e-13)); CALL_SUBTEST_1(test2dRotation<float>(2e-5)); // was 1e-5, relaxed for clang 2.8 / linux / x86-64 CALL_SUBTEST_9(test2dRotation<long double>(1e-13)); CALL_SUBTEST_2(test2dHyperbolicRotation<double>(1e-14)); CALL_SUBTEST_1(test2dHyperbolicRotation<float>(1e-5)); CALL_SUBTEST_9(test2dHyperbolicRotation<long double>(1e-14)); CALL_SUBTEST_10(test3dRotation<double>(1e-13)); CALL_SUBTEST_11(test3dRotation<float>(1e-5)); CALL_SUBTEST_12(test3dRotation<long double>(1e-13)); CALL_SUBTEST_2(testGeneral(Matrix2d(), 1e-13)); CALL_SUBTEST_7(testGeneral(Matrix3dRowMajor(), 1e-13)); CALL_SUBTEST_3(testGeneral(Matrix4cd(), 1e-13)); CALL_SUBTEST_4(testGeneral(MatrixXd(8,8), 2e-12)); CALL_SUBTEST_1(testGeneral(Matrix2f(), 1e-4)); CALL_SUBTEST_5(testGeneral(Matrix3cf(), 1e-4)); CALL_SUBTEST_8(testGeneral(Matrix4f(), 1e-4)); CALL_SUBTEST_6(testGeneral(MatrixXf(2,2), 1e-3)); // see bug 614 CALL_SUBTEST_9(testGeneral(MatrixXe(7,7), 1e-13)); CALL_SUBTEST_10(testGeneral(Matrix3d(), 1e-13)); CALL_SUBTEST_11(testGeneral(Matrix3f(), 1e-4)); CALL_SUBTEST_12(testGeneral(Matrix3e(), 1e-13)); CALL_SUBTEST_2(testSingular(Matrix2d(), 1e-13)); CALL_SUBTEST_7(testSingular(Matrix3dRowMajor(), 1e-13)); CALL_SUBTEST_3(testSingular(Matrix4cd(), 1e-13)); CALL_SUBTEST_4(testSingular(MatrixXd(8,8), 2e-12)); CALL_SUBTEST_1(testSingular(Matrix2f(), 1e-4)); CALL_SUBTEST_5(testSingular(Matrix3cf(), 1e-4)); CALL_SUBTEST_8(testSingular(Matrix4f(), 1e-4)); CALL_SUBTEST_6(testSingular(MatrixXf(2,2), 1e-3)); CALL_SUBTEST_9(testSingular(MatrixXe(7,7), 1e-13)); CALL_SUBTEST_10(testSingular(Matrix3d(), 1e-13)); CALL_SUBTEST_11(testSingular(Matrix3f(), 1e-4)); CALL_SUBTEST_12(testSingular(Matrix3e(), 1e-13)); CALL_SUBTEST_2(testLogThenExp(Matrix2d(), 1e-13)); CALL_SUBTEST_7(testLogThenExp(Matrix3dRowMajor(), 1e-13)); CALL_SUBTEST_3(testLogThenExp(Matrix4cd(), 1e-13)); CALL_SUBTEST_4(testLogThenExp(MatrixXd(8,8), 2e-12)); CALL_SUBTEST_1(testLogThenExp(Matrix2f(), 1e-4)); CALL_SUBTEST_5(testLogThenExp(Matrix3cf(), 1e-4)); CALL_SUBTEST_8(testLogThenExp(Matrix4f(), 1e-4)); CALL_SUBTEST_6(testLogThenExp(MatrixXf(2,2), 1e-3)); CALL_SUBTEST_9(testLogThenExp(MatrixXe(7,7), 1e-13)); CALL_SUBTEST_10(testLogThenExp(Matrix3d(), 1e-13)); CALL_SUBTEST_11(testLogThenExp(Matrix3f(), 1e-4)); CALL_SUBTEST_12(testLogThenExp(Matrix3e(), 1e-13)); }
void test_matrix_function() { CALL_SUBTEST_1(testMatrixType(Matrix<float,1,1>())); CALL_SUBTEST_2(testMatrixType(Matrix3cf())); CALL_SUBTEST_3(testMatrixType(MatrixXf(8,8))); CALL_SUBTEST_4(testMatrixType(Matrix2d())); CALL_SUBTEST_5(testMatrixType(Matrix<double,5,5,RowMajor>())); CALL_SUBTEST_6(testMatrixType(Matrix4cd())); CALL_SUBTEST_7(testMatrixType(MatrixXd(13,13))); }
void test_matrix_exponential() { CALL_SUBTEST_2(test2dRotation<double>(1e-13)); CALL_SUBTEST_1(test2dRotation<float>(2e-5)); // was 1e-5, relaxed for clang 2.8 / linux / x86-64 CALL_SUBTEST_2(test2dHyperbolicRotation<double>(1e-14)); CALL_SUBTEST_1(test2dHyperbolicRotation<float>(1e-5)); CALL_SUBTEST_6(testPascal<float>(1e-6)); CALL_SUBTEST_5(testPascal<double>(1e-15)); CALL_SUBTEST_2(randomTest(Matrix2d(), 1e-13)); CALL_SUBTEST_7(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)); }
void test_matrix_power() { typedef Matrix<double,3,3,RowMajor> Matrix3dRowMajor; typedef Matrix<long double,Dynamic,Dynamic> MatrixXe; typedef Matrix<long double,Dynamic,1> VectorXe; CALL_SUBTEST_2(test2dRotation<double>(1e-13)); CALL_SUBTEST_1(test2dRotation<float>(2e-5)); // was 1e-5, relaxed for clang 2.8 / linux / x86-64 CALL_SUBTEST_9(test2dRotation<long double>(1e-13)); CALL_SUBTEST_2(test2dHyperbolicRotation<double>(1e-14)); CALL_SUBTEST_1(test2dHyperbolicRotation<float>(1e-5)); CALL_SUBTEST_9(test2dHyperbolicRotation<long double>(1e-14)); CALL_SUBTEST_2(testMatrixVector(Matrix2d(), Vector2d(), 1e-13)); CALL_SUBTEST_7(testMatrixVector(Matrix3dRowMajor(), MatrixXd(3,5), 1e-13)); CALL_SUBTEST_3(testMatrixVector(Matrix4cd(), Vector4cd(), 1e-13)); CALL_SUBTEST_4(testMatrixVector(MatrixXd(8,8), VectorXd(8), 2e-12)); CALL_SUBTEST_1(testMatrixVector(Matrix2f(), Vector2f(), 1e-4)); CALL_SUBTEST_5(testMatrixVector(Matrix3cf(), Vector3cf(), 1e-4)); CALL_SUBTEST_8(testMatrixVector(Matrix4f(), Vector4f(), 1e-4)); CALL_SUBTEST_6(testMatrixVector(MatrixXf(8,8), VectorXf(8), 1e-3)); CALL_SUBTEST_9(testMatrixVector(MatrixXe(7,7), VectorXe(7), 1e-13)); }