Home | History | Annotate | Download | only in SparseExtra

Lines Matching refs:Index

40   typedef _Index Index;
75 Index m_innerSize;
76 std::vector<internal::CompressedStorage<Scalar,Index> > m_data;
80 inline Index rows() const { return IsRowMajor ? outerSize() : m_innerSize; }
81 inline Index cols() const { return IsRowMajor ? m_innerSize : outerSize(); }
82 inline Index innerSize() const { return m_innerSize; }
83 inline Index outerSize() const { return static_cast<Index>(m_data.size()); }
84 inline Index innerNonZeros(Index j) const { return m_data[j].size(); }
86 std::vector<internal::CompressedStorage<Scalar,Index> >& _data() { return m_data; }
87 const std::vector<internal::CompressedStorage<Scalar,Index> >& _data() const { return m_data; }
92 inline Scalar coeff(Index row, Index col) const
94 const Index outer = IsRowMajor ? row : col;
95 const Index inner = IsRowMajor ? col : row;
103 inline Scalar& coeffRef(Index row, Index col)
105 const Index outer = IsRowMajor ? row : col;
106 const Index inner = IsRowMajor ? col : row;
115 for (Index j=0; j<outerSize(); ++j)
120 Index nonZeros() const
122 Index res = 0;
123 for (Index j=0; j<outerSize(); ++j)
124 res += static_cast<Index>(m_data[j].size());
130 void reserve(Index reserveSize = 1000)
134 Index reserveSizePerVector = (std::max)(reserveSize/outerSize(),Index(4));
135 for (Index j=0; j<outerSize(); ++j)
143 inline void startVec(Index /*outer*/) {}
150 inline Scalar& insertBack(Index row, Index col)
156 inline Scalar& insertBackByOuterInner(Index outer, Index inner)
158 eigen_assert(outer<Index(m_data.size()) && inner<m_innerSize && "out of range");
159 eigen_assert(((m_data[outer].size()==0) || (m_data[outer].index(m_data[outer].size()-1)<inner))
165 inline Scalar& insert(Index row, Index col)
167 const Index outer = IsRowMajor ? row : col;
168 const Index inner = IsRowMajor ? col : row;
170 Index startId = 0;
171 Index id = static_cast<Index>(m_data[outer].size()) - 1;
174 while ( (id >= startId) && (m_data[outer].index(id) > inner) )
176 m_data[outer].index(id+1) = m_data[outer].index(id);
180 m_data[outer].index(id+1) = inner;
191 for (Index j=0; j<outerSize(); ++j)
197 void resize(Index rows, Index cols)
199 const Index outerSize = IsRowMajor ? rows : cols;
202 if (Index(m_data.size()) != outerSize)
208 void resizeAndKeepData(Index rows, Index cols)
210 const Index outerSize = IsRowMajor ? rows : cols;
211 const Index innerSize = IsRowMajor ? cols : rows;
233 EIGEN_DEPRECATED inline DynamicSparseMatrix(Index rows, Index cols)
282 EIGEN_DEPRECATED void startFill(Index reserveSize = 1000)
297 EIGEN_DEPRECATED Scalar& fill(Index row, Index col)
299 const Index outer = IsRowMajor ? row : col;
300 const Index inner = IsRowMajor ? col : row;
309 EIGEN_DEPRECATED Scalar& fillrand(Index row, Index col)
328 InnerIterator(const DynamicSparseMatrix& mat, Index outer)
332 inline Index row() const { return IsRowMajor ? m_outer : Base::index(); }
333 inline Index col() const { return IsRowMajor ? Base::index() : m_outer; }
336 const Index m_outer;
344 ReverseInnerIterator(const DynamicSparseMatrix& mat, Index outer)
348 inline Index row() const { return IsRowMajor ? m_outer : Base::index(); }
349 inline Index col() const { return IsRowMajor ? Base::index() : m_outer; }
352 const Index m_outer;