|
|
A simple union find data structure. More...
#include <armarx/navigation/components/laser_scanner_feature_extraction/UnionFind.h>
Public Member Functions | |
| std::size_t | find (std::size_t x) |
| find the representative of x More... | |
| UnionFind (std::size_t n) | |
| Construct a new union find data structure with n elements. More... | |
| void | unite (std::size_t a, std::size_t b) |
| unite the sets of the elements a and b More... | |
A simple union find data structure.
The data structure supports a fixed size of n elements which must be the integers from [0, n).
Definition at line 40 of file UnionFind.h.
| UnionFind | ( | std::size_t | n | ) |
Construct a new union find data structure with n elements.
| n | the number of elements |
After construction each element will be in its own individual set.
Definition at line 7 of file UnionFind.cpp.
Here is the call graph for this function:| std::size_t find | ( | std::size_t | x | ) |
find the representative of x
Definition at line 19 of file UnionFind.cpp.
Here is the caller graph for this function:| void unite | ( | std::size_t | a, |
| std::size_t | b | ||
| ) |
unite the sets of the elements a and b
| a | |
| b |
Definition at line 40 of file UnionFind.cpp.
Here is the call graph for this function: