QuickUnion class.
More...
#include <QuickUnion.h>
|
| QuickUnion (const unsigned nBranches) |
| Constructor. More...
|
|
int | Count () const |
| Get the current number of target indices. More...
|
|
unsigned int | Find (unsigned p) |
| Find the current target index for provided index p. More...
|
|
bool | Connected (unsigned p, unsigned q) |
| Whether two original indices are now connected. More...
|
|
void | Unite (unsigned p, unsigned q) |
| Unite two indices. More...
|
|
|
std::vector< unsigned > | m_id |
| Stores target index for each original index.
|
|
int | m_count |
| The current number of target indices.
|
|
april_content::QuickUnion::QuickUnion |
( |
const unsigned |
nBranches | ) |
|
|
inline |
Constructor.
- Parameters
-
nBranches | the number of original indices |
bool april_content::QuickUnion::Connected |
( |
unsigned |
p, |
|
|
unsigned |
q |
|
) |
| |
|
inline |
Whether two original indices are now connected.
- Parameters
-
- Returns
- boolean
int april_content::QuickUnion::Count |
( |
| ) |
const |
|
inline |
Get the current number of target indices.
- Returns
- the current number of target indices
unsigned int april_content::QuickUnion::Find |
( |
unsigned |
p | ) |
|
|
inline |
Find the current target index for provided index p.
- Parameters
-
void april_content::QuickUnion::Unite |
( |
unsigned |
p, |
|
|
unsigned |
q |
|
) |
| |
|
inline |
Unite two indices.
- Parameters
-
The documentation for this class was generated from the following file: