From f0238cfb6997c4acfc2bd200de7295f3fa36968f Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 3 Mar 2019 21:09:10 +0100 Subject: don't index Eigen --- eigen/test/numext.cpp | 53 --------------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 eigen/test/numext.cpp (limited to 'eigen/test/numext.cpp') diff --git a/eigen/test/numext.cpp b/eigen/test/numext.cpp deleted file mode 100644 index 3de33e2..0000000 --- a/eigen/test/numext.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. -// -// Copyright (C) 2017 Gael Guennebaud -// -// This Source Code Form is subject to the terms of the Mozilla -// Public License v. 2.0. If a copy of the MPL was not distributed -// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - -#include "main.h" - -template -void check_abs() { - typedef typename NumTraits::Real Real; - - if(NumTraits::IsSigned) - VERIFY_IS_EQUAL(numext::abs(-T(1)), T(1)); - VERIFY_IS_EQUAL(numext::abs(T(0)), T(0)); - VERIFY_IS_EQUAL(numext::abs(T(1)), T(1)); - - for(int k=0; k(); - if(!internal::is_same::value) - x = x/Real(2); - if(NumTraits::IsSigned) - { - VERIFY_IS_EQUAL(numext::abs(x), numext::abs(-x)); - VERIFY( numext::abs(-x) >= Real(0)); - } - VERIFY( numext::abs(x) >= Real(0)); - VERIFY_IS_APPROX( numext::abs2(x), numext::abs2(numext::abs(x)) ); - } -} - -void test_numext() { - CALL_SUBTEST( check_abs() ); - CALL_SUBTEST( check_abs() ); - CALL_SUBTEST( check_abs() ); - CALL_SUBTEST( check_abs() ); - CALL_SUBTEST( check_abs() ); - CALL_SUBTEST( check_abs() ); - CALL_SUBTEST( check_abs() ); - CALL_SUBTEST( check_abs() ); - CALL_SUBTEST( check_abs() ); - CALL_SUBTEST( check_abs() ); - CALL_SUBTEST( check_abs() ); - CALL_SUBTEST( check_abs() ); - CALL_SUBTEST( check_abs() ); - - CALL_SUBTEST( check_abs >() ); - CALL_SUBTEST( check_abs >() ); -} -- cgit v1.2.3