3#ifndef DUNE_ISTL_MATRIXINDEXSET_HH
4#define DUNE_ISTL_MATRIXINDEXSET_HH
25 indices_.resize(rows_);
32 indices_.resize(rows_);
37 indices_[i].insert(j);
44 entries += indices_[i].
size();
62 template <
class MatrixType>
65 typedef typename MatrixType::row_type
RowType;
87 template <
class MatrixType>
90 matrix.setSize(rows_, cols_);
91 matrix.setBuildMode(MatrixType::random);
94 matrix.setrowsize(i, indices_[i].size());
100 typename std::set<size_type>::iterator
it = indices_[i].begin();
101 for (;
it!=indices_[i].end(); ++
it)
102 matrix.addindex(i, *
it);
112 std::vector<std::set<size_type> > indices_;
Definition basearray.hh:19
Statistics about compression achieved in implicit mode.
Definition bcrsmatrix.hh:81
Stores the nonzero entries in a sparse matrix.
Definition matrixindexset.hh:14
void resize(size_type rows, size_type cols)
Reset the size of an index set.
Definition matrixindexset.hh:29
MatrixIndexSet()
Default constructor.
Definition matrixindexset.hh:20
void add(size_type i, size_type j)
Add an index to the index set.
Definition matrixindexset.hh:36
size_type rows() const
Return the number of rows.
Definition matrixindexset.hh:50
std::size_t size_type
Definition matrixindexset.hh:17
void exportIdx(MatrixType &matrix) const
Initializes a BCRSMatrix with the indices contained in this MatrixIndexSet.
Definition matrixindexset.hh:88
MatrixIndexSet(size_type rows, size_type cols)
Constructor setting the matrix size.
Definition matrixindexset.hh:24
size_type rowsize(size_type row) const
Return the number of entries in a given row.
Definition matrixindexset.hh:54
size_type size() const
Return the number of entries.
Definition matrixindexset.hh:41