MeshLib C# Docs
Loading...
Searching...
No Matches
MR.BaseUnionFind_MRUndirectedEdgeId Class Reference

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 More...

Inheritance diagram for MR.BaseUnionFind_MRUndirectedEdgeId:

Public Member Functions

unsafe BaseUnionFind_MRUndirectedEdgeId ()
 Constructs an empty (default-constructed) instance.
unsafe BaseUnionFind_MRUndirectedEdgeId (MR._ByValue_BaseUnionFind_MRUndirectedEdgeId _other)
 Generated from constructor MR::BaseUnionFind<MR.UndirectedEdgeId>::BaseUnionFind.
 BaseUnionFind_MRUndirectedEdgeId (Const_BaseUnionFind_MRUndirectedEdgeId _other)
 Generated from constructor MR::BaseUnionFind<MR.UndirectedEdgeId>::BaseUnionFind.
 BaseUnionFind_MRUndirectedEdgeId (BaseUnionFind_MRUndirectedEdgeId _other)
 Generated from constructor MR::BaseUnionFind<MR.UndirectedEdgeId>::BaseUnionFind.
unsafe MR.BaseUnionFind_MRUndirectedEdgeId assign (MR._ByValue_BaseUnionFind_MRUndirectedEdgeId _other)
 Generated from method MR::BaseUnionFind<MR.UndirectedEdgeId>::operator=.
unsafe void reset (nuint size)
 resets union-find to represent given number of elements, each element is the only one in its disjoint set Generated from method MR::BaseUnionFind<MR.UndirectedEdgeId>reset.
