Dune::MatrixIndexSet Class Reference

Stores the nonzero entries in a sparse matrix. More...

#include <dune/istl/matrixindexset.hh>

List of all members.

Public Member Functions

 MatrixIndexSet ()
 Default constructor.
 MatrixIndexSet (int rows, int cols)
 Constructor setting the matrix size.
void resize (int rows, int cols)
 Reset the size of an index set.
void add (int i, int j)
 Add an index to the index set.
int size () const
 Return the number of entries.
int rows () const
 Return the number of rows.
int rowsize (int row) const
 Return the number of entries in a given row.
template<class MatrixType >
void import (const MatrixType &m, int rowOffset=0, int 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.

Detailed Description

Stores the nonzero entries in a sparse matrix.


Constructor & Destructor Documentation

Dune::MatrixIndexSet::MatrixIndexSet (  )  [inline]

Default constructor.

Dune::MatrixIndexSet::MatrixIndexSet ( int  rows,
int  cols 
) [inline]

Constructor setting the matrix size.


Member Function Documentation

void Dune::MatrixIndexSet::add ( int  i,
int  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:
MatrixType Needs to be BCRSMatrix<...>
Parameters:
matrix reference to the MatrixType object
template<class MatrixType >
void Dune::MatrixIndexSet::import ( const MatrixType &  m,
int  rowOffset = 0,
int  colOffset = 0 
) [inline]

Import all nonzero entries of a sparse matrix into the index set.

Template Parameters:
MatrixType Needs to be BCRSMatrix<...>
Parameters:
m reference to the MatrixType object
rowOffset don't write to rows<rowOffset
colOffset don't write to cols<colOffset

References add(), and row.

void Dune::MatrixIndexSet::resize ( int  rows,
int  cols 
) [inline]

Reset the size of an index set.

int Dune::MatrixIndexSet::rows (  )  const [inline]

Return the number of rows.

int Dune::MatrixIndexSet::rowsize ( int  row  )  const [inline]

Return the number of entries in a given row.

int Dune::MatrixIndexSet::size (  )  const [inline]

Return the number of entries.


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

Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].