Public Member Functions | |
None | __init__ (self) |
None | __init__ (self, int size) |
None | __init__ (self, UnionFind_VertId arg0) |
VertId | find (self, VertId a) |
VertId | findUpdateRange (self, VertId a, VertId begin, VertId end) |
VertMap | parents (self) |
None | reset (self, int size) |
VertMap | roots (self) |
int | size (self) |
int | sizeOfComp (self, VertId a) |
tuple[VertId, bool] | unite (self, VertId first, VertId second) |
bool | united (self, VertId first, VertId second) |
Generated from: MR::UnionFind<MR::VertId> \\brief Simple union find data structure \\tparam I is an id type, e.g. FaceId \\ingroup BasicGroup
None meshlib.mrmeshpy.UnionFind_VertId.__init__ | ( | self | ) |
None meshlib.mrmeshpy.UnionFind_VertId.__init__ | ( | self, | |
int | size ) |
None meshlib.mrmeshpy.UnionFind_VertId.__init__ | ( | self, | |
UnionFind_VertId | arg0 ) |
Implicit copy constructor.
finds the root of the set containing given element with optimizing data structure updates
VertId meshlib.mrmeshpy.UnionFind_VertId.findUpdateRange | ( | self, | |
VertId | a, | ||
VertId | begin, | ||
VertId | end ) |
finds the root of the set containing given element with optimizing data structure in the range [begin, end)
VertMap meshlib.mrmeshpy.UnionFind_VertId.parents | ( | self | ) |
gets the parents of all elements as in
None meshlib.mrmeshpy.UnionFind_VertId.reset | ( | self, | |
int | size ) |
reset roots to represent each element as disjoint set of rank 0
VertMap meshlib.mrmeshpy.UnionFind_VertId.roots | ( | self | ) |
sets the root as the parent of each element, then returns the vector
int meshlib.mrmeshpy.UnionFind_VertId.size | ( | self | ) |
int meshlib.mrmeshpy.UnionFind_VertId.sizeOfComp | ( | self, | |
VertId | a ) |
returns the size of component containing given element
unite two elements, \\return first: new common root, second: true = union was done, false = first and second were already united
returns true if given two elements are from one component