10 #ifndef EIGEN_VISITOR_H    11 #define EIGEN_VISITOR_H    17 template<
typename Visitor, 
typename Derived, 
int UnrollCount>
    21     col = (UnrollCount-1) / Derived::RowsAtCompileTime,
    22     row = (UnrollCount-1) % Derived::RowsAtCompileTime
    26   static inline void run(
const Derived &mat, Visitor& visitor)
    33 template<
typename Visitor, 
typename Derived>
    37   static inline void run(
const Derived &mat, Visitor& visitor)
    39     return visitor.init(mat.coeff(0, 0), 0, 0);
    43 template<
typename Visitor, 
typename Derived>
    47   static inline void run(
const Derived& mat, Visitor& visitor)
    49     visitor.init(mat.coeff(0,0), 0, 0);
    50     for(
Index i = 1; i < mat.rows(); ++i)
    51       visitor(mat.coeff(i, 0), i, 0);
    52     for(
Index j = 1; j < mat.cols(); ++j)
    53       for(
Index i = 0; i < mat.rows(); ++i)
    54         visitor(mat.coeff(i, j), i, j);
    59 template<
typename XprType>
    66   typedef typename XprType::Scalar 
Scalar;
    70     RowsAtCompileTime = XprType::RowsAtCompileTime,
    74   EIGEN_DEVICE_FUNC 
Index rows()
 const { 
return m_xpr.rows(); }
    75   EIGEN_DEVICE_FUNC 
Index cols()
 const { 
return m_xpr.cols(); }
    76   EIGEN_DEVICE_FUNC 
Index size()
 const { 
return m_xpr.size(); }
    79   { 
return m_evaluator.coeff(row, col); }
   104 template<
typename Derived>
   105 template<
typename Visitor>
   110   ThisEvaluator thisEval(derived());
   113     unroll =  SizeAtCompileTime != 
Dynamic   124 template <
typename Derived>
   144 template <
typename Derived>
   151     if(value < this->res)
   160 template<
typename Scalar>
   172 template <
typename Derived>
   179     if(value > this->res)
   188 template<
typename Scalar>
   202 template<
typename Derived>
   203 template<
typename IndexType>
   209   this->visit(minVisitor);
   210   *rowId = minVisitor.
row;
   211   if (colId) *colId = minVisitor.
col;
   212   return minVisitor.
res;
   220 template<
typename Derived>
   221 template<
typename IndexType>
   228   this->visit(minVisitor);
   229   *index = IndexType((RowsAtCompileTime==1) ? minVisitor.
col : minVisitor.
row);
   230   return minVisitor.
res;
   238 template<
typename Derived>
   239 template<
typename IndexType>
   245   this->visit(maxVisitor);
   246   *rowPtr = maxVisitor.
row;
   247   if (colPtr) *colPtr = maxVisitor.
col;
   248   return maxVisitor.
res;
   256 template<
typename Derived>
   257 template<
typename IndexType>
   264   this->visit(maxVisitor);
   265   *index = (RowsAtCompileTime==1) ? maxVisitor.
col : maxVisitor.
row;
   266   return maxVisitor.
res;
   271 #endif // EIGEN_VISITOR_H EIGEN_DEVICE_FUNC Index size() const
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar maxCoeff() const
EIGEN_DEVICE_FUNC void visit(Visitor &func) const
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
static EIGEN_DEVICE_FUNC void run(const Derived &mat, Visitor &visitor)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API. 
EIGEN_DEVICE_FUNC Index cols() const
XprType::CoeffReturnType CoeffReturnType
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar minCoeff() const
static EIGEN_DEVICE_FUNC void run(const Derived &mat, Visitor &visitor)
internal::evaluator< XprType > m_evaluator
static EIGEN_DEVICE_FUNC void run(const Derived &mat, Visitor &visitor)
EIGEN_DEVICE_FUNC void init(const Scalar &value, Index i, Index j)
EIGEN_DEVICE_FUNC visitor_evaluator(const XprType &xpr)
EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index row, Index col) const
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
EIGEN_DEVICE_FUNC Index rows() const
#define EIGEN_UNROLLING_LIMIT