An equivalence relation on the integers 0,..,n-1 for a
given size n. Initially, each element is contained in an equivalence
class by itself. Two equivalence classes can be merged by
specifying one (arbitrary) representative of each
class. Alternatively, a set of representatives may be specified
and the corresponding equivalence classes will be merged.
Each equivalence class is represented by it's
smallest element (default) or alternatively by a user defined element.
If classes with user defined representatives are merged, the
smallest of the user defined representatives is chosen to
represent the new equivalence class.
Creates the equivalence relation on the empty set.
EquivalenceRelation(const int size)
Creates the equivalence relation on the integers
0,..,size-1 where each element is contained in an equivalence class by itself.
EquivalenceRelation(const int size, const Set<int>& representatives)
Creates the equivalence relation on the integers
0,..,size-1 where each element is contained in an equivalence class by itself.
The representatives will be used as user defined representatives.