diff options
author | Gael Guennebaud <g.gael@free.fr> | 2015-02-13 18:57:41 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2015-02-13 18:57:41 +0100 |
commit | fc202bab398ed9b78ef8452f8e4ef35e233965f6 (patch) | |
tree | f0f427ee115aa8579b0d43a49c2ad762b1b0f57c /Eigen/src/Core/CoreIterators.h | |
parent | fe513199808654bfa5080fe16bda7dcdafbd57c6 (diff) |
Index refactoring: StorageIndex must be used for storage only (and locally when it make sense). In all other cases use the global Index type.
Diffstat (limited to 'Eigen/src/Core/CoreIterators.h')
-rw-r--r-- | Eigen/src/Core/CoreIterators.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Eigen/src/Core/CoreIterators.h b/Eigen/src/Core/CoreIterators.h index 141eaa2eb..c76bdf68e 100644 --- a/Eigen/src/Core/CoreIterators.h +++ b/Eigen/src/Core/CoreIterators.h @@ -36,7 +36,6 @@ protected: typedef internal::inner_iterator_selector<XprType, typename internal::evaluator_traits<XprType>::Kind> IteratorType; typedef typename internal::evaluator<XprType>::type EvaluatorType; typedef typename internal::traits<XprType>::Scalar Scalar; - typedef typename internal::traits<XprType>::StorageIndex StorageIndex; public: /** Construct an iterator over the \a outerId -th row or column of \a xpr */ InnerIterator(const XprType &xpr, const Index &outerId) @@ -50,11 +49,11 @@ public: */ EIGEN_STRONG_INLINE InnerIterator& operator++() { m_iter.operator++(); return *this; } /// \returns the column or row index of the current coefficient. - EIGEN_STRONG_INLINE StorageIndex index() const { return m_iter.index(); } + EIGEN_STRONG_INLINE Index index() const { return m_iter.index(); } /// \returns the row index of the current coefficient. - EIGEN_STRONG_INLINE StorageIndex row() const { return m_iter.row(); } + EIGEN_STRONG_INLINE Index row() const { return m_iter.row(); } /// \returns the column index of the current coefficient. - EIGEN_STRONG_INLINE StorageIndex col() const { return m_iter.col(); } + EIGEN_STRONG_INLINE Index col() const { return m_iter.col(); } /// \returns \c true if the iterator \c *this still references a valid coefficient. EIGEN_STRONG_INLINE operator bool() const { return m_iter; } @@ -77,7 +76,6 @@ class inner_iterator_selector<XprType, IndexBased> protected: typedef typename evaluator<XprType>::type EvaluatorType; typedef typename traits<XprType>::Scalar Scalar; - typedef typename traits<XprType>::StorageIndex StorageIndex; enum { IsRowMajor = (XprType::Flags&RowMajorBit)==RowMajorBit }; public: @@ -93,9 +91,9 @@ public: EIGEN_STRONG_INLINE inner_iterator_selector& operator++() { m_inner++; return *this; } - EIGEN_STRONG_INLINE StorageIndex index() const { return m_inner; } - inline StorageIndex row() const { return IsRowMajor ? m_outer : index(); } - inline StorageIndex col() const { return IsRowMajor ? index() : m_outer; } + EIGEN_STRONG_INLINE Index index() const { return m_inner; } + inline Index row() const { return IsRowMajor ? m_outer : index(); } + inline Index col() const { return IsRowMajor ? index() : m_outer; } EIGEN_STRONG_INLINE operator bool() const { return m_inner < m_end && m_inner>=0; } @@ -115,7 +113,6 @@ class inner_iterator_selector<XprType, IteratorBased> protected: typedef typename evaluator<XprType>::InnerIterator Base; typedef typename evaluator<XprType>::type EvaluatorType; - typedef typename traits<XprType>::StorageIndex StorageIndex; public: EIGEN_STRONG_INLINE inner_iterator_selector(const EvaluatorType &eval, const Index &outerId, const Index &/*innerSize*/) |