10 #ifndef EIGEN_COREITERATORS_H
11 #define EIGEN_COREITERATORS_H
20 template<
typename XprType,
typename EvaluatorKind>
32 template<
typename XprType>
42 : m_eval(xpr), m_iter(m_eval, outerId, xpr.innerSize())
46 EIGEN_STRONG_INLINE Scalar
value()
const {
return m_iter.value(); }
51 EIGEN_STRONG_INLINE
InnerIterator& operator+=(
Index i) { m_iter.operator+=(i);
return *
this; }
57 EIGEN_STRONG_INLINE
Index index()
const {
return m_iter.index(); }
59 EIGEN_STRONG_INLINE
Index row()
const {
return m_iter.row(); }
61 EIGEN_STRONG_INLINE
Index col()
const {
return m_iter.col(); }
63 EIGEN_STRONG_INLINE
operator bool()
const {
return m_iter; }
78 template<
typename XprType>
88 : m_eval(
eval), m_inner(0), m_outer(outerId), m_end(innerSize)
91 EIGEN_STRONG_INLINE Scalar value()
const
93 return (IsRowMajor) ? m_eval.coeff(m_outer, m_inner)
94 : m_eval.coeff(m_inner, m_outer);
99 EIGEN_STRONG_INLINE
Index index()
const {
return m_inner; }
100 inline Index row()
const {
return IsRowMajor ? m_outer : index(); }
101 inline Index col()
const {
return IsRowMajor ? index() : m_outer; }
103 EIGEN_STRONG_INLINE
operator bool()
const {
return m_inner < m_end && m_inner>=0; }
114 template<
typename XprType>
124 : Base(
eval, outerId)
132 #endif // EIGEN_COREITERATORS_H
Namespace containing all symbols from the Eigen library.
Definition: LDLT.h:16
EIGEN_STRONG_INLINE Index row() const
Definition: CoreIterators.h:59
Definition: CoreIterators.h:21
Definition: EigenBase.h:30
const unsigned int RowMajorBit
Definition: Constants.h:65
EIGEN_STRONG_INLINE InnerIterator & operator++()
Definition: CoreIterators.h:50
EIGEN_STRONG_INLINE Scalar value() const
Definition: CoreIterators.h:46
Definition: Constants.h:541
An InnerIterator allows to loop over the element of any matrix expression.
Definition: CoreIterators.h:34
EIGEN_STRONG_INLINE Index col() const
Definition: CoreIterators.h:61
InnerIterator(const XprType &xpr, const Index &outerId)
Definition: CoreIterators.h:41
Definition: ForwardDeclarations.h:17
EIGEN_STRONG_INLINE Index index() const
Definition: CoreIterators.h:57
Definition: XprHelper.h:340
Definition: Constants.h:538
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:42