|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpolyglot.ext.ibex.lr.UnionFind
Implementation of Tarjan's union-find data structure. Elements are integers. A good description of union-find can be found in [Cormen, et. al. 1990].
Constructor Summary | |
UnionFind()
|
|
UnionFind(int size)
|
Method Summary | |
int |
find(int a)
Returns the integer value associated with the first Node in a set. |
polyglot.ext.ibex.lr.UnionFind.Node |
findNode(int a)
Searches the disjoint sets for a given integer. |
boolean |
isEquiv(int a,
int b)
Returns true if a and b are in the same set. |
void |
union(int a,
int b)
Combines the set that contains a with the set that contains b. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UnionFind()
public UnionFind(int size)
Method Detail |
public polyglot.ext.ibex.lr.UnionFind.Node findNode(int a)
public int find(int a)
public boolean isEquiv(int a, int b)
public void union(int a, int b)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |