make eigen2 visitor test pass

This commit is contained in:
Benoit Jacob 2011-01-23 18:34:30 -05:00
parent 8df5bca979
commit 1cf4996d3c
3 changed files with 55 additions and 2 deletions

View File

@ -417,9 +417,15 @@ template<typename Derived> class DenseBase
typename internal::traits<Derived>::Scalar minCoeff(Index* row, Index* col) const;
typename internal::traits<Derived>::Scalar maxCoeff(Index* row, Index* col) const;
typename internal::traits<Derived>::Scalar minCoeff(Index* index) const;
typename internal::traits<Derived>::Scalar maxCoeff(Index* index) const;
#ifdef EIGEN2_SUPPORT
typename internal::traits<Derived>::Scalar minCoeff(int* row, int* col) const;
typename internal::traits<Derived>::Scalar maxCoeff(int* row, int* col) const;
typename internal::traits<Derived>::Scalar minCoeff(int* index) const;
typename internal::traits<Derived>::Scalar maxCoeff(int* index) const;
#endif
template<typename BinaryOp>
typename internal::result_of<BinaryOp(typename internal::traits<Derived>::Scalar)>::type

View File

@ -208,7 +208,7 @@ template<typename Derived> class MatrixBase
Scalar dot(const MatrixBase<OtherDerived>& other) const;
#endif
#if EIGEN2_SUPPORT_STAGE != STAGE99_NO_EIGEN2_SUPPORT
#ifdef EIGEN2_SUPPORT
template<typename OtherDerived>
#if EIGEN2_SUPPORT_STAGE >= STAGE30_FULL_EIGEN3_API
EIGEN_DEPRECATED

View File

@ -241,4 +241,51 @@ DenseBase<Derived>::maxCoeff(Index* index) const
return maxVisitor.res;
}
#ifdef EIGEN2_SUPPORT
template<typename Derived>
typename internal::traits<Derived>::Scalar
DenseBase<Derived>::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 Derived>
typename internal::traits<Derived>::Scalar
DenseBase<Derived>::minCoeff(int* index) const
{
Index i;
Scalar result = this->minCoeff(&i);
*index = int(i);
return result;
}
template<typename Derived>
typename internal::traits<Derived>::Scalar
DenseBase<Derived>::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 Derived>
typename internal::traits<Derived>::Scalar
DenseBase<Derived>::maxCoeff(int* index) const
{
Index i;
Scalar result = this->maxCoeff(&i);
*index = int(i);
return result;
}
#endif // EIGEN2_SUPPORT
#endif // EIGEN_VISITOR_H