dune-istl  2.2.1
Classes | Public Types | Public Member Functions | List of all members
Dune::Amg::SubGraph< G, T > Class Template Reference

A subgraph of a graph. More...

#include <dune/istl/paamg/graph.hh>

Classes

class  EdgeIndexMap
 An index map for mapping the edges to indices. More...
class  EdgeIterator
 The edge iterator of the graph. More...
class  VertexIterator
 The vertex iterator of the graph. More...

Public Types

typedef G Graph
 The type of the graph we are a sub graph for.
typedef T Excluded
 Random access container providing information about which vertices are excluded.
typedef Graph::VertexDescriptor VertexDescriptor
 The vertex descriptor.
typedef VertexDescriptorEdgeDescriptor
typedef EdgeIterator ConstEdgeIterator
 The constant edge iterator type.
typedef VertexIterator ConstVertexIterator
 The constant vertex iterator type.

Public Member Functions

EdgeIndexMap getEdgeIndexMap ()
 Get an edge index map for the graph.
ConstVertexIterator begin () const
 Get an iterator over the vertices.
ConstVertexIterator end () const
 Get an iterator over the vertices.
ConstEdgeIterator beginEdges (const VertexDescriptor &source) const
 Get an iterator over the edges starting at a vertex.
ConstEdgeIterator endEdges (const VertexDescriptor &source) const
 Get an iterator over the edges starting at a vertex.
std::size_t noVertices () const
 Get the number of vertices in the graph.
VertexDescriptor maxVertex () const
 Get the maximal vertex descriptor.
std::size_t noEdges () const
 Get the number of edges in the graph.
const EdgeDescriptor findEdge (const VertexDescriptor &source, const VertexDescriptor &target) const
 Find the descriptor of an edge.
 SubGraph (const Graph &graph, const T &excluded)
 Constructor.
 ~SubGraph ()
 Destructor.

Detailed Description

template<class G, class T>
class Dune::Amg::SubGraph< G, T >

A subgraph of a graph.

This is a (cached) view of a graph where certain vertices and edges pointing to and leading from them are skipped.

The vertex descriptors are not changed.

Member Typedef Documentation

template<class G, class T>
typedef EdgeIterator Dune::Amg::SubGraph< G, T >::ConstEdgeIterator

The constant edge iterator type.

template<class G, class T>
typedef VertexIterator Dune::Amg::SubGraph< G, T >::ConstVertexIterator

The constant vertex iterator type.

template<class G, class T>
typedef VertexDescriptor* Dune::Amg::SubGraph< G, T >::EdgeDescriptor
template<class G, class T>
typedef T Dune::Amg::SubGraph< G, T >::Excluded

Random access container providing information about which vertices are excluded.

template<class G, class T>
typedef G Dune::Amg::SubGraph< G, T >::Graph

The type of the graph we are a sub graph for.

template<class G, class T>
typedef Graph::VertexDescriptor Dune::Amg::SubGraph< G, T >::VertexDescriptor

The vertex descriptor.

Constructor & Destructor Documentation

template<class G, class T>
Dune::Amg::SubGraph< G, T >::SubGraph ( const Graph graph,
const T &  excluded 
)

Constructor.

Parameters
graphThe graph we are a sub graph for.
excludedIf excluded[i] is true then vertex i will not appear in the sub graph.
template<class G, class T>
Dune::Amg::SubGraph< G, T >::~SubGraph ( )

Destructor.

Member Function Documentation

template<class G, class T>
ConstVertexIterator Dune::Amg::SubGraph< G, T >::begin ( ) const

Get an iterator over the vertices.

Returns
A vertex Iterator positioned at the first vertex.
template<class G, class T>
ConstEdgeIterator Dune::Amg::SubGraph< G, T >::beginEdges ( const VertexDescriptor source) const

Get an iterator over the edges starting at a vertex.

Parameters
sourceThe vertex where the edges should start.
Returns
An edge iterator positioned at the first edge starting from vertex source.
template<class G, class T>
ConstVertexIterator Dune::Amg::SubGraph< G, T >::end ( ) const

Get an iterator over the vertices.

Returns
A vertex Iterator positioned behind the last vertex.
template<class G, class T>
ConstEdgeIterator Dune::Amg::SubGraph< G, T >::endEdges ( const VertexDescriptor source) const

Get an iterator over the edges starting at a vertex.

Parameters
sourceThe vertex where the edges should start.
Returns
An edge iterator positioned behind the last edge starting from vertex source.
template<class G, class T>
const EdgeDescriptor Dune::Amg::SubGraph< G, T >::findEdge ( const VertexDescriptor source,
const VertexDescriptor target 
) const

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.
template<class G, class T>
EdgeIndexMap Dune::Amg::SubGraph< G, T >::getEdgeIndexMap ( )
template<class G, class T>
VertexDescriptor Dune::Amg::SubGraph< G, T >::maxVertex ( ) const

Get the maximal vertex descriptor.

Returns
The minimum value v such that for all vertices w in the graph w<v holds.
template<class G, class T>
std::size_t Dune::Amg::SubGraph< G, T >::noEdges ( ) const

Get the number of edges in the graph.

template<class G, class T>
std::size_t Dune::Amg::SubGraph< G, T >::noVertices ( ) const

Get the number of vertices in the graph.


The documentation for this class was generated from the following file: