From 4f0bd557a470d47d60f49374153135422bff5289 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 18 Jul 2013 11:27:04 +0200 Subject: [PATCH] Previous isFinite->hasNonFinite change was broken. After discussion let's rename it to allFinite --- Eigen/src/Core/BooleanRedux.h | 4 ++-- Eigen/src/Core/DenseBase.h | 2 +- test/special_numbers.cpp | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Eigen/src/Core/BooleanRedux.h b/Eigen/src/Core/BooleanRedux.h index e9840257c..6e37e031a 100644 --- a/Eigen/src/Core/BooleanRedux.h +++ b/Eigen/src/Core/BooleanRedux.h @@ -131,7 +131,7 @@ inline typename DenseBase::Index DenseBase::count() const /** \returns true is \c *this contains at least one Not A Number (NaN). * - * \sa hasNonFinite() + * \sa allFinite() */ template inline bool DenseBase::hasNaN() const @@ -144,7 +144,7 @@ inline bool DenseBase::hasNaN() const * \sa hasNaN() */ template -inline bool DenseBase::hasNonFinite() const +inline bool DenseBase::allFinite() const { return !((derived()-derived()).hasNaN()); } diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h index 44fd660d9..c5800f6c8 100644 --- a/Eigen/src/Core/DenseBase.h +++ b/Eigen/src/Core/DenseBase.h @@ -348,7 +348,7 @@ template class DenseBase bool isOnes(const RealScalar& prec = NumTraits::dummy_precision()) const; inline bool hasNaN() const; - inline bool hasNonFinite() const; + inline bool allFinite() const; inline Derived& operator*=(const Scalar& other); inline Derived& operator/=(const Scalar& other); diff --git a/test/special_numbers.cpp b/test/special_numbers.cpp index 0d03b4c64..2f1b704be 100644 --- a/test/special_numbers.cpp +++ b/test/special_numbers.cpp @@ -33,7 +33,7 @@ template void special_numbers() mboth = mnan + minf; VERIFY(!m1.hasNaN()); - VERIFY(m1.hasNonFinite()); + VERIFY(m1.allFinite()); VERIFY(mnan.hasNaN()); VERIFY((s1*mnan).hasNaN()); @@ -42,11 +42,11 @@ template void special_numbers() VERIFY(mboth.hasNaN()); VERIFY(mboth.array().hasNaN()); - VERIFY(!mnan.hasNonFinite()); - VERIFY(!minf.hasNonFinite()); - VERIFY(!(minf-mboth).hasNonFinite()); - VERIFY(!mboth.hasNonFinite()); - VERIFY(!mboth.array().hasNonFinite()); + VERIFY(!mnan.allFinite()); + VERIFY(!minf.allFinite()); + VERIFY(!(minf-mboth).allFinite()); + VERIFY(!mboth.allFinite()); + VERIFY(!mboth.array().allFinite()); } void test_special_numbers()