Dune Core Modules (2.8.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...
 
VertexPropertiesgetVertexProperties (const VertexDescriptor &vertex)
 Get the properties associated with a vertex. More...
 
const VertexPropertiesgetVertexProperties (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...
 
EdgePropertiesgetEdgeProperties (const EdgeDescriptor &edge)
 Get the properties associated with a edge. More...
 
const EdgePropertiesgetEdgeProperties (const EdgeDescriptor &edge) const
 Get the properties associated with a edge. More...
 
EdgePropertiesgetEdgeProperties (const VertexDescriptor &source, const VertexDescriptor &target)
 Get the properties associated with a edge. More...
 
const EdgePropertiesgetEdgeProperties (const VertexDescriptor &source, const VertexDescriptor &target) const
 Get the properties associated with a edge. More...
 
const Graphgraph () 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

template<class G, class VP, class EP, class VM = IdentityMap, class EM = IdentityMap>
class Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >

Attaches properties to the edges and vertices of a graph.

Member Typedef Documentation

◆ EdgeMap

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
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

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
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()

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::PropertiesGraph ( Graph graph,
const VertexMap vmap = VertexMap(),
const EdgeMap emap = EdgeMap() 
)

Constructor.

Parameters
graphThe graph we attach properties to.
vmapThe map of the vertices onto indices.
emapThe map of the edges onto indices.

Member Function Documentation

◆ begin() [1/2]

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
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]

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
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]

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
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]

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
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]

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
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]

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
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]

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
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]

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
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()

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
EdgeDescriptor Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::findEdge ( const VertexDescriptor source,
const VertexDescriptor target 
)
inline

Find the descriptor of an edge.

Parameters
sourceThe source vertex of the edge we search for.
targetThe 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]

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
EdgeProperties & Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::getEdgeProperties ( const EdgeDescriptor edge)

Get the properties associated with a edge.

Parameters
edgeThe descriptor identifying the edge.
Returns
The properties of the edge.

◆ getEdgeProperties() [2/4]

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
const EdgeProperties & Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::getEdgeProperties ( const EdgeDescriptor edge) const

Get the properties associated with a edge.

Parameters
edgeThe descriptor identifying the edge.
Returns
The properties of the edge.

◆ getEdgeProperties() [3/4]

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
EdgeProperties & Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::getEdgeProperties ( const VertexDescriptor source,
const VertexDescriptor target 
)

Get the properties associated with a edge.

Parameters
sourceThe descriptor identifying the source vertex of the edge.
targetThe descriptor identifying the target vertex of the edge.
Returns
The properties of the edge.

◆ getEdgeProperties() [4/4]

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
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
sourceThe descriptor identifying the source vertex of the edge.
targetThe descriptor identifying the target vertex of the edge.
Returns
The properties of the edge.

◆ getVertexProperties() [1/2]

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
VertexProperties & Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::getVertexProperties ( const VertexDescriptor vertex)

Get the properties associated with a vertex.

Parameters
vertexThe descriptor identifying the vertex.
Returns
The properties of the vertex.

◆ getVertexProperties() [2/2]

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
const VertexProperties & Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::getVertexProperties ( const VertexDescriptor vertex) const

Get the properties associated with a vertex.

Parameters
vertexThe descriptor identifying the vertex.
Returns
The properties of the vertex.

◆ graph()

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
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()

template<class G , class VP , class EP , class VM = IdentityMap, class EM = IdentityMap>
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:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 22, 23:30, 2024)