Union-find data structure for representing disjoin 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.
More...
|
| unsafe | UnionFind_MRVertId () |
| | Constructs an empty (default-constructed) instance.
|
| |
| unsafe | UnionFind_MRVertId (MR._ByValue_UnionFind_MRVertId _other) |
| | Generated from constructor MR.UnionFind<MR.VertId>::UnionFind.
|
| |
| | UnionFind_MRVertId (Const_UnionFind_MRVertId _other) |
| | Generated from constructor MR.UnionFind<MR.VertId>::UnionFind.
|
| |
| | UnionFind_MRVertId (UnionFind_MRVertId _other) |
| | Generated from constructor MR.UnionFind<MR.VertId>::UnionFind.
|
| |
| unsafe | UnionFind_MRVertId (ulong size) |
| | creates union-find with given number of elements, each element is the only one in its disjoint set Generated from constructor MR.UnionFind<MR.VertId>::UnionFind.
|
| |
| unsafe MR.UnionFind_MRVertId | assign (MR._ByValue_UnionFind_MRVertId _other) |
| | Generated from method MR.UnionFind<MR.VertId>::operator=.
|
| |
| unsafe void | reset (ulong size) |
| | resets union-find to represent given number of elements, each element is the only one in its disjoint set Generated from method MR.UnionFind<MR.VertId>::reset.
|
| |
| unsafe MR.Std.Pair_MRVertId_Bool | unite (MR.VertId first, MR.VertId second) |
| | unite two elements,
|
| |
| unsafe bool | united (MR.VertId first, MR.VertId second) |
| | returns true if given two elements are from one set Generated from method MR.UnionFind<MR.VertId>::united.
|
| |
| unsafe MR.VertId | find (MR.VertId a) |
| | finds the root of the set containing given element with optimizing data structure updates Generated from method MR.UnionFind<MR.VertId>::find.
|
| |
| unsafe MR.VertId | findUpdateRange (MR.VertId a, MR.VertId begin, MR.VertId end) |
| | finds the root of the set containing given element with optimizing data structure in the range [begin, end) Generated from method MR.UnionFind<MR.VertId>::findUpdateRange.
|
| |
| unsafe MR.Const_VertMap | roots () |
| | sets the root of corresponding set as the parent of each element, then returns the vector Generated from method MR.UnionFind<MR.VertId>::roots.
|
| |
| unsafe int | sizeOfComp (MR.VertId a) |
| | returns the number of elements in the set containing given element Generated from method MR.UnionFind<MR.VertId>::sizeOfComp.
|
| |
Union-find data structure for representing disjoin 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.
- Template Parameters
-
| I | is the identifier of a set's element, e.g. FaceId Generated from class MR.UnionFind<MR.VertId>. This is the non-const half of the class. |
◆ UnionFind_MRVertId() [1/5]
| unsafe MR.UnionFind_MRVertId.UnionFind_MRVertId |
( |
| ) |
|
|
inline |
Constructs an empty (default-constructed) instance.
◆ UnionFind_MRVertId() [2/5]
| unsafe MR.UnionFind_MRVertId.UnionFind_MRVertId |
( |
MR._ByValue_UnionFind_MRVertId | _other | ) |
|
|
inline |
Generated from constructor MR.UnionFind<MR.VertId>::UnionFind.
◆ UnionFind_MRVertId() [3/5]
| MR.UnionFind_MRVertId.UnionFind_MRVertId |
( |
Const_UnionFind_MRVertId | _other | ) |
|
|
inline |
Generated from constructor MR.UnionFind<MR.VertId>::UnionFind.
◆ UnionFind_MRVertId() [4/5]
Generated from constructor MR.UnionFind<MR.VertId>::UnionFind.
◆ UnionFind_MRVertId() [5/5]
| unsafe MR.UnionFind_MRVertId.UnionFind_MRVertId |
( |
ulong | size | ) |
|
|
inline |
creates union-find with given number of elements, each element is the only one in its disjoint set Generated from constructor MR.UnionFind<MR.VertId>::UnionFind.
◆ assign()
Generated from method MR.UnionFind<MR.VertId>::operator=.
◆ find()
finds the root of the set containing given element with optimizing data structure updates Generated from method MR.UnionFind<MR.VertId>::find.
◆ findUpdateRange()
finds the root of the set containing given element with optimizing data structure in the range [begin, end) Generated from method MR.UnionFind<MR.VertId>::findUpdateRange.
◆ reset()
| unsafe void MR.UnionFind_MRVertId.reset |
( |
ulong | size | ) |
|
|
inline |
resets union-find to represent given number of elements, each element is the only one in its disjoint set Generated from method MR.UnionFind<MR.VertId>::reset.
◆ roots()
| unsafe MR.Const_VertMap MR.UnionFind_MRVertId.roots |
( |
| ) |
|
|
inline |
sets the root of corresponding set as the parent of each element, then returns the vector Generated from method MR.UnionFind<MR.VertId>::roots.
◆ sizeOfComp()
| unsafe int MR.UnionFind_MRVertId.sizeOfComp |
( |
MR.VertId | a | ) |
|
|
inline |
returns the number of elements in the set containing given element Generated from method MR.UnionFind<MR.VertId>::sizeOfComp.
◆ unite()
| unsafe MR.Std.Pair_MRVertId_Bool MR.UnionFind_MRVertId.unite |
( |
MR.VertId | first, |
|
|
MR.VertId | second ) |
|
inline |
unite two elements,
- Returns
- first: new common root, second: true = union was done, false = first and second were already united Generated from method
MR.UnionFind<MR.VertId>::unite.
◆ united()
returns true if given two elements are from one set Generated from method MR.UnionFind<MR.VertId>::united.
The documentation for this class was generated from the following file: