#include <lemon/concept/path.h>
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. |
|
|
|
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).
|
|
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(). |
|
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(). |
|
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. |
|
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. |