mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
parent
5c27962453
commit
d3c5525c23
@ -48,6 +48,11 @@ public:
|
|||||||
* Explicit zeros are not skipped over. To skip explicit zeros, see class SparseView
|
* Explicit zeros are not skipped over. To skip explicit zeros, see class SparseView
|
||||||
*/
|
*/
|
||||||
EIGEN_STRONG_INLINE InnerIterator& operator++() { m_iter.operator++(); return *this; }
|
EIGEN_STRONG_INLINE InnerIterator& operator++() { m_iter.operator++(); return *this; }
|
||||||
|
EIGEN_STRONG_INLINE InnerIterator& operator+=(Index i) { m_iter.operator+=(i); return *this; }
|
||||||
|
EIGEN_STRONG_INLINE InnerIterator operator+(Index i)
|
||||||
|
{ InnerIterator result(*this); result+=i; return result; }
|
||||||
|
|
||||||
|
|
||||||
/// \returns the column or row index of the current coefficient.
|
/// \returns the column or row index of the current coefficient.
|
||||||
EIGEN_STRONG_INLINE Index index() const { return m_iter.index(); }
|
EIGEN_STRONG_INLINE Index index() const { return m_iter.index(); }
|
||||||
/// \returns the row index of the current coefficient.
|
/// \returns the row index of the current coefficient.
|
||||||
|
@ -185,6 +185,14 @@ class SparseCompressedBase<Derived>::InnerIterator
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline InnerIterator& operator++() { m_id++; return *this; }
|
inline InnerIterator& operator++() { m_id++; return *this; }
|
||||||
|
inline InnerIterator& operator+=(Index i) { m_id += i ; return *this; }
|
||||||
|
|
||||||
|
inline InnerIterator operator+(Index i)
|
||||||
|
{
|
||||||
|
InnerIterator result = *this;
|
||||||
|
result += i;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
inline const Scalar& value() const { return m_values[m_id]; }
|
inline const Scalar& value() const { return m_values[m_id]; }
|
||||||
inline Scalar& valueRef() { return const_cast<Scalar&>(m_values[m_id]); }
|
inline Scalar& valueRef() { return const_cast<Scalar&>(m_values[m_id]); }
|
||||||
@ -245,6 +253,14 @@ class SparseCompressedBase<Derived>::ReverseInnerIterator
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline ReverseInnerIterator& operator--() { --m_id; return *this; }
|
inline ReverseInnerIterator& operator--() { --m_id; return *this; }
|
||||||
|
inline ReverseInnerIterator& operator-=(Index i) { m_id -= i; return *this; }
|
||||||
|
|
||||||
|
inline ReverseInnerIterator operator-(Index i)
|
||||||
|
{
|
||||||
|
ReverseInnerIterator result = *this;
|
||||||
|
result -= i;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
inline const Scalar& value() const { return m_values[m_id-1]; }
|
inline const Scalar& value() const { return m_values[m_id-1]; }
|
||||||
inline Scalar& valueRef() { return const_cast<Scalar&>(m_values[m_id-1]); }
|
inline Scalar& valueRef() { return const_cast<Scalar&>(m_values[m_id-1]); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user