unsafe MR.Std.Pair_MRUndirectedEdgeId_Bool uniteUnbalanced (MR.UndirectedEdgeId first, MR.UndirectedEdgeId 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.
unsafe bool united (MR.UndirectedEdgeId first, MR.UndirectedEdgeId second)
 returns true if given two elements are from one set Generated from method MR::BaseUnionFind<MR.UndirectedEdgeId>united.
unsafe MR.UndirectedEdgeId find (MR.UndirectedEdgeId a)
 finds the root of the set containing given element with optimizing data structure updates Generated from method MR::BaseUnionFind<MR.UndirectedEdgeId>find.
unsafe MR.UndirectedEdgeId findUpdateRange (MR.UndirectedEdgeId a, MR.UndirectedEdgeId begin, MR.UndirectedEdgeId end)
 finds the root of the set containing given element with optimizing data structure in the range [begin, end) Generated from method MR::BaseUnionFind<MR.UndirectedEdgeId>findUpdateRange.
unsafe MR.Const_UndirectedEdgeMap roots ()
 sets the root of corresponding set as the parent of each element, then returns the vector Generated from method MR::BaseUnionFind<MR.UndirectedEdgeId>roots.
Public Member Functions inherited from MR.Const_BaseUnionFind_MRUndirectedEdgeId
virtual void Dispose ()
unsafe Const_BaseUnionFind_MRUndirectedEdgeId ()
 Constructs an empty (default-constructed) instance.
unsafe Const_BaseUnionFind_MRUndirectedEdgeId (MR._ByValue_BaseUnionFind_MRUndirectedEdgeId _other)
 Generated from constructor MR::BaseUnionFind<MR.UndirectedEdgeId>::BaseUnionFind.
 Const_BaseUnionFind_MRUndirectedEdgeId (Const_BaseUnionFind_MRUndirectedEdgeId _other)
 Generated from constructor MR::BaseUnionFind<MR.UndirectedEdgeId>::BaseUnionFind.
 Const_BaseUnionFind_MRUndirectedEdgeId (BaseUnionFind_MRUndirectedEdgeId _other)
 Generated from constructor MR::BaseUnionFind<MR.UndirectedEdgeId>::BaseUnionFind.
unsafe nuint size ()
 returns the number of elements in union-find Generated from method MR::BaseUnionFind<MR.UndirectedEdgeId>size.
unsafe bool isRoot (MR.UndirectedEdgeId a)
 returns true if given element is the root of some set Generated from method MR::BaseUnionFind<MR.UndirectedEdgeId>isRoot.
unsafe MR.UndirectedEdgeId parent (MR.UndirectedEdgeId a)
 return parent element of this element, which is equal to given element only for set's root Generated from method MR::BaseUnionFind<MR.UndirectedEdgeId>parent.
unsafe MR.Const_UndirectedEdgeMap parents ()
 gets the parents of all elements as is Generated from method MR::BaseUnionFind<MR.UndirectedEdgeId>parents.

Additional Inherited Members

Protected Member Functions inherited from MR.Const_BaseUnionFind_MRUndirectedEdgeId
virtual unsafe void Dispose (bool disposing)

Detailed Description

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

Template Parameters
Iis the identifier of a set's element, e.g. FaceId Generated from class MR::BaseUnionFind<MR.UndirectedEdgeId>. Derived classes: Direct: (non-virtual) MR::UnionFind<MR.UndirectedEdgeId> This is the non-const half of the class.

Constructor & Destructor Documentation

◆ BaseUnionFind_MRUndirectedEdgeId() [1/4]

unsafe MR.BaseUnionFind_MRUndirectedEdgeId.BaseUnionFind_MRUndirectedEdgeId ( )
inline

Constructs an empty (default-constructed) instance.

◆ BaseUnionFind_MRUndirectedEdgeId() [2/4]

unsafe MR.BaseUnionFind_MRUndirectedEdgeId.BaseUnionFind_MRUndirectedEdgeId ( MR._ByValue_BaseUnionFind_MRUndirectedEdgeId _other)
inline

Generated from constructor MR::BaseUnionFind<MR.UndirectedEdgeId>::BaseUnionFind.

◆ BaseUnionFind_MRUndirectedEdgeId() [3/4]

MR.BaseUnionFind_MRUndirectedEdgeId.BaseUnionFind_MRUndirectedEdgeId ( Const_BaseUnionFind_MRUndirectedEdgeId _other)
inline

Generated from constructor MR::BaseUnionFind<MR.UndirectedEdgeId>::BaseUnionFind.

◆ BaseUnionFind_MRUndirectedEdgeId() [4/4]

MR.BaseUnionFind_MRUndirectedEdgeId.BaseUnionFind_MRUndirectedEdgeId ( BaseUnionFind_MRUndirectedEdgeId _other)
inline

Generated from constructor MR::BaseUnionFind<MR.UndirectedEdgeId>::BaseUnionFind.

Member Function Documentation

◆ assign()

unsafe MR.BaseUnionFind_MRUndirectedEdgeId MR.BaseUnionFind_MRUndirectedEdgeId.assign ( MR._ByValue_BaseUnionFind_MRUndirectedEdgeId _other)
inline

Generated from method MR::BaseUnionFind<MR.UndirectedEdgeId>::operator=.

◆ find()

unsafe MR.UndirectedEdgeId MR.BaseUnionFind_MRUndirectedEdgeId.find ( MR.UndirectedEdgeId a)
inline

finds the root of the set containing given element with optimizing data structure updates Generated from method MR::BaseUnionFind<MR.UndirectedEdgeId>find.

◆ findUpdateRange()

unsafe MR.UndirectedEdgeId MR.BaseUnionFind_MRUndirectedEdgeId.findUpdateRange ( MR.UndirectedEdgeId a,
MR.UndirectedEdgeId begin,
MR.UndirectedEdgeId end )
inline

finds the root of the set containing given element with optimizing data structure in the range [begin, end) Generated from method MR::BaseUnionFind<MR.UndirectedEdgeId>findUpdateRange.

◆ reset()

unsafe void MR.BaseUnionFind_MRUndirectedEdgeId.reset ( nuint 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::BaseUnionFind<MR.UndirectedEdgeId>reset.

◆ roots()

unsafe MR.Const_UndirectedEdgeMap MR.BaseUnionFind_MRUndirectedEdgeId.roots ( )
inline

sets the root of corresponding set as the parent of each element, then returns the vector Generated from method MR::BaseUnionFind<MR.UndirectedEdgeId>roots.

◆ united()

unsafe bool MR.BaseUnionFind_MRUndirectedEdgeId.united ( MR.UndirectedEdgeId first,
MR.UndirectedEdgeId second )
inline

returns true if given two elements are from one set Generated from method MR::BaseUnionFind<MR.UndirectedEdgeId>united.

◆ uniteUnbalanced()

unsafe MR.Std.Pair_MRUndirectedEdgeId_Bool MR.BaseUnionFind_MRUndirectedEdgeId.uniteUnbalanced ( MR.UndirectedEdgeId first,
MR.UndirectedEdgeId second )
inline

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.

Returns
first: new common root, second: true if the union was done (false if already in one set) Generated from method MR::BaseUnionFind<MR.UndirectedEdgeId>uniteUnbalanced.

The documentation for this class was generated from the following file: