Dune Core Modules (2.5.0)
Attaches properties to the edges and vertices of a graph. More...
#include <dune/istl/paamg/graph.hh>
Public Types | |
typedef G | Graph |
The graph we attach properties to. | |
typedef Graph::VertexDescriptor | VertexDescriptor |
The vertex descriptor. | |
typedef Graph::EdgeDescriptor | EdgeDescriptor |
The edge descritor. | |
typedef VP | VertexProperties |
The type of the properties of the vertices. | |
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;. | |
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. | |
typedef EdgeIteratorT< const PropertiesGraph< Graph, VertexProperties, EdgeProperties, VM, EM > > | ConstEdgeIterator |
The type of the constant edge iterator. | |
typedef VertexIteratorT< PropertiesGraph< Graph, VertexProperties, EdgeProperties, VM, EM > > | VertexIterator |
The type of the mutable Vertex iterator. | |
typedef VertexIteratorT< const PropertiesGraph< Graph, VertexProperties, EdgeProperties, VM, EM > > | ConstVertexIterator |
The type of the constant Vertex iterator. | |
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. | |
std::size_t | noEdges () const |
Get the number of edges in the graph. | |
VertexDescriptor | maxVertex () const |
Get the maximal vertex descriptor. More... | |
PropertiesGraph (Graph &graph, const VertexMap &vmap=VertexMap(), const EdgeMap &emap=EdgeMap()) | |
Constructor. More... | |
Detailed Description
class Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >
Attaches properties to the edges and vertices of a graph.
Member Typedef Documentation
◆ EdgeMap
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.
◆ VertexMap
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.
Constructor & Destructor Documentation
◆ PropertiesGraph()
Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::PropertiesGraph | ( | Graph & | graph, |
const VertexMap & | vmap = VertexMap() , |
||
const EdgeMap & | emap = EdgeMap() |
||
) |
Constructor.
- Parameters
-
graph The graph we attach properties to. vmap The map of the vertices onto indices. emap The map of the edges onto indices.
Member Function Documentation
◆ begin() [1/2]
VertexIterator Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::begin | ( | ) |
Get an iterator over the vertices.
- Returns
- A vertex Iterator positioned at the first vertex.
◆ begin() [2/2]
ConstVertexIterator Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::begin | ( | ) | const |
Get an iterator over the vertices.
- Returns
- A vertex Iterator positioned at the first vertex.
◆ beginEdges() [1/2]
EdgeIterator Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::beginEdges | ( | const VertexDescriptor & | source | ) |
Get the mutable edge iterator over edges starting at a vertex.
- Returns
- An edge iterator over edges starting at a vertex positioned at the first edge.
◆ beginEdges() [2/2]
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.
- Returns
- An edge iterator over edges starting at a vertex positioned at the first edge.
◆ end() [1/2]
VertexIterator Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::end | ( | ) |
Get an iterator over the vertices.
- Returns
- A vertex Iterator positioned behind the last vertex.
◆ end() [2/2]
ConstVertexIterator Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::end | ( | ) | const |
Get an iterator over the vertices.
- Returns
- A vertex Iterator positioned behind the last vertex.
◆ endEdges() [1/2]
EdgeIterator Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::endEdges | ( | const VertexDescriptor & | source | ) |
Get the mutable edge iterator over edges starting at a vertex.
- Returns
- An edge iterator over edges starting at a vertex positioned after the last edge.
◆ endEdges() [2/2]
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.
- Returns
- An edge iterator over edges starting at a vertex positioned after the last edge.
References Dune::Amg::VertexPropertiesGraph< G, VP, VM >::begin(), and Dune::Amg::VertexPropertiesGraph< G, VP, VM >::end().
◆ findEdge()
|
inline |
Find the descriptor of an edge.
- Parameters
-
source The source vertex of the edge we search for. target The target vertex of the edge we search for.
- Returns
- The edge we found or numeric_limits<EdgeIterator>::max() if it does not exist.
◆ getEdgeProperties() [1/4]
EdgeProperties & Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::getEdgeProperties | ( | const EdgeDescriptor & | edge | ) |
Get the properties associated with a edge.
- Parameters
-
edge The descriptor identifying the edge.
- Returns
- The properties of the edge.
◆ getEdgeProperties() [2/4]
const EdgeProperties & Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::getEdgeProperties | ( | const EdgeDescriptor & | edge | ) | const |
Get the properties associated with a edge.
- Parameters
-
edge The descriptor identifying the edge.
- Returns
- The properties of the edge.
◆ getEdgeProperties() [3/4]
EdgeProperties & Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::getEdgeProperties | ( | const VertexDescriptor & | source, |
const VertexDescriptor & | target | ||
) |
Get the properties associated with a edge.
- Parameters
-
source The descriptor identifying the source vertex of the edge. target The descriptor identifying the target vertex of the edge.
- Returns
- The properties of the edge.
◆ getEdgeProperties() [4/4]
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.
- Parameters
-
source The descriptor identifying the source vertex of the edge. target The descriptor identifying the target vertex of the edge.
- Returns
- The properties of the edge.
◆ getVertexProperties() [1/2]
VertexProperties & Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::getVertexProperties | ( | const VertexDescriptor & | vertex | ) |
Get the properties associated with a vertex.
- Parameters
-
vertex The descriptor identifying the vertex.
- Returns
- The properties of the vertex.
◆ getVertexProperties() [2/2]
const VertexProperties & Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::getVertexProperties | ( | const VertexDescriptor & | vertex | ) | const |
Get the properties associated with a vertex.
- Parameters
-
vertex The descriptor identifying the vertex.
- Returns
- The properties of the vertex.
◆ graph()
const Graph & Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::graph | ( | ) | const |
Get the graph the properties are attached to.
- Returns
- The underlying graph.
◆ maxVertex()
VertexDescriptor Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::maxVertex | ( | ) | const |
Get the maximal vertex descriptor.
- Returns
- The minimum value v such that for all vertices w in the graph w<v holds.
Referenced by Dune::Amg::AggregationLevelTransferPolicy< O, C >::createCoarseLevelSystem().
The documentation for this class was generated from the following file:
- dune/istl/paamg/graph.hh