1 (* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
4 * MLton is released under a BSD-style license.
5 * See the file MLton-LICENSE for details.
8 signature DISJOINT_SET =
12 (* Each set is associated with a single value, like a ref cell. *)
13 val := : 'a t * 'a -> unit
16 val canUnion: 'a t * 'a t * ('a * 'a -> 'a option) -> bool
17 val equals: 'a t * 'a t -> bool
18 val isRepresentative: 'a t -> bool
19 val representative: 'a t -> 'a t
20 val singleton: 'a -> 'a t
21 (* When unions occur, one of the values is chosen. *)
22 val union: 'a t * 'a t -> unit