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

UndirPath::Builder Class Reference

#include <lemon/path.h>

Collaboration diagram for UndirPath::Builder:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<typename Graph>
class lemon::UndirPath< 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.

Fundamentally, for most "Paths" (classes fulfilling the PathConcept) while the builder is active (after the first modifying operation and until the commit()) the original Path is in a "transitional" state (operations ot it have undefined result). But in the case of UndirPath the original path is unchanged until the commit. However we don't recomend that you use this feature.

Definition at line 607 of file path.h.

Public Member Functions

 Builder (UndirPath &_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 storage for the builder in advance.
void reserveBack (size_t r)
 Reserve storage for the builder in advance.


Constructor & Destructor Documentation

Builder UndirPath _P  )  [inline]
 

Parameters:
_P the path you want to fill in.

Definition at line 614 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. It should be called if and only if the path is empty and before any call to pushFront() or pushBack()

Definition at line 623 of file path.h.

void pushFront const GraphEdge e  )  [inline]
 

Push a new edge to the front of the path.

See also:
setStartNode

Definition at line 629 of file path.h.

void pushBack const GraphEdge e  )  [inline]
 

Push a new edge to the back of the path.

See also:
setStartNode

Definition at line 637 of file path.h.

void reserveFront size_t  r  )  [inline]
 

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

Definition at line 661 of file path.h.

void reserveBack size_t  r  )  [inline]
 

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

Definition at line 668 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