module Make:Functor building a union-find data structure.
Parameters: |
|
type
elem
type
t
val create : unit -> t
val equivalent : t -> elem -> elem -> bool
val union : t -> elem -> elem -> unit
val representative : t -> elem -> elem
Union_find.S.equivalent
s x (representative s x)
val is_representative : t -> elem -> bool
val members : t -> elem -> elem Bunch.t
members s x
is the bunch of all elements in the class of x
.
Bunch.for_all
(
Union_find.S.equivalent
s x) (
Union_find.S.members
s
x)