aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Fuzzy.h
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-11-03 19:14:17 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-11-03 19:14:17 +0000
commit3d90c139706daccce577f5f2960ceb98a42871a3 (patch)
treef3c8c501a9d66e183a297b94a5b2362511e14161 /Eigen/src/Core/Fuzzy.h
parent3f580e240e2a3018c7e040e4c4cfc9541c84166d (diff)
norm2() renamed to squaredNorm(), kept as deprecated for now.
Diffstat (limited to 'Eigen/src/Core/Fuzzy.h')
-rw-r--r--Eigen/src/Core/Fuzzy.h14
1 files changed, 7 insertions, 7 deletions
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<Derived,OtherDerived,true>
{
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<Derived,OtherDerived,false>
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<Derived,OtherDerived,false>
{
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<Derived,OtherDerived,false>
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;
}