public interface UnionFind
Modifier and Type | Method and Description |
---|---|
int |
find(DBIDRef p)
Find the component ID of an element.
|
DBIDs |
getRoots()
Collect all component root elements.
|
boolean |
isConnected(DBIDRef p,
DBIDRef q)
Test if two components are connected.
|
int |
union(DBIDRef p,
DBIDRef q)
Join the components of elements p and q.
|
int union(DBIDRef p, DBIDRef q)
p
- First elementq
- Second elementboolean isConnected(DBIDRef p, DBIDRef q)
p
- First elementq
- Second elementtrue
if they are in the same component.DBIDs getRoots()
int find(DBIDRef p)
p
- ElementCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.