cgv
|
Public Member Functions | |
union_find (unsigned int n) | |
construct with given number of elements | |
void | init (unsigned int n) |
init such that each element is a representative | |
unsigned int | find (unsigned int i) |
find representative with path compression | |
void | unify (unsigned int i, unsigned int j) |
union of two groups | |
Definition at line 8 of file union_find.h.
|
inline |
construct with given number of elements
Definition at line 11 of file union_find.h.
References init().
|
inline |
find representative with path compression
Definition at line 19 of file union_find.h.
Referenced by unify().
|
inline |
init such that each element is a representative
Definition at line 13 of file union_find.h.
Referenced by union_find().
|
inline |