Constructor and Description |
---|
IntArrayRankedUnionFind(int size) |
Modifier and Type | Method and Description |
---|---|
int |
findRoot(int id)
Find the root node (set identifier) for a specified id.
|
long |
findRoot(long id) |
int |
intSetCount() |
int |
intSize() |
int |
join(int id1,
int id2)
Join two sets.
|
long |
join(long id1,
long id2)
Join two sets represented by
root1 and root2 |
long |
setCount() |
long |
size() |
public IntArrayRankedUnionFind(int size)
size
- Number of elements. (Initially, each element forms a single
element subset)public int findRoot(int id)
id
- public int join(int id1, int id2)
id1
- Root node of the first set.id2
- Root node of the second set.public long findRoot(long id)
public long join(long id1, long id2)
UnionFind
root1
and root2
public long size()
public long setCount()
public int intSize()
public int intSetCount()
Copyright © 2015–2022 ImgLib2. All rights reserved.