Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <k_shortest_paths.h>
Public Attributes | |
std::vector< std::vector< NodeIndex > > | paths |
std::vector< PathDistance > | distances |
Stores the solution to a k-shortest path problem. paths
contains up to k
paths from source
to destination
(these nodes are arguments to the algorithm), each having a distance stored in distances
.
The paths in paths
start with origin
and end at destination
.
If the computations are unsuccessful for any reason, the vectors are empty.
Definition at line 86 of file k_shortest_paths.h.
std::vector<PathDistance> operations_research::KShortestPaths::distances |
Definition at line 94 of file k_shortest_paths.h.
std::vector<std::vector<NodeIndex> > operations_research::KShortestPaths::paths |
The paths are stored as vectors of nodes, like the other graph algorithms.
distances
(compute it on the fly), with a reference to the graph and the costs. Definition at line 93 of file k_shortest_paths.h.