edu.stanford.nlp.util
Class FastDisjointSet
java.lang.Object
|
+--edu.stanford.nlp.util.FastDisjointSet
- All Implemented Interfaces:
- DisjointSet
- public class FastDisjointSet
- extends Object
- implements DisjointSet
Fast Disjoint Set
Disjoint forest with path compression and union-by-rank. The set
is unmodifiable except by unions.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FastDisjointSet
public FastDisjointSet(Set objectSet)
find
public Object find(Object o)
- Specified by:
find
in interface DisjointSet
union
public void union(Object a,
Object b)
- Specified by:
union
in interface DisjointSet
Stanford NLP Group