Module shortest_path

Source
Expand description

Shortest path algorithms.

Functions dijkstra, bellman_ford and astar are taken from the ‘petgraph’ crate.

Modules§

astar
bellman_ford
Bellman-Ford algorithms.
dijkstra

Structs§

NegativeCycle
An algorithm error: a cycle of negative weights was found in the graph.

Functions§

apd
APD algorithm for all pairs shortest path problem.
astar
[Generic] A* shortest path algorithm.
bellman_ford
[Generic] Compute shortest paths from node source to all other.
dijkstra
[Generic] Dijkstra’s shortest path algorithm.
distance_map
Convert distance matrix into hashmap.
floyd_warshall
Floyd–Warshall algorithm for all pairs shortest path problem.
floyd_warshall_petgraph
[Generic] Floyd–Warshall algorithm is an algorithm for all pairs shortest path problem
johnson
Johnson algorithm for all pairs shortest path problem.
seidel
Seidel’s algorithm (APD) for all pairs shortest path problem.
shortest_distances
The lengths of the shortest paths from the start vertex to all the others.
spfa
Shortest Path Faster Algorithm. Compute shortest distances from node source to all other.