Path::Builder Class Reference

#include <lemon/concepts/path.h>

List of all members.


Detailed Description

template<typename _Graph>
class lemon::concepts::Path< _Graph >::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 &_path)
 Constructor.
void setStartNode (const Node &)
 Sets the starting node of the path.
void pushFront (const Edge &)
 Push a new edge to the front of the path.
void pushBack (const Edge &)
 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 _path  )  [inline]

Constructor

Parameters:
_path the path you want to fill in.


Member Function Documentation

void setStartNode ( const Node  )  [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 Edge  )  [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 Edge  )  [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 commit (  )  [inline]

Commit the changes to the path.

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 Tue Oct 31 09:51:49 2006 for LEMON by  doxygen 1.5.1