Data Structures | Public Member Functions | Protected Attributes

LinkGraph::BaseEdgeIterator< Tedge, Tedge_wrapper, Titer > Class Template Reference

Base class for iterating across outgoing edges of a node. More...

#include <linkgraph.h>

Data Structures

class  FakePointer
 A "fake" pointer to enable operator-> on temporaries. More...

Public Member Functions

 BaseEdgeIterator (Tedge *base, NodeID current)
 Constructor.
Titer & operator++ ()
 Prefix-increment.
Titer operator++ (int)
 Postfix-increment.
template<class Tother >
bool operator== (const Tother &other)
 Compare with some other edge iterator.
template<class Tother >
bool operator!= (const Tother &other)
 Compare for inequality with some other edge iterator.
SmallPair< NodeID, Tedge_wrapper > operator* () const
 Dereference with operator*.
FakePointer operator-> () const
 Dereference with operator->.

Protected Attributes

Tedge * base
 Array of edges being iterated.
NodeID current
 Current offset in edges array.

Detailed Description

template<class Tedge, class Tedge_wrapper, class Titer>
class LinkGraph::BaseEdgeIterator< Tedge, Tedge_wrapper, Titer >

Base class for iterating across outgoing edges of a node.

Only the real edges (those with capacity) are iterated. The ones with only distance information are skipped.

Template Parameters:
Tedge Actual edge class. May be "BaseEdge" or "const BaseEdge".
Titer Actual iterator class.

Definition at line 198 of file linkgraph.h.


Constructor & Destructor Documentation

template<class Tedge, class Tedge_wrapper, class Titer>
LinkGraph::BaseEdgeIterator< Tedge, Tedge_wrapper, Titer >::BaseEdgeIterator ( Tedge *  base,
NodeID  current 
) [inline]

Constructor.

Parameters:
base Array of edges to be iterated.
current ID of current node (to locate the first edge).

Definition at line 231 of file linkgraph.h.


Member Function Documentation

template<class Tedge, class Tedge_wrapper, class Titer>
template<class Tother >
bool LinkGraph::BaseEdgeIterator< Tedge, Tedge_wrapper, Titer >::operator!= ( const Tother &  other  )  [inline]

Compare for inequality with some other edge iterator.

The other one may be of a child class.

Template Parameters:
Tother Class of other iterator.
Parameters:
other Instance of other iterator.
Returns:
If either the edge arrays or the current nodes differ.

Definition at line 278 of file linkgraph.h.

template<class Tedge, class Tedge_wrapper, class Titer>
SmallPair<NodeID, Tedge_wrapper> LinkGraph::BaseEdgeIterator< Tedge, Tedge_wrapper, Titer >::operator* (  )  const [inline]

Dereference with operator*.

Returns:
Pair of current target NodeID and edge object.

Reimplemented in LinkGraphJob::EdgeIterator.

Definition at line 287 of file linkgraph.h.

template<class Tedge, class Tedge_wrapper, class Titer>
Titer& LinkGraph::BaseEdgeIterator< Tedge, Tedge_wrapper, Titer >::operator++ (  )  [inline]

Prefix-increment.

Returns:
This.

Definition at line 240 of file linkgraph.h.

template<class Tedge, class Tedge_wrapper, class Titer>
Titer LinkGraph::BaseEdgeIterator< Tedge, Tedge_wrapper, Titer >::operator++ ( int   )  [inline]

Postfix-increment.

Returns:
Version of this before increment.

Definition at line 250 of file linkgraph.h.

template<class Tedge, class Tedge_wrapper, class Titer>
FakePointer LinkGraph::BaseEdgeIterator< Tedge, Tedge_wrapper, Titer >::operator-> (  )  const [inline]

Dereference with operator->.

Returns:
Fake pointer to Pair of current target NodeID and edge object.

Reimplemented in LinkGraphJob::EdgeIterator.

Definition at line 296 of file linkgraph.h.

template<class Tedge, class Tedge_wrapper, class Titer>
template<class Tother >
bool LinkGraph::BaseEdgeIterator< Tedge, Tedge_wrapper, Titer >::operator== ( const Tother &  other  )  [inline]

Compare with some other edge iterator.

The other one may be of a child class.

Template Parameters:
Tother Class of other iterator.
Parameters:
other Instance of other iterator.
Returns:
If the iterators have the same edge array and current node.

Definition at line 265 of file linkgraph.h.


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