dune-istl  2.3.0
Public Types | Public Member Functions | List of all members
Dune::MatrixIndexSet Class Reference

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. More...
 
 MatrixIndexSet (size_type rows, size_type cols)
 Constructor setting the matrix size. More...
 
void resize (size_type rows, size_type cols)
 Reset the size of an index set. More...
 
void add (size_type i, size_type j)
 Add an index to the index set. More...
 
size_type size () const
 Return the number of entries. More...
 
size_type rows () const
 Return the number of rows. More...
 
size_type rowsize (size_type row) const
 Return the number of entries in a given row. More...
 
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. More...
 
template<class MatrixType >
void exportIdx (MatrixType &matrix) const
 Initializes a BCRSMatrix with the indices contained in this MatrixIndexSet. More...
 

Detailed Description

Stores the nonzero entries in a sparse matrix.

Member Typedef Documentation

typedef std::size_t Dune::MatrixIndexSet::size_type

Constructor & Destructor Documentation

Dune::MatrixIndexSet::MatrixIndexSet ( )
inline

Default constructor.

Dune::MatrixIndexSet::MatrixIndexSet ( size_type  rows,
size_type  cols 
)
inline

Constructor setting the matrix size.

Member Function Documentation

void Dune::MatrixIndexSet::add ( size_type  i,
size_type  j 
)
inline

Add an index to the index set.

Referenced by import().

template<class MatrixType >
void Dune::MatrixIndexSet::exportIdx ( MatrixType &  matrix) const
inline

Initializes a BCRSMatrix with the indices contained in this MatrixIndexSet.

Template Parameters
MatrixTypeNeeds to be BCRSMatrix<...>
Parameters
matrixreference to the MatrixType object
template<class MatrixType >
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.

Template Parameters
MatrixTypeNeeds to be BCRSMatrix<...>
Parameters
mreference to the MatrixType object
rowOffsetdon't write to rows<rowOffset
colOffsetdon't write to cols<colOffset

References add(), and row.

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.


The documentation for this class was generated from the following file: