10#ifndef EIGEN_VISITOR_H
11#define EIGEN_VISITOR_H
17template<
typename Visitor,
typename Derived,
int UnrollCount>
33template<
typename Visitor,
typename Derived>
44template<
typename Visitor,
typename Derived>
47 static inline void run(
const Derived &,
Visitor& )
51template<
typename Visitor,
typename Derived>
58 for(
Index i = 1; i <
mat.rows(); ++i)
60 for(
Index j = 1; j <
mat.cols(); ++j)
61 for(
Index i = 0; i <
mat.rows(); ++i)
67template<
typename XprType>
74 typedef typename XprType::Scalar Scalar;
75 typedef typename XprType::CoeffReturnType CoeffReturnType;
78 RowsAtCompileTime = XprType::RowsAtCompileTime,
82 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
Index rows()
const EIGEN_NOEXCEPT {
return m_xpr.rows(); }
83 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
Index cols()
const EIGEN_NOEXCEPT {
return m_xpr.cols(); }
84 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
Index size()
const EIGEN_NOEXCEPT {
return m_xpr.size(); }
86 EIGEN_DEVICE_FUNC CoeffReturnType coeff(
Index row,
Index col)
const
87 {
return m_evaluator.coeff(row, col); }
114template<
typename Derived>
115template<
typename Visitor>
137template <
typename Derived>
143 typedef typename Derived::Scalar Scalar;
147 inline void init(
const Scalar& value,
Index i,
Index j)
160template <
typename Derived,
int NaNPropagation>
163 typedef typename Derived::Scalar Scalar;
176template <
typename Derived>
179 typedef typename Derived::Scalar Scalar;
183 if((numext::isnan)(this->res) || (!(numext::isnan)(value) &&
value < this->res))
192template <
typename Derived>
195 typedef typename Derived::Scalar Scalar;
208template<
typename Scalar,
int NaNPropagation>
220template <
typename Derived,
int NaNPropagation>
223 typedef typename Derived::Scalar Scalar;
227 if(value > this->res)
236template <
typename Derived>
239 typedef typename Derived::Scalar Scalar;
243 if((numext::isnan)(this->res) || (!(numext::isnan)(value) && value > this->res))
252template <
typename Derived>
255 typedef typename Derived::Scalar Scalar;
259 if((numext::isnan)(value) || value > this->res)
268template<
typename Scalar,
int NaNPropagation>
288template<
typename Derived>
289template<
int NaNPropagation,
typename IndexType>
294 eigen_assert(this->rows()>0 && this->cols()>0 &&
"you are using an empty matrix");
297 this->
visit(minVisitor);
313template<
typename Derived>
314template<
int NaNPropagation,
typename IndexType>
319 eigen_assert(this->rows()>0 && this->cols()>0 &&
"you are using an empty matrix");
321 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
323 this->
visit(minVisitor);
339template<
typename Derived>
340template<
int NaNPropagation,
typename IndexType>
345 eigen_assert(this->rows()>0 && this->cols()>0 &&
"you are using an empty matrix");
348 this->
visit(maxVisitor);
364template<
typename Derived>
365template<
int NaNPropagation,
typename IndexType>
370 eigen_assert(this->rows()>0 && this->cols()>0 &&
"you are using an empty matrix");
372 EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
374 this->
visit(maxVisitor);
Base class for all dense matrices, vectors, and arrays.
Definition DenseBase.h:47
EIGEN_DEVICE_FUNC void visit(Visitor &func) const
Applies the visitor visitor to the whole coefficients of the matrix or vector.
Definition Visitor.h:117
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:50
@ SizeAtCompileTime
This is equal to the number of coefficients, i.e.
Definition DenseBase.h:113
@ RowsAtCompileTime
The number of rows at compile-time.
Definition DenseBase.h:100
@ PropagateNaN
Always propagate NaNs.
Definition Constants.h:343
@ PropagateNumbers
Always propagate not-NaNs.
Definition Constants.h:345
Namespace containing all symbols from the Eigen library.
Definition LDLT.h:16
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time,...
Definition Constants.h:22
Holds information about the various numeric (i.e.
Definition NumTraits.h:236
Definition CoreEvaluators.h:91
Definition XprHelper.h:176
Definition ForwardDeclarations.h:17