Skip to main content

Module union_find

Module union_find 

Source
Expand description

Disjoint-set union (DSU) with union-by-rank and path halving.

Kept in-tree (not delegated to petgraph/disjoint_sets) because callers need the per-root size (member count) for weighted centroid merging — a field none of the ecosystem crates expose.

Structs§

UnionFind
Union-Find (disjoint set) with path halving and union by rank.