Exemplo n.º 1
0
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_2(testExponentLaws(Matrix2d(),         1e-13));
  CALL_SUBTEST_7(testExponentLaws(Matrix3dRowMajor(), 1e-13));
  CALL_SUBTEST_3(testExponentLaws(Matrix4cd(),        1e-13));
  CALL_SUBTEST_4(testExponentLaws(MatrixXd(8,8),      2e-12));
  CALL_SUBTEST_1(testExponentLaws(Matrix2f(),         1e-4));
  CALL_SUBTEST_5(testExponentLaws(Matrix3cf(),        1e-4));
  CALL_SUBTEST_8(testExponentLaws(Matrix4f(),         1e-4));
  CALL_SUBTEST_6(testExponentLaws(MatrixXf(2,2),      1e-3)); // see bug 614
  CALL_SUBTEST_9(testExponentLaws(MatrixXe(7,7),      1e-13));
}
Exemplo n.º 2
0
void testMatrixVector(const MatrixType& m, const VectorType& v, double tol)
{
  testExponentLaws(m,tol);
  testProduct(m,v,tol);
  testTriangularProduct(m,v,tol);
}