From f997a3e9020605d66aeb5a546b37bbfa1c69ef22 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Sat, 26 Jul 2008 12:08:28 +0000 Subject: update the inverse test a little make use of static asserts in Map fix 2 warnings in CacheFriendlyProduct: unused var 'Vectorized' --- test/inverse.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/inverse.cpp') diff --git a/test/inverse.cpp b/test/inverse.cpp index 5614c987d..9c7c6524c 100644 --- a/test/inverse.cpp +++ b/test/inverse.cpp @@ -2,6 +2,7 @@ // for linear algebra. Eigen itself is part of the KDE project. // // Copyright (C) 2008 Gael Guennebaud +// Copyright (C) 2008 Benoit Jacob // // Eigen is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -53,15 +54,19 @@ template void inverse(const MatrixType& m) VERIFY_IS_APPROX(identity, m1 * m1.inverse() ); VERIFY_IS_APPROX(m1, m1.inverse().inverse() ); + + // since for the general case we implement separately row-major and col-major, test that + VERIFY_IS_APPROX(m1.transpose().inverse(), m1.inverse().transpose()); } void test_inverse() { - for(int i = 0; i < 1; i++) { + for(int i = 0; i < g_repeat; i++) { CALL_SUBTEST( inverse(Matrix()) ); CALL_SUBTEST( inverse(Matrix2d()) ); CALL_SUBTEST( inverse(Matrix3f()) ); CALL_SUBTEST( inverse(Matrix4f()) ); + CALL_SUBTEST( inverse(MatrixXf(8,8)) ); CALL_SUBTEST( inverse(MatrixXcd(7,7)) ); } } -- cgit v1.2.3