diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h index 9c3c6432b..b8fa9d1cd 100644 --- a/Eigen/src/Core/DenseBase.h +++ b/Eigen/src/Core/DenseBase.h @@ -415,17 +415,14 @@ template class DenseBase typename internal::traits::Scalar minCoeff() const; typename internal::traits::Scalar maxCoeff() const; - typename internal::traits::Scalar minCoeff(Index* row, Index* col) const; - typename internal::traits::Scalar maxCoeff(Index* row, Index* col) const; - typename internal::traits::Scalar minCoeff(Index* index) const; - typename internal::traits::Scalar maxCoeff(Index* index) const; - - #ifdef EIGEN2_SUPPORT - typename internal::traits::Scalar minCoeff(int* row, int* col) const; - typename internal::traits::Scalar maxCoeff(int* row, int* col) const; - typename internal::traits::Scalar minCoeff(int* index) const; - typename internal::traits::Scalar maxCoeff(int* index) const; - #endif + template + typename internal::traits::Scalar minCoeff(IndexType* row, IndexType* col) const; + template + typename internal::traits::Scalar maxCoeff(IndexType* row, IndexType* col) const; + template + typename internal::traits::Scalar minCoeff(IndexType* index) const; + template + typename internal::traits::Scalar maxCoeff(IndexType* index) const; template typename internal::result_of::Scalar)>::type diff --git a/Eigen/src/Core/Visitor.h b/Eigen/src/Core/Visitor.h index 556c6fcd7..378ebcba1 100644 --- a/Eigen/src/Core/Visitor.h +++ b/Eigen/src/Core/Visitor.h @@ -183,8 +183,9 @@ struct functor_traits > { * \sa DenseBase::minCoeff(Index*), DenseBase::maxCoeff(Index*,Index*), DenseBase::visitor(), DenseBase::minCoeff() */ template +template typename internal::traits::Scalar -DenseBase::minCoeff(Index* row, Index* col) const +DenseBase::minCoeff(IndexType* row, IndexType* col) const { internal::min_coeff_visitor minVisitor; this->visit(minVisitor); @@ -196,11 +197,12 @@ DenseBase::minCoeff(Index* row, Index* col) const /** \returns the minimum of all coefficients of *this * and puts in *index its location. * - * \sa DenseBase::minCoeff(Index*,Index*), DenseBase::maxCoeff(Index*,Index*), DenseBase::visitor(), DenseBase::minCoeff() + * \sa DenseBase::minCoeff(IndexType*,IndexType*), DenseBase::maxCoeff(IndexType*,IndexType*), DenseBase::visitor(), DenseBase::minCoeff() */ template +template typename internal::traits::Scalar -DenseBase::minCoeff(Index* index) const +DenseBase::minCoeff(IndexType* index) const { EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) internal::min_coeff_visitor minVisitor; @@ -212,11 +214,12 @@ DenseBase::minCoeff(Index* index) const /** \returns the maximum of all coefficients of *this * and puts in *row and *col its location. * - * \sa DenseBase::minCoeff(Index*,Index*), DenseBase::visitor(), DenseBase::maxCoeff() + * \sa DenseBase::minCoeff(IndexType*,IndexType*), DenseBase::visitor(), DenseBase::maxCoeff() */ template +template typename internal::traits::Scalar -DenseBase::maxCoeff(Index* row, Index* col) const +DenseBase::maxCoeff(IndexType* row, IndexType* col) const { internal::max_coeff_visitor maxVisitor; this->visit(maxVisitor); @@ -228,11 +231,12 @@ DenseBase::maxCoeff(Index* row, Index* col) const /** \returns the maximum of all coefficients of *this * and puts in *index its location. * - * \sa DenseBase::maxCoeff(Index*,Index*), DenseBase::minCoeff(Index*,Index*), DenseBase::visitor(), DenseBase::maxCoeff() + * \sa DenseBase::maxCoeff(IndexType*,IndexType*), DenseBase::minCoeff(IndexType*,IndexType*), DenseBase::visitor(), DenseBase::maxCoeff() */ template +template typename internal::traits::Scalar -DenseBase::maxCoeff(Index* index) const +DenseBase::maxCoeff(IndexType* index) const { EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) internal::max_coeff_visitor maxVisitor; @@ -241,51 +245,4 @@ DenseBase::maxCoeff(Index* index) const return maxVisitor.res; } -#ifdef EIGEN2_SUPPORT - -template -typename internal::traits::Scalar -DenseBase::minCoeff(int* row, int* col) const -{ - Index r, c; - Scalar result = this->minCoeff(&r, &c); - *row = int(r); - *col = int(c); - return result; -} - -template -typename internal::traits::Scalar -DenseBase::minCoeff(int* index) const -{ - Index i; - Scalar result = this->minCoeff(&i); - *index = int(i); - return result; -} - -template -typename internal::traits::Scalar -DenseBase::maxCoeff(int* row, int* col) const -{ - Index r, c; - Scalar result = this->maxCoeff(&r, &c); - *row = int(r); - *col = int(c); - return result; -} - -template -typename internal::traits::Scalar -DenseBase::maxCoeff(int* index) const -{ - Index i; - Scalar result = this->maxCoeff(&i); - *index = int(i); - return result; -} - -#endif // EIGEN2_SUPPORT - - #endif // EIGEN_VISITOR_H