dune-istl
2.5.1
|
The (undirected) graph of a matrix. More...
#include <dune/istl/paamg/graph.hh>
Classes | |
class | EdgeIteratorT |
Iterator over all edges starting from a vertex. More... | |
class | VertexIteratorT |
The vertex iterator type of the graph. More... | |
Public Types | |
enum | { mutableMatrix = std::is_same<M, typename std::remove_const<M>::type>::value } |
typedef M | Matrix |
The type of the matrix we are a graph for. More... | |
typedef std::remove_const< M >::type | MutableMatrix |
The mutable type of the matrix we are a graph for. More... | |
typedef M::block_type | Weight |
The type of the weights. More... | |
typedef M::size_type | VertexDescriptor |
The vertex descriptor. More... | |
typedef std::ptrdiff_t | EdgeDescriptor |
The edge descriptor. More... | |
typedef EdgeIteratorT< const MatrixGraph< Matrix > > | ConstEdgeIterator |
The constant edge iterator type. More... | |
typedef EdgeIteratorT< MatrixGraph< Matrix > > | EdgeIterator |
The mutable edge iterator type. More... | |
typedef VertexIteratorT< const MatrixGraph< Matrix > > | ConstVertexIterator |
The constant vertex iterator type. More... | |
typedef VertexIteratorT< MatrixGraph< Matrix > > | VertexIterator |
The mutable vertex iterator type. More... | |
Public Member Functions | |
MatrixGraph (Matrix &matrix) | |
Constructor. More... | |
~MatrixGraph () | |
Destructor. More... | |
VertexIterator | begin () |
Get an iterator over the vertices. More... | |
VertexIterator | end () |
Get an iterator over the vertices. More... | |
ConstVertexIterator | begin () const |
Get an iterator over the vertices. More... | |
ConstVertexIterator | end () const |
Get an iterator over the vertices. More... | |
EdgeIterator | beginEdges (const VertexDescriptor &source) |
Get an iterator over the edges starting at a vertex. More... | |
EdgeIterator | endEdges (const VertexDescriptor &source) |
Get an iterator over the edges starting at a vertex. More... | |
ConstEdgeIterator | beginEdges (const VertexDescriptor &source) const |
Get an iterator over the edges starting at a vertex. More... | |
ConstEdgeIterator | endEdges (const VertexDescriptor &source) const |
Get an iterator over the edges starting at a vertex. More... | |
Matrix & | matrix () |
Get the underlying matrix. More... | |
const Matrix & | matrix () const |
Get the underlying matrix. More... | |
std::size_t | noVertices () const |
Get the number of vertices in the graph. More... | |
VertexDescriptor | maxVertex () const |
Get the maximal vertex descriptor. More... | |
std::size_t | noEdges () const |
Get the number of edges in the graph. More... | |
EdgeDescriptor | findEdge (const VertexDescriptor &source, const VertexDescriptor &target) const |
Find the descriptor of an edge. More... | |
The (undirected) graph of a matrix.
The graph of a sparse matrix essentially describes the sparsity pattern (nonzero entries) of a matrix. It is assumed that the underlying sparsity pattern is symmetric, i.e if entry a_ij is present in the storage scheme of the matrix (i.e. nonzero) so is a_ji.
The matrix entries can be accessed as weights of the vertices and edges.
typedef EdgeIteratorT<const MatrixGraph<Matrix> > Dune::Amg::MatrixGraph< M >::ConstEdgeIterator |
The constant edge iterator type.
typedef VertexIteratorT<const MatrixGraph<Matrix> > Dune::Amg::MatrixGraph< M >::ConstVertexIterator |
The constant vertex iterator type.
typedef std::ptrdiff_t Dune::Amg::MatrixGraph< M >::EdgeDescriptor |
The edge descriptor.
Each edge is identifies by exactly one descriptor.
typedef EdgeIteratorT<MatrixGraph<Matrix> > Dune::Amg::MatrixGraph< M >::EdgeIterator |
The mutable edge iterator type.
typedef M Dune::Amg::MatrixGraph< M >::Matrix |
The type of the matrix we are a graph for.
typedef std::remove_const<M>::type Dune::Amg::MatrixGraph< M >::MutableMatrix |
The mutable type of the matrix we are a graph for.
typedef M::size_type Dune::Amg::MatrixGraph< M >::VertexDescriptor |
The vertex descriptor.
Each descriptor describes exactly one vertex.
typedef VertexIteratorT<MatrixGraph<Matrix> > Dune::Amg::MatrixGraph< M >::VertexIterator |
The mutable vertex iterator type.
typedef M::block_type Dune::Amg::MatrixGraph< M >::Weight |
The type of the weights.
Dune::Amg::MatrixGraph< M >::MatrixGraph | ( | Matrix & | matrix | ) |
Constructor.
matrix | The matrix we are a graph for. |
Dune::Amg::MatrixGraph< M >::~MatrixGraph | ( | ) |
Destructor.
VertexIterator Dune::Amg::MatrixGraph< M >::begin | ( | ) |
Get an iterator over the vertices.
ConstVertexIterator Dune::Amg::MatrixGraph< M >::begin | ( | ) | const |
Get an iterator over the vertices.
EdgeIterator Dune::Amg::MatrixGraph< M >::beginEdges | ( | const VertexDescriptor & | source | ) |
Get an iterator over the edges starting at a vertex.
source | The vertex where the edges should start. |
ConstEdgeIterator Dune::Amg::MatrixGraph< M >::beginEdges | ( | const VertexDescriptor & | source | ) | const |
Get an iterator over the edges starting at a vertex.
source | The vertex where the edges should start. |
VertexIterator Dune::Amg::MatrixGraph< M >::end | ( | ) |
Get an iterator over the vertices.
ConstVertexIterator Dune::Amg::MatrixGraph< M >::end | ( | ) | const |
Get an iterator over the vertices.
EdgeIterator Dune::Amg::MatrixGraph< M >::endEdges | ( | const VertexDescriptor & | source | ) |
Get an iterator over the edges starting at a vertex.
source | The vertex where the edges should start. |
ConstEdgeIterator Dune::Amg::MatrixGraph< M >::endEdges | ( | const VertexDescriptor & | source | ) | const |
Get an iterator over the edges starting at a vertex.
source | The vertex where the edges should start. |
EdgeDescriptor Dune::Amg::MatrixGraph< M >::findEdge | ( | const VertexDescriptor & | source, |
const VertexDescriptor & | target | ||
) | const |
Find the descriptor of an edge.
source | The source vertex of the edge we search for. |
target | The target vertex of the edge we search for. |
Matrix& Dune::Amg::MatrixGraph< M >::matrix | ( | ) |
Get the underlying matrix.
const Matrix& Dune::Amg::MatrixGraph< M >::matrix | ( | ) | const |
Get the underlying matrix.
VertexDescriptor Dune::Amg::MatrixGraph< M >::maxVertex | ( | ) | const |
Get the maximal vertex descriptor.
std::size_t Dune::Amg::MatrixGraph< M >::noEdges | ( | ) | const |
Get the number of edges in the graph.
std::size_t Dune::Amg::MatrixGraph< M >::noVertices | ( | ) | const |
Get the number of vertices in the graph.