Path< _Graph > Class Template Reference
[Path Structures]


Detailed Description

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

A structure for representing directed path in a graph.
Parameters:
Graph The graph type in which the path is.
In a sense, the path can be treated as a list of edges. The lemon path type stores just this list. As a consequence it cannot enumerate the nodes in the path and the zero length paths cannot store the source.

This implementation is a back and front insertable and erasable path type. It can be indexed in O(1) time. The front and back insertion and erasure is amortized O(1) time. The impelementation is based on two opposite organized vectors. #include <lemon/path.h>

List of all members.

Classes

class  EdgeIt
 Lemon style iterator for path edges. More...

Public Member Functions

 Path ()
 Default constructor.
template<typename CPath >
 Path (const CPath &cpath)
 Template copy constructor.
template<typename CPath >
Pathoperator= (const CPath &cpath)
 Template copy assignment.
int length () const
 Length of the path.
bool empty () const
 Returns whether the path is empty.
void clear ()
 Resets the path to an empty path.
const Edge & nth (int n) const
 Gives back the nth edge.
EdgeIt nthIt (int n) const
 Initializes edge iterator to point to the nth edge.
const Edge & front () const
 Gives back the first edge of the path.
void addFront (const Edge &edge)
 Add a new edge before the current path.
void eraseFront ()
 Erase the first edge of the path.
const Edge & back () const
 Gives back the last edge of the path.
void addBack (const Edge &edge)
 Add a new edge behind the current path.
void eraseBack ()
 Erase the last edge of the path.


Constructor & Destructor Documentation

Path (  )  [inline]

Default constructor

Path ( const CPath< _Graph > &  cpath  )  [inline]

This path can be initialized with any other path type. It just makes a copy of the given path.


Member Function Documentation

Path& operator= ( const CPath< _Graph > &  cpath  )  [inline]

This path can be initialized with any other path type. It just makes a copy of the given path.

const Edge& nth ( int  n  )  const [inline]

Precondition:
n is in the [0..length() - 1] range

EdgeIt nthIt ( int  n  )  const [inline]

Precondition:
n is in the [0..length() - 1] range


Generated on Thu Jun 4 04:06:32 2009 for LEMON by  doxygen 1.5.9