dune-istl
2.2.0
|
Stores the nonzero entries in a sparse matrix. More...
#include <dune/istl/matrixindexset.hh>
Public Types | |
typedef std::size_t | size_type |
Public Member Functions | |
MatrixIndexSet () | |
Default constructor. | |
MatrixIndexSet (size_type rows, size_type cols) | |
Constructor setting the matrix size. | |
void | resize (size_type rows, size_type cols) |
Reset the size of an index set. | |
void | add (size_type i, size_type j) |
Add an index to the index set. | |
size_type | size () const |
Return the number of entries. | |
size_type | rows () const |
Return the number of rows. | |
size_type | rowsize (size_type row) const |
Return the number of entries in a given row. | |
template<class MatrixType > | |
void | import (const MatrixType &m, size_type rowOffset=0, size_type colOffset=0) |
Import all nonzero entries of a sparse matrix into the index set. | |
template<class MatrixType > | |
void | exportIdx (MatrixType &matrix) const |
Initializes a BCRSMatrix with the indices contained in this MatrixIndexSet. |
Stores the nonzero entries in a sparse matrix.
typedef std::size_t Dune::MatrixIndexSet::size_type |
Dune::MatrixIndexSet::MatrixIndexSet | ( | ) | [inline] |
Default constructor.
Dune::MatrixIndexSet::MatrixIndexSet | ( | size_type | rows, |
size_type | cols | ||
) | [inline] |
Constructor setting the matrix size.
void Dune::MatrixIndexSet::add | ( | size_type | i, |
size_type | j | ||
) | [inline] |
Add an index to the index set.
Referenced by import().
void Dune::MatrixIndexSet::exportIdx | ( | MatrixType & | matrix | ) | const [inline] |
Initializes a BCRSMatrix with the indices contained in this MatrixIndexSet.
MatrixType | Needs to be BCRSMatrix<...> |
matrix | reference to the MatrixType object |
void Dune::MatrixIndexSet::import | ( | const MatrixType & | m, |
size_type | rowOffset = 0 , |
||
size_type | colOffset = 0 |
||
) | [inline] |
Import all nonzero entries of a sparse matrix into the index set.
MatrixType | Needs to be BCRSMatrix<...> |
m | reference to the MatrixType object |
rowOffset | don't write to rows<rowOffset |
colOffset | don't write to cols<colOffset |
void Dune::MatrixIndexSet::resize | ( | size_type | rows, |
size_type | cols | ||
) | [inline] |
Reset the size of an index set.
References rows().
size_type Dune::MatrixIndexSet::rows | ( | ) | const [inline] |
Return the number of rows.
Referenced by resize().
size_type Dune::MatrixIndexSet::rowsize | ( | size_type | row | ) | const [inline] |
Return the number of entries in a given row.
References row.
size_type Dune::MatrixIndexSet::size | ( | ) | const [inline] |
Return the number of entries.