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

Path::Builder Class Reference

#include <lemon/concept/path.h>

Collaboration diagram for Path::Builder:

Collaboration graph
[legend]
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).

Definition at line 179 of file path.h.

Public Member Functions

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


Constructor & Destructor Documentation

Builder Path _p  )  [inline]
 

Parameters:
_P the path you want to fill in.

Definition at line 187 of file path.h.


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 empry path with this functions. (And you must not use it later).

See also:
pushFront()

pushBack()

Definition at line 197 of file path.h.

void pushFront const GraphEdge e  )  [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().

Definition at line 204 of file path.h.

void pushBack const GraphEdge e  )  [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().

Definition at line 211 of file path.h.

void reserveFront size_t  r  )  [inline]
 

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

Definition at line 221 of file path.h.

void reserveBack size_t  r  )  [inline]
 

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

Definition at line 227 of file path.h.


The documentation for this class was generated from the following file:
Generated on Sat Mar 19 10:59:01 2005 for LEMON by  doxygen 1.4.1