abLEMON 1.9.0-101-gccb8629
A maintained fork of LEMON
Loading...
Searching...
No Matches
PathNodeIt< Path > Class Template Reference

Class for iterating through the nodes of a path. More...

#include <lemon/path.h>

Public Member Functions

 PathNodeIt ()
 Default constructor.
 PathNodeIt (Invalid)
 Invalid constructor.
 PathNodeIt (const Digraph &digraph, const Path &path)
 Constructor.
 PathNodeIt (const Digraph &digraph, const Path &path, const Node &src)
 Constructor.
 operator Node () const
 Conversion to Digraph::Node.
PathNodeIt & operator++ ()
 Next node.
bool operator== (const PathNodeIt &n) const
 Comparison operator.
bool operator!= (const PathNodeIt &n) const
 Comparison operator.
bool operator< (const PathNodeIt &n) const
 Comparison operator.

Detailed Description

template< typename Path >
class lemon::PathNodeIt< Path >

Class for iterating through the nodes of a path.

In a sense, a path can be treated as a list of arcs. The LEMON path type simply stores this list. As a consequence, it cannot enumerate the nodes in the path, and the source node of a zero-length path is undefined.

However, this class implements a node iterator for path structures. To provide this feature, the underlying digraph should be passed to the constructor of the iterator.