From 39209edd713a20bfb325796f8eafdc8194eed38e Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 5 Jan 2010 15:38:20 +0100 Subject: port unsupported modules to new API --- unsupported/test/matrix_exponential.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'unsupported/test/matrix_exponential.cpp') diff --git a/unsupported/test/matrix_exponential.cpp b/unsupported/test/matrix_exponential.cpp index f155e5f98..a5b40adde 100644 --- a/unsupported/test/matrix_exponential.cpp +++ b/unsupported/test/matrix_exponential.cpp @@ -25,7 +25,7 @@ #include "main.h" #include -double binom(int n, int k) +double binom(int n, int k) { double res = 1; for (int i=0; i double relerr(const MatrixBase& A, const MatrixBase& B) { - return std::sqrt((A - B).cwise().abs2().sum() / std::min(A.cwise().abs2().sum(), B.cwise().abs2().sum())); + return std::sqrt((A - B).cwiseAbs2().sum() / std::min(A.cwiseAbs2().sum(), B.cwiseAbs2().sum())); } template @@ -52,7 +52,7 @@ void test2dRotation(double tol) T angle; A << 0, 1, -1, 0; - for (int i=0; i<=20; i++) + for (int i=0; i<=20; i++) { angle = static_cast(pow(10, i / 5. - 2)); B << cos(angle), sin(angle), -sin(angle), cos(angle); @@ -74,7 +74,7 @@ void test2dHyperbolicRotation(double tol) std::complex imagUnit(0,1); T angle, ch, sh; - for (int i=0; i<=20; i++) + for (int i=0; i<=20; i++) { angle = static_cast((i-10) / 2.0); ch = std::cosh(angle); @@ -116,7 +116,7 @@ void testPascal(double tol) } } -template +template void randomTest(const MatrixType& m, double tol) { /* this test covers the following files: @@ -157,7 +157,7 @@ void test_matrix_exponential() 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_5(randomTest(Matrix3cf(), 1e-4)); CALL_SUBTEST_1(randomTest(Matrix4f(), 1e-4)); CALL_SUBTEST_6(randomTest(MatrixXf(8,8), 1e-4)); } -- cgit v1.2.3