Lines Matching refs:Index
63 typedef _Index Index;
107 typedef typename BlockSparseMatrixT::Index Index;
122 Index outerSize() const
126 Index cols() const
130 Index rows() const
134 Scalar coeff(Index row, Index col)
138 Scalar coeffRef(Index row, Index col)
146 InnerIterator(const BlockSparseMatrixView& mat, Index outer)
168 typedef typename BlockSparseMatrixT::Index Index;
173 inline Index cols() const
177 inline Index size() const
181 inline Scalar coeff(Index bi) const
183 Index startRow = m_spblockmat.blockRowsIndex(bi);
184 Index rowSize = m_spblockmat.blockRowsIndex(bi+1) - startRow;
187 inline Scalar coeff(Index bi, Index j) const
189 Index startRow = m_spblockmat.blockRowsIndex(bi);
190 Index rowSize = m_spblockmat.blockRowsIndex(bi+1) - startRow;
198 template<typename VectorType, typename Index> class BlockVectorReturn;
212 typedef typename BlockSparseMatrixT::Index Index;
217 inline Index size() const
221 inline Scalar coeffRef(Index bi)
223 Index startRow = m_spblockmat.blockRowsIndex(bi);
224 Index rowSize = m_spblockmat.blockRowsIndex(bi+1) - startRow;
227 inline Scalar coeffRef(Index bi, Index j)
229 Index startRow = m_spblockmat.blockRowsIndex(bi);
230 Index rowSize = m_spblockmat.blockRowsIndex(bi+1) - startRow;
251 typedef typename BlockSparseMatrixT::Index Index;
320 BlockSparseMatrix(Index brow, Index bcol)
410 typedef SparseMatrix<bool,MatrixType::Options,typename MatrixType::Index> MatrixPatternType;
425 StorageIndex bi = innerToBlock(it_spmat.index()); // Index of the current nonzero block
428 // Save the index of this nonzero block
453 StorageIndex bi = innerToBlock(it_spmat.index()); // Index of the current nonzero block
462 idxVal += (j - blockOuterIndex(bj)) * blockOuterSize(bj) + it_spmat.index() - m_innerOffset[bi];
469 idxVal += (j - blockOuterIndex(bj)) * m_blockSize + (it_spmat.index()%m_blockSize);
517 nzBlockIdx.push_back(it.index());
538 inline void resize(Index brow, Index bcol)
549 inline void setBlockSize(Index blockSize)
570 // starting index of blocks... cumulative sums
596 inline void reserve(const Index nonzerosblocks)
678 // Setup outer index pointers and markers
708 // for(Index bcol = 0; bcol < m_outerBSize; ++bcol)
710 // Index id = 0, id_nz = 0, id_nzblock = 0;
720 // Index block_size = it->value().rows()*it->value().cols();
738 inline Index rows() const
747 inline Index cols() const
753 inline Index innerSize() const
759 inline Index outerSize() const
765 inline Index blockRows() const
770 inline Index blockCols() const
775 inline Index outerBlocks() const { return m_outerBSize; }
776 inline Index innerBlocks() const { return m_innerBSize; }
778 /** \returns the block index where outer belongs to */
779 inline Index outerToBlock(Index outer) const
781 eigen_assert(outer < outerSize() && "OUTER INDEX OUT OF BOUNDS");
790 /** \returns the block index where inner belongs to */
791 inline Index innerToBlock(Index inner) const
793 eigen_assert(inner < innerSize() && "OUTER INDEX OUT OF BOUNDS");
806 Ref<BlockScalar> coeffRef(Index brow, Index bcol)
808 eigen_assert(brow < blockRows() && "BLOCK ROW INDEX OUT OF BOUNDS");
832 Map<const BlockScalar> coeff(Index brow, Index bcol) const
834 eigen_assert(brow < blockRows() && "BLOCK ROW INDEX OUT OF BOUNDS");
860 inline Index nonZerosBlocks() const { return m_nonzerosblocks; }
862 inline Index
874 * \returns the starting index of the bi row block
876 inline Index blockRowsIndex(Index bi) const
882 * \returns the starting index of the bj col block
884 inline Index blockColsIndex(Index bj) const
889 inline Index blockOuterIndex(Index bj) const
893 inline Index blockInnerIndex(Index bi) const
899 inline Index blockInnerSize(Index bi) const
903 inline Index blockOuterSize(Index bj) const
909 * \brief Browse the matrix by outer index
914 * \brief Browse the matrix by block outer index
936 Index blockPtr(Index id) const
945 // inline Index blockDynIdx(Index id, internal::true_type) const
949 // inline Index blockDynIdx(Index id, internal::false_type) const
956 Map<BlockScalar> insert(Index brow, Index bcol);
958 Index m_innerBSize; // Number of block rows
959 Index m_outerBSize; // Number of block columns
960 StorageIndex *m_innerOffset; // Starting index of each inner block (size m_innerBSize+1)
961 StorageIndex *m_outerOffset; // Starting index of each outer block (size m_outerBSize+1)
962 Index m_nonzerosblocks; // Total nonzeros blocks (lower than m_innerBSize x m_outerBSize)
963 Index m_nonzeros; // Total nonzeros elements
968 Index m_blockSize; // Size of a block for fixed-size blocks, otherwise -1
980 BlockInnerIterator(const BlockSparseMatrix& mat, const Index outer)
999 // Block inner index
1000 inline Index index() const {return m_mat.m_indices[m_id]; }
1001 inline Index outer() const { return m_outer; }
1002 // block row index
1003 inline Index row() const {return index(); }
1004 // block column index
1005 inline Index col() const {return outer(); }
1007 inline Index rows() const { return (m_mat.m_blockSize==Dynamic) ? (m_mat.m_innerOffset[index()+1] - m_mat.m_innerOffset[index()]) : m_mat.m_blockSize; }
1009 inline Index cols() const { return (m_mat.m_blockSize==Dynamic) ? (m_mat.m_outerOffset[m_outer+1]-m_mat.m_outerOffset[m_outer]) : m_mat.m_blockSize;}
1014 const Index m_outer;
1015 Index m_id;
1016 Index m_end;
1023 InnerIterator(const BlockSparseMatrix& mat, Index outer)
1030 m_id = m_mat.blockInnerIndex(itb.index());
1032 m_end = m_mat.blockInnerIndex(itb.index()+1);
1043 m_id = m_mat.blockInnerIndex(itb.index());
1045 m_end = m_mat.blockInnerIndex(itb.index()+1);
1058 inline Index index() const { return m_id; }
1059 inline Index outer() const {return m_outer; }
1060 inline Index col() const {return outer(); }
1061 inline Index row() const { return index();}
1068 const Index m_outer;
1069 const Index m_outerB;
1071 const Index m_offset; // Position of this column in the block
1072 Index m_start; // starting inner index of this block
1073 Index m_id; // current inner index in the block
1074 Index m_end; // starting inner index of the next block