FlatUnionFindThis module offers a union-find data structure based on disjoint set forests, with path compression and linking by rank. The data structure is stored in a flat integer vector.
module type UF = sig ... endThis signature describes the result of the functor FlatUnionFind.Make.
module type UFD = sig ... endThis signature describes the result of the functor FlatUnionFind.MakeWithData.
Applying the functor Make creates a fresh instance of the union-find data structure. This functor is generative: each application returns a new module, with its own mutable internal state and its own abstract type point.
module MakeWithData (D : sig ... end) () : UFD with type data = D.tApplying the functor MakeWithData creates a fresh instance of the union-find data structure. In comparison with Make, this data structure offers one additional feature: it maintains a map of equivalence classes to user data. This functor is generative: each application returns a new module, with its own mutable internal state and its own abstract type point.