Module Union


module Union: sig .. end
Union-find Abstract Data Types

type 'a t 
The type of the data structure storing set membership (the universe)
val create : int -> 'a t
Create a new universe set
val add : 'a t -> 'a -> unit
Add an element to the universe (initially belonging to its singleton)
val find : 'a t -> 'a -> 'a
val union : 'a t -> 'a -> 'a -> 'a
Computes the union of two sets and returns the resulting set
val extract : 'a t -> 'a list list
Extract the list of sets