Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

UndirPath Class Template Reference
[Path Structures]

#include <lemon/path.h>

List of all members.


Detailed Description

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

A structure for representing undirected path in a graph. Ie. this is a path in a directed graph but the edges should not be directed forward.

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 389 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

 UndirPath (const Graph &_G)
 UndirPath (const UndirPath &P, const NodeIt &a, const NodeIt &b)
 Subpath constructor.
 UndirPath (const UndirPath &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 source () const
 Starting point of the path.
GraphNode target () 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 target (const EdgeIt &e) const
 Returns node iterator pointing to the target node of the given edge iterator.
NodeIt source (const EdgeIt &e) const
 Returns node iterator pointing to the source node of the given edge iterator.

Static Public Member Functions

template<typename It>
static bool valid (const It &i)
 Checks validity of a node or edge iterator.
template<typename It>
static It & next (It &e)
 Steps the given node or edge iterator.

Classes

class  Builder
 Class to build paths. More...
class  EdgeIt
 Iterator class to iterate on the edges of the paths. More...
class  NodeIt
 Iterator class to iterate on the nodes of the paths. More...


Constructor & Destructor Documentation

UndirPath const Graph &  _G  )  [inline]
 

Parameters:
_G The graph in which the path is.

Definition at line 407 of file path.h.

UndirPath const UndirPath< 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 413 of file path.h.

UndirPath const UndirPath< 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 422 of file path.h.


Member Function Documentation

GraphNode source  )  const [inline]
 

Starting point of the path. Returns INVALID if the path is empty.

Definition at line 439 of file path.h.

Here is the call graph for this function:

GraphNode target  )  const [inline]
 

End point of the path. Returns INVALID if the path is empty.

Definition at line 446 of file path.h.

Here is the call graph for this function:

It& first It &  i  )  const [inline]
 

See also:
nth

Definition at line 455 of file path.h.


The documentation for this class was generated from the following file:
Generated on Mon Feb 21 15:02:35 2005 for LEMON by  doxygen 1.4.1