Path::Builder Class Reference

#include <lemon/concept/path.h>

List of all members.


Detailed Description

template<typename GR>
class lemon::concept::Path< GR >::Builder

This class is used to fill a path with edges.

You can push new edges to the front and to the back of the path in arbitrary order then you should commit these changes to the graph.

While the builder is active (after the first modifying operation and until the call of commit()) the underlining Path is in a "transitional" state (operations on it have undefined result).


Public Member Functions

 Builder (Path &_p)
void setStartNode (const GraphNode &)
 Sets the starting node of the path.
void pushFront (const GraphEdge &)
 Push a new edge to the front of the path.
void pushBack (const GraphEdge &)
 Push a new edge to the back of the path.
void commit ()
 Commit the changes to the path.
void reserveFront (size_t)
 Reserve (front) storage for the builder in advance.
void reserveBack (size_t)
 Reserve (back) storage for the builder in advance.


Constructor & Destructor Documentation

Builder Path _p  )  [inline]
 

Parameters:
_p the path you want to fill in.


Member Function Documentation

void setStartNode const GraphNode  )  [inline]
 

Sets the starting node of the path. Edge added to the path afterwards have to be incident to this node. You must start building an empty path with these functions. (And you must not use it later).

See also:
pushFront()

pushBack()

void pushFront const GraphEdge  )  [inline]
 

Push a new edge to the front of the path. If the path is empty, you must call setStartNode() before the first use of pushFront().

void pushBack const GraphEdge  )  [inline]
 

Push a new edge to the back of the path. If the path is empty, you must call setStartNode() before the first use of pushBack().

void reserveFront size_t   )  [inline]
 

If you know a reasonable upper bound on the number of the edges to add to the front of the path, using this function you may speed up the building.

void reserveBack size_t   )  [inline]
 

If you know a reasonable upper bound on the number of the edges to add to the back of the path, using this function you may speed up the building.


The documentation for this class was generated from the following file:
Generated on Fri Feb 3 18:44:07 2006 for LEMON by  doxygen 1.4.6