Results for “Std.DisjointSet.DisjointSet”
8 matching declarations
Use module:Std.List, kind:fn, or is:exact. Put a Pudu type after ::.
- Std.DisjointSet.DisjointSet
A low-level, flat-array Disjoint-Set (Union-Find) with path halving and union-by-rank.
- Std.DisjointSet.componentCount
&Std.DisjointSet.DisjointSet -> IntReturns the number of disconnected components remaining.
- Std.DisjointSet.componentSize
&Std.DisjointSet.DisjointSet -> Int -> Option[Int]Returns the number of elements in the component containing
x. - Std.DisjointSet.connected
&Std.DisjointSet.DisjointSet -> Int -> Int -> Option[Bool]Tests whether elements
xandybelong to the same component. - Std.DisjointSet.create
Int -> Std.DisjointSet.DisjointSetAllocates a disjoint-set forest of
totalElementssingleton components. - Std.DisjointSet.elementCount
&Std.DisjointSet.DisjointSet -> IntReturns the total number of elements tracked.
- Std.DisjointSet.find
&Std.DisjointSet.DisjointSet -> Int -> (Std.DisjointSet.DisjointSet, Option[Int])Finds the root representative of element
xusing iterative path halving. - Std.DisjointSet.union
&Std.DisjointSet.DisjointSet -> Int -> Int -> Option[Std.DisjointSet.DisjointSet]Merges the sets containing elements
xandyusing union-by-rank.
