Dune Core Modules (2.5.2)

Dune::Amg::SubGraph< G, T >::VertexIterator Class Reference

The vertex iterator of the graph. More...

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

Public Types

typedef VertexIterator DerivedType
 The type of derived iterator. More...
 
typedef const VertexDescriptor Value
 The type of value accessed through the iterator.
 
typedef const VertexDescriptorPointer
 The pointer to the Value.
 
typedef std::ptrdiff_t DifferenceType
 The type of the difference between two positions.
 
typedef const VertexDescriptorReference
 The type of the reference to the values accessed.
 

Public Member Functions

 VertexIterator (const SubGraph< G, T > *graph, const VertexDescriptor &current, const VertexDescriptor &end)
 Constructor. More...
 
 VertexIterator (const VertexDescriptor &current)
 Constructor for end iterator. More...
 
VertexIteratorincrement ()
 Preincrement operator.
 
bool equals (const VertexIterator &other) const
 Equality iterator.
 
const VertexDescriptordereference () const
 Get the descriptor of the current vertex. More...
 
EdgeIterator begin () const
 Get an iterator over all edges starting at the current vertex. More...
 
EdgeIterator end () const
 Get an iterator over all edges starting at the current vertex. More...
 
Reference operator* () const
 Dereferencing operator.
 
DerivedTypeoperator++ ()
 Preincrement operator.
 
DerivedType operator++ (int)
 Postincrement operator.
 

Detailed Description

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

The vertex iterator of the graph.

Member Typedef Documentation

◆ DerivedType

The type of derived iterator.

The iterator has to define following functions have to be present:

// Access the value referred to.
// Compare for equality with iterator j
bool equals(j);
// position the iterator at the next element.
void increment()
// check for equality with other iterator
bool equals(other)
VertexIterator & increment()
Preincrement operator.
const VertexDescriptor & dereference() const
Get the descriptor of the current vertex.
bool equals(const VertexIterator &other) const
Equality iterator.
const VertexDescriptor & Reference
The type of the reference to the values accessed.
Definition: iteratorfacades.hh:191

For an elaborate explanation see the STL Documentation!

Constructor & Destructor Documentation

◆ VertexIterator() [1/2]

template<class G , class T >
Dune::Amg::SubGraph< G, T >::VertexIterator::VertexIterator ( const SubGraph< G, T > *  graph,
const VertexDescriptor current,
const VertexDescriptor end 
)
explicit

Constructor.

Parameters
graphThe graph over whose vertices to iterate.
currentThe position of the iterator.
endThe last vertex of the graph.

◆ VertexIterator() [2/2]

template<class G , class T >
Dune::Amg::SubGraph< G, T >::VertexIterator::VertexIterator ( const VertexDescriptor current)
explicit

Constructor for end iterator.

Use with care! All operations except operator== or operator!= will fail!

Parameters
currentThe position of the iterator.

Member Function Documentation

◆ begin()

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

Get an iterator over all edges starting at the current vertex.

Returns
Iterator position on the first edge to another vertex.

◆ dereference()

template<class G , class T >
const VertexDescriptor& Dune::Amg::SubGraph< G, T >::VertexIterator::dereference ( ) const

Get the descriptor of the current vertex.

Returns
The index of the currently referenced vertex.

◆ end()

template<class G , class T >
EdgeIterator Dune::Amg::SubGraph< G, T >::VertexIterator::end ( ) const

Get an iterator over all edges starting at the current vertex.

Returns
Iterator position on the first edge to another vertex.

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.80.0 (May 10, 22:30, 2024)