From 3d90c139706daccce577f5f2960ceb98a42871a3 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Mon, 3 Nov 2008 19:14:17 +0000 Subject: norm2() renamed to squaredNorm(), kept as deprecated for now. --- Eigen/src/Core/Fuzzy.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Eigen/src/Core/Fuzzy.h') diff --git a/Eigen/src/Core/Fuzzy.h b/Eigen/src/Core/Fuzzy.h index b48c198b3..8fa1e1c26 100644 --- a/Eigen/src/Core/Fuzzy.h +++ b/Eigen/src/Core/Fuzzy.h @@ -178,17 +178,17 @@ struct ei_fuzzy_selector { EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived); ei_assert(self.size() == other.size()); - return((self - other).norm2() <= std::min(self.norm2(), other.norm2()) * prec * prec); + return((self - other).squaredNorm() <= std::min(self.squaredNorm(), other.squaredNorm()) * prec * prec); } static bool isMuchSmallerThan(const Derived& self, const RealScalar& other, RealScalar prec) { - return(self.norm2() <= ei_abs2(other * prec)); + return(self.squaredNorm() <= ei_abs2(other * prec)); } static bool isMuchSmallerThan(const Derived& self, const OtherDerived& other, RealScalar prec) { EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived); ei_assert(self.size() == other.size()); - return(self.norm2() <= other.norm2() * prec * prec); + return(self.squaredNorm() <= other.squaredNorm() * prec * prec); } }; @@ -203,8 +203,8 @@ struct ei_fuzzy_selector typename Derived::Nested nested(self); typename OtherDerived::Nested otherNested(other); for(int i = 0; i < self.cols(); i++) - if((nested.col(i) - otherNested.col(i)).norm2() - > std::min(nested.col(i).norm2(), otherNested.col(i).norm2()) * prec * prec) + if((nested.col(i) - otherNested.col(i)).squaredNorm() + > std::min(nested.col(i).squaredNorm(), otherNested.col(i).squaredNorm()) * prec * prec) return false; return true; } @@ -212,7 +212,7 @@ struct ei_fuzzy_selector { typename Derived::Nested nested(self); for(int i = 0; i < self.cols(); i++) - if(nested.col(i).norm2() > ei_abs2(other * prec)) + if(nested.col(i).squaredNorm() > ei_abs2(other * prec)) return false; return true; } @@ -223,7 +223,7 @@ struct ei_fuzzy_selector typename Derived::Nested nested(self); typename OtherDerived::Nested otherNested(other); for(int i = 0; i < self.cols(); i++) - if(nested.col(i).norm2() > otherNested.col(i).norm2() * prec * prec) + if(nested.col(i).squaredNorm() > otherNested.col(i).squaredNorm() * prec * prec) return false; return true; } -- cgit v1.2.3