Dune Core Modules (2.4.1)

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

The edge iterator of the graph. More...

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

Public Types

typedef EdgeIterator DerivedType
 The type of derived iterator. More...
 
typedef const EdgeDescriptor Value
 The type of value accessed through the iterator.
 
typedef const EdgeDescriptor * Pointer
 The pointer to the Value.
 
typedef std::ptrdiff_t DifferenceType
 The type of the difference between two positions.
 
typedef const EdgeDescriptor & Reference
 The type of the reference to the values accessed.
 

Public Member Functions

 EdgeIterator (const VertexDescriptor &source, const EdgeDescriptor &edge)
 Constructor. More...
 
 EdgeIterator (const EdgeDescriptor &edge)
 Constructor for the end iterator. More...
 
bool equals (const EdgeIterator &other) const
 Equality operator.
 
EdgeIteratorincrement ()
 Preincrement operator.
 
EdgeIteratordecrement ()
 Preincrement operator.
 
const EdgeDescriptor & dereference () const
 The descriptor of the current edge.
 
const VertexDescriptortarget () const
 The index of the target vertex of the current edge.
 
const VertexDescriptorsource () const
 The index of the source vertex of the current edge.
 
Reference operator* () const
 Dereferencing operator.
 
Reference operator[] (DifferenceType n) const
 Get the element n positions from the current one. More...
 
DerivedTypeoperator++ ()
 Preincrement operator.
 
DerivedType operator++ (int)
 Postincrement operator.
 
DerivedTypeoperator-- ()
 Predecrement operator.
 
DerivedType operator-- (int)
 Postdecrement operator.
 

Detailed Description

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

The edge iterator of the graph.

Member Typedef Documentation

◆ DerivedType

typedef EdgeIterator Dune::RandomAccessIteratorFacade< EdgeIterator , const EdgeDescriptor , const EdgeDescriptor & , std::ptrdiff_t >::DerivedType
inherited

The type of derived iterator.

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

// Access the value referred to.
// Access the value at some other location
Reference elementAt(n) const;
// Compare for equality with j
bool equals(j);
// position the iterator at the next element.
void increment()
// position the iterator at the previous element.
void decrement()
// advance the iterator by a number of positions-
void advance(DifferenceType n);
// calculate the distance to another iterator.
// One should incorporate an assertion wether
// the same containers are referenced
DifferenceType distanceTo(j) const;
const EdgeDescriptor & dereference() const
The descriptor of the current edge.
bool equals(const EdgeIterator &other) const
Equality operator.
EdgeIterator & increment()
Preincrement operator.
EdgeIterator & decrement()
Preincrement operator.
std::ptrdiff_t DifferenceType
The type of the difference between two positions.
Definition: iteratorfacades.hh:481
const EdgeDescriptor & Reference
The type of the reference to the values accessed.
Definition: iteratorfacades.hh:486

For an elaborate explanation see the STL Documentation

Constructor & Destructor Documentation

◆ EdgeIterator() [1/2]

template<class G , class T >
Dune::Amg::SubGraph< G, T >::EdgeIterator::EdgeIterator ( const VertexDescriptor source,
const EdgeDescriptor &  edge 
)
explicit

Constructor.

Parameters
sourceThe source vertex of the edge.
edgePointer to the edge the iterator should point to.

◆ EdgeIterator() [2/2]

template<class G , class T >
Dune::Amg::SubGraph< G, T >::EdgeIterator::EdgeIterator ( const EdgeDescriptor &  edge)
explicit

Constructor for the end iterator.

Only operator== or operator!= can be called safely on an iterator constructed this way!

Parameters
edgePointer to the end of the graph's edge array.

Member Function Documentation

◆ operator[]()

Reference Dune::RandomAccessIteratorFacade< EdgeIterator , const EdgeDescriptor , const EdgeDescriptor & , std::ptrdiff_t >::operator[] ( DifferenceType  n) const
inlineinherited

Get the element n positions from the current one.

Parameters
nThe distance to the element.
Returns
The element at that distance.

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)