|
Limbo
|
a sample implementation of SubsetHelper that uses std::vector as the container. It needs to store parent elements and ranks. More...
#include <DisjointSet.h>
Public Types | |
| typedef ElementType | element_type |
| typedef RankType | rank_type |
Public Member Functions | |
| SubsetHelper (std::vector< element_type > &vp, std::vector< rank_type > &vr) | |
| constructor More... | |
| element_type const & | get_parent (element_type const &e) const |
| get parent element More... | |
| void | set_parent (element_type const &e, element_type const &p) |
| set parent element More... | |
| rank_type const & | get_rank (element_type const &e) const |
| get rank More... | |
| void | set_rank (element_type const &e, rank_type const &r) |
| set rank More... | |
| std::size_t | size () const |
Public Attributes | |
| std::vector< element_type > & | vParent |
| reference to parent array | |
| std::vector< rank_type > & | vRank |
| reference to rank array | |
a sample implementation of SubsetHelper that uses std::vector as the container. It needs to store parent elements and ranks.
| ElementType | element type |
| RankType | rank type |
Definition at line 83 of file DisjointSet.h.
|
inline |
constructor
| vp | array of parants |
| vr | array of ranks |
Definition at line 96 of file DisjointSet.h.
|
inline |
get parent element
| e | element |
Definition at line 108 of file DisjointSet.h.
|
inline |
|
inline |
set parent element
| e | element |
| p | parent element |
Definition at line 112 of file DisjointSet.h.
|
inline |
|
inline |
Definition at line 122 of file DisjointSet.h.
1.8.8