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.


Constructor Summary
FastDisjointSet(Set objectSet)
           
 
Method Summary
 Object find(Object o)
           
 void union(Object a, Object b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FastDisjointSet

public FastDisjointSet(Set objectSet)
Method Detail

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