Implementation of disjoint set data structure using the union-find algorithm. More...
#include <UnionFindSimple.h>
Classes | |
struct | Data |
Identifies parent ids and sizes. More... | |
Public Member Functions | |
int | connectNodes (int aId, int bId) |
Returns the id of the merged node. | |
int | getRepresentative (int thisId) |
int | getSetSize (int thisId) |
void | printDataVector () const |
UnionFindSimple (int maxId) | |
Private Member Functions | |
void | init () |
Private Attributes | |
std::vector< Data > | data |
Implementation of disjoint set data structure using the union-find algorithm.
Definition at line 9 of file UnionFindSimple.h.
AprilTags::UnionFindSimple::UnionFindSimple | ( | int | maxId | ) | [inline, explicit] |
Definition at line 17 of file UnionFindSimple.h.
int AprilTags::UnionFindSimple::connectNodes | ( | int | aId, |
int | bId | ||
) |
Returns the id of the merged node.
Definition at line 25 of file UnionFindSimple.cc.
int AprilTags::UnionFindSimple::getRepresentative | ( | int | thisId | ) |
Definition at line 6 of file UnionFindSimple.cc.
int AprilTags::UnionFindSimple::getSetSize | ( | int | thisId | ) | [inline] |
Definition at line 21 of file UnionFindSimple.h.
void AprilTags::UnionFindSimple::init | ( | ) | [private] |
Definition at line 46 of file UnionFindSimple.cc.
void AprilTags::UnionFindSimple::printDataVector | ( | ) | const |
Definition at line 20 of file UnionFindSimple.cc.
std::vector<Data> AprilTags::UnionFindSimple::data [private] |
Definition at line 36 of file UnionFindSimple.h.