Public Member Functions | |
| None | __init__ (self) |
| None | __init__ (self, int size) |
| None | __init__ (self, BaseUnionFind_VertId base) |
| None | __init__ (self, UnionFind_VertId arg0) |
| None | reset (self, int size) |
| int | sizeOfComp (self, VertId a) |
| tuple[VertId, bool] | unite (self, VertId first, VertId second) |
| Public Member Functions inherited from mrmeshpy.BaseUnionFind_VertId | |
| None | __init__ (self) |
| None | __init__ (self, BaseUnionFind_VertId arg0) |
| VertId | find (self, VertId a) |
| VertId | findUpdateRange (self, VertId a, VertId begin, VertId end) |
| bool | isRoot (self, VertId a) |
| VertId | parent (self, VertId a) |
| VertMap | parents (self) |
| VertMap | roots (self) |
| int | size (self) |
| tuple[VertId, bool] | uniteUnbalanced (self, VertId first, VertId second) |
| bool | united (self, VertId first, VertId second) |
Static Public Member Functions | |
| None | __init__ (*args, **kwargs) |
| UnionFind_VertId | operator (*args, **kwargs) |
| UnionFind_VertId | operator (*args, **kwargs) |
| Static Public Member Functions inherited from mrmeshpy.BaseUnionFind_VertId | |
| None | __init__ (*args, **kwargs) |
Generated from: MR::UnionFind<MR::VertId> \\brief Union-find data structure for representing disjoint sets of elements with few very quick operations: 1) union of two sets in one, 2) checking whether two elements pertain to the same set, 3) finding representative element (root) of each set by any set's element. Sequential implementation that selects the root of a united pair by set size for best performance. \\tparam I is the identifier of a set's element, e.g. FaceId
|
static |
| None mrmeshpy.UnionFind_VertId.__init__ | ( | self | ) |
| None mrmeshpy.UnionFind_VertId.__init__ | ( | self, | |
| int | size ) |
creates union-find with given number of elements, each element is the only one in its disjoint set
| None mrmeshpy.UnionFind_VertId.__init__ | ( | self, | |
| BaseUnionFind_VertId | base ) |
adopts the parent forest of a base/parallel union-find and (re)computes set sizes, so the result supports the full sequential interface (e.g. unite, sizeOfComp)
| None mrmeshpy.UnionFind_VertId.__init__ | ( | self, | |
| UnionFind_VertId | arg0 ) |
Implicit copy constructor.
|
static |
Reimplemented from mrmeshpy.BaseUnionFind_VertId.
|
static |
Reimplemented from mrmeshpy.BaseUnionFind_VertId.
| None mrmeshpy.UnionFind_VertId.reset | ( | self, | |
| int | size ) |
resets union-find to represent given number of elements, each element is the only one in its disjoint set
Reimplemented from mrmeshpy.BaseUnionFind_VertId.
| int mrmeshpy.UnionFind_VertId.sizeOfComp | ( | self, | |
| VertId | a ) |
returns the number of elements in the set containing given element
unite two elements, \\return first: new common root, second: true = union was done, false = first and second were already united