DirPath Class Template Reference
[Path Structures]

#include <path.h>

List of all members.


Detailed Description

template<typename Graph>
class lemon::DirPath< Graph >

A structure for representing directed path in a graph.
Parameters:
Graph The graph type in which the path is.
DM DebugMode, defaults to DefaultDebugMode.
In a sense, the path can be treated as a graph, for is has NodeIt and EdgeIt with the same usage. These types converts to the Node and Edge of the original graph.

Todo:
Thoroughfully check all the range and consistency tests.

Definition at line 64 of file path.h.

Public Types

typedef Graph::Edge GraphEdge
 Edge type of the underlying graph.
typedef Graph::Node GraphNode
 Node type of the underlying graph.

Public Member Functions

 DirPath (const Graph &_G)
 DirPath (const DirPath &P, const NodeIt &a, const NodeIt &b)
 Subpath constructor.
 DirPath (const DirPath &P, const EdgeIt &a, const EdgeIt &b)
 Subpath constructor.
size_t length () const
 Length of the path.
bool empty () const
 Returns whether the path is empty.
void clear ()
 Resets the path to an empty path.
GraphNode tail () const
 Starting point of the path.
GraphNode head () const
 End point of the path.
template<typename It> It & first (It &i) const
 Initializes node or edge iterator to point to the first node or edge.
NodeItnth (NodeIt &i, int n) const
 Initializes node iterator to point to the node of a given index.
EdgeItnth (EdgeIt &i, int n) const
 Initializes edge iterator to point to the edge of a given index.
NodeIt head (const EdgeIt &e) const
 Returns node iterator pointing to the head node of the given edge iterator.
NodeIt tail (const EdgeIt &e) const
 Returns node iterator pointing to the tail node of the given edge iterator.


Constructor & Destructor Documentation

DirPath const Graph &  _G  )  [inline]
 

Parameters:
_G The graph in which the path is.
Definition at line 82 of file path.h.

DirPath const DirPath< Graph > &  P,
const NodeIt a,
const NodeIt b
[inline]
 

Subpath defined by two nodes.

Warning:
It is an error if the two edges are not in order!
Definition at line 88 of file path.h.

References DirPath::edges, DirPath::gr, and DirPath::NodeIt::idx.

DirPath const DirPath< Graph > &  P,
const EdgeIt a,
const EdgeIt b
[inline]
 

Subpath defined by two edges. Contains edges in [a,b)

Warning:
It is an error if the two edges are not in order!
Definition at line 97 of file path.h.

References DirPath::edges, DirPath::gr, and DirPath::EdgeIt::idx.


Member Function Documentation

GraphNode tail  )  const [inline]
 

Starting point of the path. Returns INVALID if the path is empty. Definition at line 114 of file path.h.

References DirPath::empty(), DirPath::GraphNode, and lemon::INVALID.

Here is the call graph for this function:

GraphNode head  )  const [inline]
 

End point of the path. Returns INVALID if the path is empty. Definition at line 121 of file path.h.

References DirPath::empty(), DirPath::GraphNode, lemon::INVALID, and DirPath::length().

Here is the call graph for this function:

It& first It &  i  )  const [inline]
 

See also:
nth
Definition at line 130 of file path.h.


The documentation for this class was generated from the following file:
Generated on Thu Sep 30 12:18:38 2004 for LEMON by doxygen 1.3.8