diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-05-30 16:00:58 -0400 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-05-30 16:00:58 -0400 |
commit | aaaade4b3d66d67d2c08af3372c3965e7255b2e8 (patch) | |
tree | 76dfaefb014333b2f98c6db660454771655ea8b7 /Eigen/src/Core/Fuzzy.h | |
parent | faa3ff3be6a02b57c6cb05edc87375e54ab96606 (diff) |
the Index types change.
As discussed on the list (too long to explain here).
Diffstat (limited to 'Eigen/src/Core/Fuzzy.h')
-rw-r--r-- | Eigen/src/Core/Fuzzy.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Eigen/src/Core/Fuzzy.h b/Eigen/src/Core/Fuzzy.h index 432da4288..299640911 100644 --- a/Eigen/src/Core/Fuzzy.h +++ b/Eigen/src/Core/Fuzzy.h @@ -201,13 +201,14 @@ template<typename Derived, typename OtherDerived> struct ei_fuzzy_selector<Derived,OtherDerived,false> { typedef typename Derived::RealScalar RealScalar; + typedef typename Derived::Index Index; static bool isApprox(const Derived& self, const OtherDerived& other, RealScalar prec) { EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Derived,OtherDerived) ei_assert(self.rows() == other.rows() && self.cols() == other.cols()); typename Derived::Nested nested(self); typename OtherDerived::Nested otherNested(other); - for(int i = 0; i < self.cols(); ++i) + for(Index i = 0; i < self.cols(); ++i) if((nested.col(i) - otherNested.col(i)).squaredNorm() > std::min(nested.col(i).squaredNorm(), otherNested.col(i).squaredNorm()) * prec * prec) return false; @@ -216,7 +217,7 @@ struct ei_fuzzy_selector<Derived,OtherDerived,false> static bool isMuchSmallerThan(const Derived& self, const RealScalar& other, RealScalar prec) { typename Derived::Nested nested(self); - for(int i = 0; i < self.cols(); ++i) + for(Index i = 0; i < self.cols(); ++i) if(nested.col(i).squaredNorm() > ei_abs2(other * prec)) return false; return true; @@ -227,7 +228,7 @@ struct ei_fuzzy_selector<Derived,OtherDerived,false> ei_assert(self.rows() == other.rows() && self.cols() == other.cols()); typename Derived::Nested nested(self); typename OtherDerived::Nested otherNested(other); - for(int i = 0; i < self.cols(); ++i) + for(Index i = 0; i < self.cols(); ++i) if(nested.col(i).squaredNorm() > otherNested.col(i).squaredNorm() * prec * prec) return false; return true; |