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§
- Path
Result - 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
i64weights. Returns the result and whether a negative-weight cycle is reachable from the source. - dijkstra
- Dijkstra’s algorithm over non-negative
u64weights. - reachability
- Reachability as the boolean closure of the adjacency matrix. Thin wrapper.