PathNodeIt

Declared in lemon/path.h, in the group Path Structures; the same class on the Doxygen site.

template< typename Path >
class PathNodeIt

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.

Public Types

typedef Path::Digraph Digraph
typedef Digraph::Node Node

Public Functions

inline PathNodeIt()

Default constructor.

inline PathNodeIt(Invalid)

Invalid constructor.

inline PathNodeIt( const Digraph & digraph , const Path & path )

Constructor.

inline PathNodeIt( const Digraph & digraph , const Path & path , const Node & src )

Constructor.

inline operator Node() const

Conversion to Digraph::Node.

inline PathNodeIt & operator++()

Next node.

inline bool operator==( const PathNodeIt & n ) const

Comparison operator.

inline bool operator!=( const PathNodeIt & n ) const

Comparison operator.

inline bool operator<( const PathNodeIt & n ) const

Comparison operator.