#include <path.h>
Collaboration diagram for Path::Builder:
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 180 of file skeletons/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. |
|
|
|
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).
References Path::GraphNode. |
|
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 skeletons/path.h. References Path::GraphEdge. |
|
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 skeletons/path.h. References Path::GraphEdge. |
|
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 skeletons/path.h. |
|
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 skeletons/path.h. |