|
Limbo 3.5.4
|
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 | |
| element_type const & | get_parent (element_type const &e) const |
| get parent element | |
| void | set_parent (element_type const &e, element_type const &p) |
| set parent element | |
| rank_type const & | get_rank (element_type const &e) const |
| get rank | |
| void | set_rank (element_type const &e, rank_type const &r) |
| set rank | |
| 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.
| typedef ElementType limbo::containers::DisjointSet::SubsetHelper< ElementType, RankType >::element_type |
Definition at line 86 of file DisjointSet.h.
| typedef RankType limbo::containers::DisjointSet::SubsetHelper< ElementType, RankType >::rank_type |
Definition at line 87 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.
| std::vector<element_type>& limbo::containers::DisjointSet::SubsetHelper< ElementType, RankType >::vParent |
reference to parent array
Definition at line 90 of file DisjointSet.h.
| std::vector<rank_type>& limbo::containers::DisjointSet::SubsetHelper< ElementType, RankType >::vRank |
reference to rank array
Definition at line 91 of file DisjointSet.h.