Skip to main content

Module shortest_path

Module shortest_path 

Source
Expand description

Shortest path algorithms.

Re-exports§

pub use a_star::AStarOutput;
pub use a_star::a_star;
pub use bellman_ford::BellmanFordOutput;
pub use bellman_ford::bellman_ford;
pub use bidijkstra::BiDijkstraOutput;
pub use bidijkstra::bidirectional_dijkstra;
pub use delta_stepping::DeltaSteppingOutput;
pub use delta_stepping::delta_stepping;
pub use dijkstra::DijkstraOutput;
pub use dijkstra::dijkstra;
pub use floyd_warshall::floyd_warshall;
pub use johnson::johnson;
pub use spfa::spfa;
pub use transitive_closure::TransitiveClosure;
pub use transitive_closure::transitive_closure;
pub use transitive_closure::transitive_closure_bfs;
pub use transitive_reduction::transitive_reduction;
pub use yen_k_shortest::YenPath;
pub use yen_k_shortest::yen_k_shortest_paths;
pub use zero_one_bfs::ZeroOneBfsOutput;
pub use zero_one_bfs::zero_one_bfs;

Modules§

a_star
A* search with admissible heuristic.
bellman_ford
Bellman-Ford single-source shortest path with negative-cycle detection.
bidijkstra
Bidirectional Dijkstra (meet in the middle).
delta_stepping
Delta-stepping single-source shortest paths (Meyer & Sanders 2003).
dijkstra
Binary-heap Dijkstra single-source shortest path. Rejects negative weights.
floyd_warshall
Floyd-Warshall all-pairs shortest path. O(V^3).
johnson
Johnson’s algorithm: all-pairs shortest path via reweighting (Bellman-Ford then Dijkstra).
spfa
Shortest Path Faster Algorithm (queue-based Bellman-Ford variant).
transitive_closure
Transitive closure of a directed graph.
transitive_reduction
Transitive reduction of a directed acyclic graph.
yen_k_shortest
Yen’s K-shortest loopless paths via deviation method.
zero_one_bfs
0-1 BFS — single-source shortest paths on graphs whose edge weights are restricted to {0, 1}.