|
| UnionFind ()=default |
|
| UnionFind (size_t size) |
|
auto | size () const |
|
void | reset (size_t size) |
| reset roots to represent each element as disjoint set of rank 0
|
|
std::pair< I, bool > | unite (I first, I second) |
|
bool | united (I first, I second) |
| returns true if given two elements are from one component
|
|
I | find (I a) |
| finds the root of the set containing given element with optimizing data structure updates
|
|
I | findUpdateRange (I a, I begin, I end) |
| finds the root of the set containing given element with optimizing data structure in the range [begin, end)
|
|
const Vector< I, I > & | roots () |
| sets the root as the parent of each element, then returns the vector
|
|
const Vector< I, I > & | parents () const |
| gets the parents of all elements as in
|
|
size_t | sizeOfComp (I a) |
| returns the size of component containing given element
|
|
template<typename
I>
class MR::UnionFind< I >
Simple union find data structure.
- Template Parameters
-
I | is an id type, e.g. FaceId |