UnionFind.Make
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Ppx_compare_lib.Equal.S with type t := t
val equal : t Base__Ppx_compare_lib.equal
type repr = private X.t
val empty : t
val is_empty : t -> bool
return the optional new equality added between the old representatives of the two items in the form of "old representative = new representative", None
if they were already in the same congruence class
fold over the equivalence classes of the relation, singling out the representative for each class
the relation x -> x'
derived from the equality relation that relates all x
, x'
such that ¬(should_keep x)
, should_keep x'
, and x=x'
, as well as y -> y'
when no element in the equivalence class of y
satisfies should_keep
and y'
is the representative of the class
apply_subst subst uf
eliminate all variables in the domain of subst
from uf
, keeping the smallest representative not in the domain of subst
for each class. Classes without any such elements are kept intact.