Dune Core Modules (2.8.0)

Attaches properties to the 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 Graph::EdgeIterator EdgeIterator
 The type of the mutable edge iterator.
 
typedef Graph::ConstEdgeIterator ConstEdgeIterator
 The type of the constant edge iterator.
 
typedef VertexIteratorT< VertexPropertiesGraph< Graph, VertexProperties, VM > > VertexIterator
 The type of the mutable Vertex iterator.
 
typedef VertexIteratorT< const VertexPropertiesGraph< Graph, VertexProperties, VM > > 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...
 
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...
 
 VertexPropertiesGraph (Graph &graph, const VertexMap vmap=VertexMap())
 Constructor. More...
 

Detailed Description

template<class G, class VP, class VM = IdentityMap>
class Dune::Amg::VertexPropertiesGraph< G, VP, VM >

Attaches properties to the vertices of a graph.

Member Typedef Documentation

◆ VertexMap

template<class G , class VP , class VM = IdentityMap>
typedef VM Dune::Amg::VertexPropertiesGraph< G, VP, VM >::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

◆ VertexPropertiesGraph()

template<class G , class VP , class VM = IdentityMap>
Dune::Amg::VertexPropertiesGraph< G, VP, VM >::VertexPropertiesGraph ( Graph graph,
const VertexMap  vmap = VertexMap() 
)

Constructor.

Parameters
graphThe graph we attach properties to.
vmapThe vertex map.

Member Function Documentation

◆ begin() [1/2]

template<class G , class VP , class VM = IdentityMap>
VertexIterator Dune::Amg::VertexPropertiesGraph< G, VP, VM >::begin ( )

Get an iterator over the vertices.

Returns
A vertex Iterator positioned at the first vertex.

Referenced by Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::endEdges().

◆ begin() [2/2]

template<class G , class VP , class VM = IdentityMap>
ConstVertexIterator Dune::Amg::VertexPropertiesGraph< G, VP, VM >::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 VM = IdentityMap>
EdgeIterator Dune::Amg::VertexPropertiesGraph< G, VP, VM >::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 VM = IdentityMap>
ConstEdgeIterator Dune::Amg::VertexPropertiesGraph< G, VP, VM >::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 VM = IdentityMap>
VertexIterator Dune::Amg::VertexPropertiesGraph< G, VP, VM >::end ( )

Get an iterator over the vertices.

Returns
A vertex Iterator positioned behind the last vertex.

Referenced by Dune::Amg::PropertiesGraph< G, VP, EP, VM, EM >::endEdges().

◆ end() [2/2]

template<class G , class VP , class VM = IdentityMap>
ConstVertexIterator Dune::Amg::VertexPropertiesGraph< G, VP, VM >::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 VM = IdentityMap>
EdgeIterator Dune::Amg::VertexPropertiesGraph< G, VP, VM >::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 VM = IdentityMap>
ConstEdgeIterator Dune::Amg::VertexPropertiesGraph< G, VP, VM >::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.

◆ getVertexProperties() [1/2]

template<class G , class VP , class VM = IdentityMap>
VertexProperties & Dune::Amg::VertexPropertiesGraph< G, VP, VM >::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 VM = IdentityMap>
const VertexProperties & Dune::Amg::VertexPropertiesGraph< G, VP, VM >::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 VM = IdentityMap>
const Graph & Dune::Amg::VertexPropertiesGraph< G, VP, VM >::graph ( ) const

Get the graph the properties are attached to.

Returns
The underlying graph.

◆ maxVertex()

template<class G , class VP , class VM = IdentityMap>
VertexDescriptor Dune::Amg::VertexPropertiesGraph< G, VP, VM >::maxVertex ( ) const

Get the maximal vertex descriptor.

Returns
The minimum value v such that for all vertices w in the graph w<v holds.

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)