mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-08 09:49:03 +08:00
add 2 missing ReverseInnerIterators
This commit is contained in:
parent
dd9365e089
commit
60daf70a20
@ -65,6 +65,17 @@ class SparseInnerVectorSet : internal::no_assignment_operator,
|
|||||||
protected:
|
protected:
|
||||||
Index m_outer;
|
Index m_outer;
|
||||||
};
|
};
|
||||||
|
class ReverseInnerIterator: public MatrixType::ReverseInnerIterator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
inline ReverseInnerIterator(const SparseInnerVectorSet& xpr, Index outer)
|
||||||
|
: MatrixType::ReverseInnerIterator(xpr.m_matrix, xpr.m_outerStart + outer), m_outer(outer)
|
||||||
|
{}
|
||||||
|
inline Index row() const { return IsRowMajor ? m_outer : this->index(); }
|
||||||
|
inline Index col() const { return IsRowMajor ? this->index() : m_outer; }
|
||||||
|
protected:
|
||||||
|
Index m_outer;
|
||||||
|
};
|
||||||
|
|
||||||
inline SparseInnerVectorSet(const MatrixType& matrix, Index outerStart, Index outerSize)
|
inline SparseInnerVectorSet(const MatrixType& matrix, Index outerStart, Index outerSize)
|
||||||
: m_matrix(matrix), m_outerStart(outerStart), m_outerSize(outerSize)
|
: m_matrix(matrix), m_outerStart(outerStart), m_outerSize(outerSize)
|
||||||
@ -127,6 +138,17 @@ class SparseInnerVectorSet<SparseMatrix<_Scalar, _Options, _Index>, Size>
|
|||||||
protected:
|
protected:
|
||||||
Index m_outer;
|
Index m_outer;
|
||||||
};
|
};
|
||||||
|
class ReverseInnerIterator: public MatrixType::ReverseInnerIterator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
inline ReverseInnerIterator(const SparseInnerVectorSet& xpr, Index outer)
|
||||||
|
: MatrixType::ReverseInnerIterator(xpr.m_matrix, xpr.m_outerStart + outer), m_outer(outer)
|
||||||
|
{}
|
||||||
|
inline Index row() const { return IsRowMajor ? m_outer : this->index(); }
|
||||||
|
inline Index col() const { return IsRowMajor ? this->index() : m_outer; }
|
||||||
|
protected:
|
||||||
|
Index m_outer;
|
||||||
|
};
|
||||||
|
|
||||||
inline SparseInnerVectorSet(const MatrixType& matrix, Index outerStart, Index outerSize)
|
inline SparseInnerVectorSet(const MatrixType& matrix, Index outerStart, Index outerSize)
|
||||||
: m_matrix(matrix), m_outerStart(outerStart), m_outerSize(outerSize)
|
: m_matrix(matrix), m_outerStart(outerStart), m_outerSize(outerSize)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user