Skip to main content

Module path

Module path 

Source
Expand description

Shortest paths: single-source Dijkstra and Bellman-Ford, plus all-pairs and reachability as thin wrappers over the algebra spine’s semiring closure.

Structs§

PathResult
Single-source distances and predecessor forest.

Functions§

all_pairs_shortest_paths
All-pairs shortest paths as the min-plus closure of the adjacency matrix. This is a thin wrapper over the spine; it does not re-implement Floyd-Warshall.
bellman_ford
Bellman-Ford over i64 weights. Returns the result and whether a negative-weight cycle is reachable from the source.
dijkstra
Dijkstra’s algorithm over non-negative u64 weights.
reachability
Reachability as the boolean closure of the adjacency matrix. Thin wrapper.