public class EquivalenceClasses<V>
extends java.lang.Object
Constructor and Description |
---|
EquivalenceClasses() |
Modifier and Type | Method and Description |
---|---|
void |
insert(V v)
add a new item, placing it in its own (singleton) equivalence class
|
boolean |
isEquivalent(V v1,
V v2)
return true if v1 and v2 inhabit the same equivalence class
|
void |
merge(V v1,
V v2)
merge the equivalence classes inhabited by v1 and v2
|
public void insert(V v)