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...
Public Member Functions | |
| auto | assign_from_another (_other:&meshlib::BaseUnionFind_MR_FaceId) -> &mut meshlib::BaseUnionFind_MR_FaceId |
| auto | size () const -> usize |
| void | reset (size:usize) |
| auto | add () -> meshlib::FaceId |
| auto | unite_unbalanced (first:meshlib::FaceId, second:meshlib::FaceId) -> meshlib::Owned< meshlib::std_pair_MR_FaceId_bool > |
| auto | united (first:meshlib::FaceId, second:meshlib::FaceId) -> bool |
| auto | is_root (a:meshlib::FaceId) const -> bool |
| auto | parent (a:meshlib::FaceId) const -> meshlib::FaceId |
| auto | find (a:meshlib::FaceId) -> meshlib::FaceId |
| auto | find_update_range (a:meshlib::FaceId, begin:meshlib::FaceId, end:meshlib::FaceId) -> meshlib::FaceId |
| auto | roots () -> &meshlib::FaceMap |
| auto | parents () const -> &meshlib::FaceMap |
Static Public Member Functions | |
| static auto | new () -> meshlib::Owned< meshlib::BaseUnionFind_MR_FaceId > |
| static auto | construct_from_another (_other:&meshlib::BaseUnionFind_MR_FaceId) -> meshlib::Owned< meshlib::BaseUnionFind_MR_FaceId > |
| Static Public Member Functions inherited from meshlib::CppClass | |
| static void | destroy (ptr:*mut Self) |
| Static Public Member Functions inherited from meshlib::CppCopy | |
| static auto | copy (ptr:*const Self) -> *mut Self |
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
| I | is the identifier of a set's element, e.g. FaceId |
Generated from class MR::BaseUnionFind<MR::FaceId>.
Generated from class MR::BaseUnionFind<MR::FaceId>. Heap-allocated instances are held in Owned<BaseUnionFind_MR_FaceId>.
| auto meshlib::BaseUnionFind_MR_FaceId::add | ( | ) | -> meshlib::FaceId |
adds new element in its own disjoint set, returns its identifier Generated from method MR::BaseUnionFind<MR::FaceId>::add.
Calls MR_BaseUnionFind_MR_FaceId_add().
| auto meshlib::BaseUnionFind_MR_FaceId::assign_from_another | ( | _other:&meshlib::BaseUnionFind_MR_FaceId | ) | -> &mut meshlib::BaseUnionFind_MR_FaceId |
Generated from method MR::BaseUnionFind<MR::FaceId>::operator=.
Calls MR_BaseUnionFind_MR_FaceId_AssignFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in this object. The reference to this object might be preserved in the return value.
|
static |
Generated from constructor MR::BaseUnionFind<MR::FaceId>::BaseUnionFind.
Calls MR_BaseUnionFind_MR_FaceId_ConstructFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object.
| auto meshlib::BaseUnionFind_MR_FaceId::find | ( | a:meshlib::FaceId | ) | -> meshlib::FaceId |
finds the root of the set containing given element with optimizing data structure updates Generated from method MR::BaseUnionFind<MR::FaceId>::find.
Calls MR_BaseUnionFind_MR_FaceId_find().
| auto meshlib::BaseUnionFind_MR_FaceId::find_update_range | ( | a:meshlib::FaceId | , |
| begin:meshlib::FaceId | , | ||
| end:meshlib::FaceId | ) -> meshlib::FaceId |
finds the root of the set containing given element with optimizing data structure in the range [begin, end) Generated from method MR::BaseUnionFind<MR::FaceId>::findUpdateRange.
Calls MR_BaseUnionFind_MR_FaceId_findUpdateRange().
| auto meshlib::BaseUnionFind_MR_FaceId::is_root | ( | a:meshlib::FaceId | ) | const -> bool |
returns true if given element is the root of some set Generated from method MR::BaseUnionFind<MR::FaceId>::isRoot.
Calls MR_BaseUnionFind_MR_FaceId_isRoot().
|
static |
Constructs an empty (default-constructed) instance.
Calls MR_BaseUnionFind_MR_FaceId_DefaultConstruct().
| auto meshlib::BaseUnionFind_MR_FaceId::parent | ( | a:meshlib::FaceId | ) | const -> meshlib::FaceId |
return parent element of this element, which is equal to given element only for set's root Generated from method MR::BaseUnionFind<MR::FaceId>::parent.
Calls MR_BaseUnionFind_MR_FaceId_parent().
| auto meshlib::BaseUnionFind_MR_FaceId::parents | ( | ) | const -> &meshlib::FaceMap |
gets the parents of all elements as is Generated from method MR::BaseUnionFind<MR::FaceId>::parents.
Calls MR_BaseUnionFind_MR_FaceId_parents().
| void meshlib::BaseUnionFind_MR_FaceId::reset | ( | size:usize | ) |
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::FaceId>::reset.
Calls MR_BaseUnionFind_MR_FaceId_reset().
| auto meshlib::BaseUnionFind_MR_FaceId::roots | ( | ) | -> &meshlib::FaceMap |
sets the root of corresponding set as the parent of each element, then returns the vector Generated from method MR::BaseUnionFind<MR::FaceId>::roots.
Calls MR_BaseUnionFind_MR_FaceId_roots().
| auto meshlib::BaseUnionFind_MR_FaceId::size | ( | ) | const -> usize |
returns the number of elements in union-find Generated from method MR::BaseUnionFind<MR::FaceId>::size.
Calls MR_BaseUnionFind_MR_FaceId_size().
| auto meshlib::BaseUnionFind_MR_FaceId::unite_unbalanced | ( | first:meshlib::FaceId | , |
| second:meshlib::FaceId | ) -> meshlib::Owned< meshlib::std_pair_MR_FaceId_bool > |
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.
Calls MR_BaseUnionFind_MR_FaceId_uniteUnbalanced().
| auto meshlib::BaseUnionFind_MR_FaceId::united | ( | first:meshlib::FaceId | , |
| second:meshlib::FaceId | ) -> bool |
returns true if given two elements are from one set Generated from method MR::BaseUnionFind<MR::FaceId>::united.
Calls MR_BaseUnionFind_MR_FaceId_united().