GraphMetrics
Computes every structural metric Aalekh derives from the dependency graph, in one pass.
Metrics are computed together rather than on demand because they share expensive intermediates - the index maps, the reachability closures, the shortest-path trees. Computing them one at a time would redo that work for every caller, which is what made the naive per-module helpers on ModuleDependencyGraph unsuitable for large graphs.
Everything here is main-edge only (test dependencies excluded) and deterministic: iteration order is fixed by sorted module order, never by hash order, so the same graph always yields the same numbers and the same tie-breaks. Pure - no I/O, no mutation of the input.
Functions
Computes the full metric set for graph. Returns empty metrics for an empty graph.