dune-istl
2.9.0
|
Attaches properties to the edges and vertices of a graph. More...
#include <dune/istl/paamg/graph.hh>
Classes | |
class | EdgeIteratorT |
class | VertexIteratorT |
Public Types | |
typedef G | Graph |
The graph we attach properties to. More... | |
typedef Graph::VertexDescriptor | VertexDescriptor |
The vertex descriptor. More... | |
typedef Graph::EdgeDescriptor | EdgeDescriptor |
The edge descritor. More... | |
typedef VP | VertexProperties |
The type of the properties of the vertices. More... | |
typedef VM | VertexMap |
The type of the map for converting the VertexDescriptor to std::size_t. More... | |
typedef EP | EdgeProperties |
The type of the properties of the edges;. More... | |
typedef EM | EdgeMap |
The type of the map for converting the EdgeDescriptor to std::size_t. More... | |
typedef EdgeIteratorT< PropertiesGraph< Graph, VertexProperties, EdgeProperties, VM, EM > > | EdgeIterator |
The type of the mutable edge iterator. More... | |
typedef EdgeIteratorT< const PropertiesGraph< Graph, VertexProperties, EdgeProperties, VM, EM > > | ConstEdgeIterator |
The type of the constant edge iterator. More... | |
typedef VertexIteratorT< PropertiesGraph< Graph, VertexProperties, EdgeProperties, VM, EM > > | VertexIterator |
The type of the mutable Vertex iterator. More... | |
typedef VertexIteratorT< const PropertiesGraph< Graph, VertexProperties, EdgeProperties, VM, EM > > | ConstVertexIterator |
The type of the constant Vertex iterator. More... | |
Public Member Functions | |
EdgeIterator | beginEdges (const VertexDescriptor &source) |
Get the mutable edge iterator over edges starting at a vertex. More... | |
EdgeIterator | endEdges (const VertexDescriptor &source) |
Get the mutable edge iterator over edges starting at a vertex. More... | |
ConstEdgeIterator | beginEdges (const VertexDescriptor &source) const |
Get the mutable edge iterator over edges starting at a vertex. More... | |
ConstEdgeIterator | endEdges (const VertexDescriptor &source) const |
Get the mutable edge iterator over edges starting at a vertex. 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... | |
VertexProperties & | getVertexProperties (const VertexDescriptor &vertex) |
Get the properties associated with a vertex. More... | |
const VertexProperties & | getVertexProperties (const VertexDescriptor &vertex) const |
Get the properties associated with a vertex. More... | |
EdgeDescriptor | findEdge (const VertexDescriptor &source, const VertexDescriptor &target) |
Find the descriptor of an edge. More... | |
EdgeProperties & | getEdgeProperties (const EdgeDescriptor &edge) |
Get the properties associated with a edge. More... | |
const EdgeProperties & | getEdgeProperties (const EdgeDescriptor &edge) const |
Get the properties associated with a edge. More... | |
EdgeProperties & | getEdgeProperties (const VertexDescriptor &source, const VertexDescriptor &target) |
Get the properties associated with a edge. More... | |
const EdgeProperties & | getEdgeProperties (const VertexDescriptor &source, const VertexDescriptor &target) const |
Get the properties associated with a edge. More... | |
const Graph & | graph () const |
Get the graph the properties are attached to. More... | |
std::size_t | noVertices () const |
Get the number of vertices in the graph. More... | |
std::size_t | noEdges () const |
Get the number of edges in the graph. More... | |
VertexDescriptor | maxVertex () const |
Get the maximal vertex descriptor. More... | |
PropertiesGraph (Graph &graph, const VertexMap &vmap=VertexMap(), const EdgeMap &emap=EdgeMap()) | |
Constructor. More... | |
Attaches properties to the edges and vertices of a graph.
typedef EdgeIteratorT<const PropertiesGraph<Graph, VertexProperties, EdgeProperties,VM,EM> > Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::ConstEdgeIterator |
The type of the constant edge iterator.
typedef VertexIteratorT<const PropertiesGraph<Graph, VertexProperties, EdgeProperties,VM,EM> > Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::ConstVertexIterator |
The type of the constant Vertex iterator.
typedef Graph::EdgeDescriptor Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::EdgeDescriptor |
The edge descritor.
typedef EdgeIteratorT<PropertiesGraph<Graph, VertexProperties, EdgeProperties,VM,EM> > Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::EdgeIterator |
The type of the mutable edge iterator.
typedef EM Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::EdgeMap |
The type of the map for converting the EdgeDescriptor to std::size_t.
Has to provide the following method: std::size_t operator[](const EdgeDescriptor& vertex)
The following condition has to be met: Let e1 and e2 be two edge descriptors, e1 < e2, and map be the index map. Then map[v1]<map[v2] has to hold.
typedef EP Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::EdgeProperties |
The type of the properties of the edges;.
typedef G Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::Graph |
The graph we attach properties to.
typedef Graph::VertexDescriptor Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::VertexDescriptor |
The vertex descriptor.
typedef VertexIteratorT<PropertiesGraph<Graph, VertexProperties, EdgeProperties,VM,EM> > Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::VertexIterator |
The type of the mutable Vertex iterator.
typedef VM Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::VertexMap |
The type of the map for converting the VertexDescriptor to std::size_t.
Has to provide the following method: std::size_t operator[](const VertexDescriptor& vertex)
The following condition has to be met: Let v1 and v2 be two vertex descriptors with v1 < v2 and map be the index map. Then map[v1]<map[v2] has to hold.
typedef VP Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::VertexProperties |
The type of the properties of the vertices.
Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::PropertiesGraph | ( | Graph & | graph, |
const VertexMap & | vmap = VertexMap() , |
||
const EdgeMap & | emap = EdgeMap() |
||
) |
Constructor.
graph | The graph we attach properties to. |
vmap | The map of the vertices onto indices. |
emap | The map of the edges onto indices. |
VertexIterator Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::begin | ( | ) |
Get an iterator over the vertices.
ConstVertexIterator Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::begin | ( | ) | const |
Get an iterator over the vertices.
EdgeIterator Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::beginEdges | ( | const VertexDescriptor & | source | ) |
Get the mutable edge iterator over edges starting at a vertex.
ConstEdgeIterator Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::beginEdges | ( | const VertexDescriptor & | source | ) | const |
Get the mutable edge iterator over edges starting at a vertex.
VertexIterator Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::end | ( | ) |
Get an iterator over the vertices.
ConstVertexIterator Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::end | ( | ) | const |
Get an iterator over the vertices.
EdgeIterator Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::endEdges | ( | const VertexDescriptor & | source | ) |
Get the mutable edge iterator over edges starting at a vertex.
ConstEdgeIterator Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::endEdges | ( | const VertexDescriptor & | source | ) | const |
Get the mutable edge iterator over edges starting at a vertex.
|
inline |
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. |
EdgeProperties& Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::getEdgeProperties | ( | const EdgeDescriptor & | edge | ) |
Get the properties associated with a edge.
edge | The descriptor identifying the edge. |
const EdgeProperties& Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::getEdgeProperties | ( | const EdgeDescriptor & | edge | ) | const |
Get the properties associated with a edge.
edge | The descriptor identifying the edge. |
EdgeProperties& Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::getEdgeProperties | ( | const VertexDescriptor & | source, |
const VertexDescriptor & | target | ||
) |
Get the properties associated with a edge.
source | The descriptor identifying the source vertex of the edge. |
target | The descriptor identifying the target vertex of the edge. |
const EdgeProperties& Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::getEdgeProperties | ( | const VertexDescriptor & | source, |
const VertexDescriptor & | target | ||
) | const |
Get the properties associated with a edge.
source | The descriptor identifying the source vertex of the edge. |
target | The descriptor identifying the target vertex of the edge. |
VertexProperties& Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::getVertexProperties | ( | const VertexDescriptor & | vertex | ) |
Get the properties associated with a vertex.
vertex | The descriptor identifying the vertex. |
const VertexProperties& Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::getVertexProperties | ( | const VertexDescriptor & | vertex | ) | const |
Get the properties associated with a vertex.
vertex | The descriptor identifying the vertex. |
const Graph& Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::graph | ( | ) | const |
Get the graph the properties are attached to.
VertexDescriptor Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::maxVertex | ( | ) | const |
Get the maximal vertex descriptor.
std::size_t Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::noEdges | ( | ) | const |
Get the number of edges in the graph.
std::size_t Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::noVertices | ( | ) | const |
Get the number of vertices in the graph.