Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Public Member Functions | |
PathContainerImpl () | |
virtual | ~PathContainerImpl () |
virtual void | Initialize (const std::vector< NodeIndex > &sources, const std::vector< NodeIndex > &destinations, NodeIndex num_nodes)=0 |
virtual void | Finalize () |
Called when no more path will be added to the container. | |
virtual PathDistance | GetDistance (NodeIndex from, NodeIndex to) const =0 |
virtual NodeIndex | GetPenultimateNodeInPath (NodeIndex from, NodeIndex to) const =0 |
virtual void | GetPath (NodeIndex from, NodeIndex to, std::vector< NodeIndex > *path) const =0 |
Returns path nodes from node "from" to node "to" in a ordered vector. | |
virtual void | StoreSingleSourcePaths (NodeIndex from, const std::vector< NodeIndex > &predecessor_in_path_tree, const std::vector< PathDistance > &distance_to_destination)=0 |
Base path container implementation class. Defines virtual functions used to fill the container (in particular from the shortest path computation function).
Definition at line 43 of file shortest_paths.cc.
|
inline |
Definition at line 45 of file shortest_paths.cc.
|
inlinevirtual |
Definition at line 46 of file shortest_paths.cc.
|
inlinevirtual |
Called when no more path will be added to the container.
Definition at line 56 of file shortest_paths.cc.
|
pure virtual |
Returns the distance between node 'from' and node 'to' following the path out of 'from' and into 'to'. Note that if 'from' == 'to', the distance is not necessarily 0 if the path out of 'to' and back into 'to' has a distance greater than 0. If you do require the distance to be 0 in this case, add to the graph an arc from 'to' to itself with a length of 0. If nodes are not connected, returns kDisconnectedPathDistance.
|
pure virtual |
Returns path nodes from node "from" to node "to" in a ordered vector.
|
pure virtual |
Returns the penultimate node on the path out of node 'from' into node 'to' (the direct predecessor of node 'to' on the path). If 'from' == 'to', the penultimate node is 'to' only if the shortest path from 'to' to itself is composed of the arc ('to, 'to'), which might not be the case if either this arc doesn't exist or if the length of this arc is greater than the distance of an alternate path. If nodes are not connected, returns kNilNode.
|
pure virtual |
Initializes the container on source and destination node vectors (num_nodes is the total number of nodes in the graph containing sources and nodes). Called before adding any paths to the container.
|
pure virtual |
Adds a path tree rooted at node 'from', and to a set of implicit destinations: