Skip to main content

Module path

Module path 

Source
Expand description

Shortest paths: single-source Dijkstra and Bellman-Ford, checked all-pairs shortest paths, and reachability over the algebra spine’s semiring closure.

Structs§

PathResult
Single-source distances and predecessor forest.
ShortestPath
One shortest path between two nodes, with a verifiable predecessor-tree certificate for the source.

Functions§

all_pairs_shortest_paths
Checked all-pairs shortest paths.
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.
shortest_path
Return one shortest path and its reusable certificate.