Public Member Functions | |
| None | __init__ (self) |
| None | __init__ (self, ConstBaseUnionFind_FaceId arg0) |
| FaceId | add (self) |
| BaseUnionFind_FaceId | assign (self, ConstBaseUnionFind_FaceId other) |
| FaceId | find (self, ConstFaceId a) |
| FaceId | findUpdateRange (self, ConstFaceId a, ConstFaceId begin, ConstFaceId end) |
| None | reset (self, int size) |
| ConstFaceMap | roots (self) |
| tuple[FaceId, bool] | uniteUnbalanced (self, ConstFaceId first, ConstFaceId second) |
| bool | united (self, ConstFaceId first, ConstFaceId second) |
| Public Member Functions inherited from mrmeshpy.ConstBaseUnionFind_FaceId | |
| __init__ (self, *args, **kwargs) | |
| bool | isRoot (self, ConstFaceId a) |
| FaceId | parent (self, ConstFaceId a) |
| ConstFaceMap | parents (self) |
| int | size (self) |
Static Public Member Functions | |
| None | __init__ (*args, **kwargs) |
Generated from: MR::BaseUnionFind<MR::FaceId> \\brief base of union-find data structures: stores only the parent forest and the operations that depend on it alone, so it is shared by the sequential UnionFind and the ParallelUnionFind \\tparam I is the identifier of a set's element, e.g. FaceId
|
static |
| None mrmeshpy.BaseUnionFind_FaceId.__init__ | ( | self | ) |
| None mrmeshpy.BaseUnionFind_FaceId.__init__ | ( | self, | |
| ConstBaseUnionFind_FaceId | arg0 ) |
Implicit copy constructor.
| FaceId mrmeshpy.BaseUnionFind_FaceId.add | ( | self | ) |
adds new element in its own disjoint set, returns its identifier
| BaseUnionFind_FaceId mrmeshpy.BaseUnionFind_FaceId.assign | ( | self, | |
| ConstBaseUnionFind_FaceId | other ) |
| FaceId mrmeshpy.BaseUnionFind_FaceId.find | ( | self, | |
| ConstFaceId | a ) |
finds the root of the set containing given element with optimizing data structure updates
| FaceId mrmeshpy.BaseUnionFind_FaceId.findUpdateRange | ( | self, | |
| ConstFaceId | a, | ||
| ConstFaceId | begin, | ||
| ConstFaceId | end ) |
finds the root of the set containing given element with optimizing data structure in the range [begin, end)
| None mrmeshpy.BaseUnionFind_FaceId.reset | ( | self, | |
| int | size ) |
resets union-find to represent given number of elements, each element is the only one in its disjoint set
| ConstFaceMap mrmeshpy.BaseUnionFind_FaceId.roots | ( | self | ) |
sets the root of corresponding set as the parent of each element, then returns the vector
| bool mrmeshpy.BaseUnionFind_FaceId.united | ( | self, | |
| ConstFaceId | first, | ||
| ConstFaceId | second ) |
returns true if given two elements are from one set
| tuple[FaceId, bool] mrmeshpy.BaseUnionFind_FaceId.uniteUnbalanced | ( | self, | |
| ConstFaceId | first, | ||
| ConstFaceId | second ) |
unites the two sets containing given elements WITHOUT balancing by set size (BaseUnionFind keeps no sizes): it simply attaches one set's root under the other's, so chained calls can build taller trees. Prefer UnionFind::unite, which selects the new root by set size, when many unions follow one another. \\return first: new common root, second: true if the union was done (false if already in one set)