MeshLib C Docs
Loading...
Searching...
No Matches
MRUnionFind.h File Reference
#include <MRCMesh/MRId.h>
#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef struct MR_FaceMap MR_FaceMap
 
typedef struct MR_UndirectedEdgeMap MR_UndirectedEdgeMap
 
typedef struct MR_VertMap MR_VertMap
 
typedef struct MR_std_pair_MR_FaceId_bool MR_std_pair_MR_FaceId_bool
 
typedef struct MR_std_pair_MR_UndirectedEdgeId_bool MR_std_pair_MR_UndirectedEdgeId_bool
 
typedef struct MR_std_pair_MR_VertId_bool MR_std_pair_MR_VertId_bool
 
typedef struct MR_UnionFind_MR_FaceId MR_UnionFind_MR_FaceId
 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.
 
typedef struct MR_UnionFind_MR_VertId MR_UnionFind_MR_VertId
 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.
 
typedef struct MR_UnionFind_MR_UndirectedEdgeId MR_UnionFind_MR_UndirectedEdgeId
 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.
 

Functions

MRC_API MR_UnionFind_MR_FaceIdMR_UnionFind_MR_FaceId_DefaultConstruct (void)
 
MRC_API MR_UnionFind_MR_FaceIdMR_UnionFind_MR_FaceId_DefaultConstructArray (size_t num_elems)
 
MRC_API const MR_UnionFind_MR_FaceIdMR_UnionFind_MR_FaceId_OffsetPtr (const MR_UnionFind_MR_FaceId *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 
MRC_API MR_UnionFind_MR_FaceIdMR_UnionFind_MR_FaceId_OffsetMutablePtr (MR_UnionFind_MR_FaceId *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 
MRC_API MR_UnionFind_MR_FaceIdMR_UnionFind_MR_FaceId_ConstructFromAnother (MR_PassBy _other_pass_by, MR_UnionFind_MR_FaceId *_other)
 
MRC_API MR_UnionFind_MR_FaceIdMR_UnionFind_MR_FaceId_Construct (MR_uint64_t size)
 
MRC_API void MR_UnionFind_MR_FaceId_Destroy (const MR_UnionFind_MR_FaceId *_this)
 Destroys a heap-allocated instance of MR_UnionFind_MR_FaceId. Does nothing if the pointer is null.
 
MRC_API void MR_UnionFind_MR_FaceId_DestroyArray (const MR_UnionFind_MR_FaceId *_this)
 Destroys a heap-allocated array of MR_UnionFind_MR_FaceId. Does nothing if the pointer is null.
 
MRC_API MR_UnionFind_MR_FaceIdMR_UnionFind_MR_FaceId_AssignFromAnother (MR_UnionFind_MR_FaceId *_this, MR_PassBy _other_pass_by, MR_UnionFind_MR_FaceId *_other)
 
MRC_API MR_uint64_t MR_UnionFind_MR_FaceId_size (const MR_UnionFind_MR_FaceId *_this)
 
MRC_API void MR_UnionFind_MR_FaceId_reset (MR_UnionFind_MR_FaceId *_this, MR_uint64_t size)
 
MRC_API MR_std_pair_MR_FaceId_boolMR_UnionFind_MR_FaceId_unite (MR_UnionFind_MR_FaceId *_this, MR_FaceId first, MR_FaceId second)
 
MRC_API bool MR_UnionFind_MR_FaceId_united (MR_UnionFind_MR_FaceId *_this, MR_FaceId first, MR_FaceId second)
 
MRC_API bool MR_UnionFind_MR_FaceId_isRoot (const MR_UnionFind_MR_FaceId *_this, MR_FaceId a)
 
MRC_API MR_FaceId MR_UnionFind_MR_FaceId_parent (const MR_UnionFind_MR_FaceId *_this, MR_FaceId a)
 
MRC_API MR_FaceId MR_UnionFind_MR_FaceId_find (MR_UnionFind_MR_FaceId *_this, MR_FaceId a)
 
MRC_API MR_FaceId MR_UnionFind_MR_FaceId_findUpdateRange (MR_UnionFind_MR_FaceId *_this, MR_FaceId a, MR_FaceId begin, MR_FaceId end)
 
MRC_API const MR_FaceMapMR_UnionFind_MR_FaceId_roots (MR_UnionFind_MR_FaceId *_this)
 
MRC_API const MR_FaceMapMR_UnionFind_MR_FaceId_parents (const MR_UnionFind_MR_FaceId *_this)
 
MRC_API int32_t MR_UnionFind_MR_FaceId_sizeOfComp (MR_UnionFind_MR_FaceId *_this, MR_FaceId a)
 
MRC_API MR_UnionFind_MR_VertIdMR_UnionFind_MR_VertId_DefaultConstruct (void)
 
MRC_API MR_UnionFind_MR_VertIdMR_UnionFind_MR_VertId_DefaultConstructArray (size_t num_elems)
 
MRC_API const MR_UnionFind_MR_VertIdMR_UnionFind_MR_VertId_OffsetPtr (const MR_UnionFind_MR_VertId *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 
MRC_API MR_UnionFind_MR_VertIdMR_UnionFind_MR_VertId_OffsetMutablePtr (MR_UnionFind_MR_VertId *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 
MRC_API MR_UnionFind_MR_VertIdMR_UnionFind_MR_VertId_ConstructFromAnother (MR_PassBy _other_pass_by, MR_UnionFind_MR_VertId *_other)
 
MRC_API MR_UnionFind_MR_VertIdMR_UnionFind_MR_VertId_Construct (MR_uint64_t size)
 
MRC_API void MR_UnionFind_MR_VertId_Destroy (const MR_UnionFind_MR_VertId *_this)
 Destroys a heap-allocated instance of MR_UnionFind_MR_VertId. Does nothing if the pointer is null.
 
MRC_API void MR_UnionFind_MR_VertId_DestroyArray (const MR_UnionFind_MR_VertId *_this)
 Destroys a heap-allocated array of MR_UnionFind_MR_VertId. Does nothing if the pointer is null.
 
MRC_API MR_UnionFind_MR_VertIdMR_UnionFind_MR_VertId_AssignFromAnother (MR_UnionFind_MR_VertId *_this, MR_PassBy _other_pass_by, MR_UnionFind_MR_VertId *_other)
 
MRC_API MR_uint64_t MR_UnionFind_MR_VertId_size (const MR_UnionFind_MR_VertId *_this)
 
MRC_API void MR_UnionFind_MR_VertId_reset (MR_UnionFind_MR_VertId *_this, MR_uint64_t size)
 
MRC_API MR_std_pair_MR_VertId_boolMR_UnionFind_MR_VertId_unite (MR_UnionFind_MR_VertId *_this, MR_VertId first, MR_VertId second)
 
MRC_API bool MR_UnionFind_MR_VertId_united (MR_UnionFind_MR_VertId *_this, MR_VertId first, MR_VertId second)
 
MRC_API bool MR_UnionFind_MR_VertId_isRoot (const MR_UnionFind_MR_VertId *_this, MR_VertId a)
 
MRC_API MR_VertId MR_UnionFind_MR_VertId_parent (const MR_UnionFind_MR_VertId *_this, MR_VertId a)
 
MRC_API MR_VertId MR_UnionFind_MR_VertId_find (MR_UnionFind_MR_VertId *_this, MR_VertId a)
 
MRC_API MR_VertId MR_UnionFind_MR_VertId_findUpdateRange (MR_UnionFind_MR_VertId *_this, MR_VertId a, MR_VertId begin, MR_VertId end)
 
MRC_API const MR_VertMapMR_UnionFind_MR_VertId_roots (MR_UnionFind_MR_VertId *_this)
 
MRC_API const MR_VertMapMR_UnionFind_MR_VertId_parents (const MR_UnionFind_MR_VertId *_this)
 
MRC_API int32_t MR_UnionFind_MR_VertId_sizeOfComp (MR_UnionFind_MR_VertId *_this, MR_VertId a)
 
MRC_API MR_UnionFind_MR_UndirectedEdgeIdMR_UnionFind_MR_UndirectedEdgeId_DefaultConstruct (void)
 
MRC_API MR_UnionFind_MR_UndirectedEdgeIdMR_UnionFind_MR_UndirectedEdgeId_DefaultConstructArray (size_t num_elems)
 
MRC_API const MR_UnionFind_MR_UndirectedEdgeIdMR_UnionFind_MR_UndirectedEdgeId_OffsetPtr (const MR_UnionFind_MR_UndirectedEdgeId *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 
MRC_API MR_UnionFind_MR_UndirectedEdgeIdMR_UnionFind_MR_UndirectedEdgeId_OffsetMutablePtr (MR_UnionFind_MR_UndirectedEdgeId *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 
MRC_API MR_UnionFind_MR_UndirectedEdgeIdMR_UnionFind_MR_UndirectedEdgeId_ConstructFromAnother (MR_PassBy _other_pass_by, MR_UnionFind_MR_UndirectedEdgeId *_other)
 
MRC_API MR_UnionFind_MR_UndirectedEdgeIdMR_UnionFind_MR_UndirectedEdgeId_Construct (MR_uint64_t size)
 
MRC_API void MR_UnionFind_MR_UndirectedEdgeId_Destroy (const MR_UnionFind_MR_UndirectedEdgeId *_this)
 Destroys a heap-allocated instance of MR_UnionFind_MR_UndirectedEdgeId. Does nothing if the pointer is null.
 
MRC_API void MR_UnionFind_MR_UndirectedEdgeId_DestroyArray (const MR_UnionFind_MR_UndirectedEdgeId *_this)
 Destroys a heap-allocated array of MR_UnionFind_MR_UndirectedEdgeId. Does nothing if the pointer is null.
 
MRC_API MR_UnionFind_MR_UndirectedEdgeIdMR_UnionFind_MR_UndirectedEdgeId_AssignFromAnother (MR_UnionFind_MR_UndirectedEdgeId *_this, MR_PassBy _other_pass_by, MR_UnionFind_MR_UndirectedEdgeId *_other)
 
MRC_API MR_uint64_t MR_UnionFind_MR_UndirectedEdgeId_size (const MR_UnionFind_MR_UndirectedEdgeId *_this)
 
MRC_API void MR_UnionFind_MR_UndirectedEdgeId_reset (MR_UnionFind_MR_UndirectedEdgeId *_this, MR_uint64_t size)
 
MRC_API MR_std_pair_MR_UndirectedEdgeId_boolMR_UnionFind_MR_UndirectedEdgeId_unite (MR_UnionFind_MR_UndirectedEdgeId *_this, MR_UndirectedEdgeId first, MR_UndirectedEdgeId second)
 
MRC_API bool MR_UnionFind_MR_UndirectedEdgeId_united (MR_UnionFind_MR_UndirectedEdgeId *_this, MR_UndirectedEdgeId first, MR_UndirectedEdgeId second)
 
MRC_API bool MR_UnionFind_MR_UndirectedEdgeId_isRoot (const MR_UnionFind_MR_UndirectedEdgeId *_this, MR_UndirectedEdgeId a)
 
MRC_API MR_UndirectedEdgeId MR_UnionFind_MR_UndirectedEdgeId_parent (const MR_UnionFind_MR_UndirectedEdgeId *_this, MR_UndirectedEdgeId a)
 
MRC_API MR_UndirectedEdgeId MR_UnionFind_MR_UndirectedEdgeId_find (MR_UnionFind_MR_UndirectedEdgeId *_this, MR_UndirectedEdgeId a)
 
MRC_API MR_UndirectedEdgeId MR_UnionFind_MR_UndirectedEdgeId_findUpdateRange (MR_UnionFind_MR_UndirectedEdgeId *_this, MR_UndirectedEdgeId a, MR_UndirectedEdgeId begin, MR_UndirectedEdgeId end)
 
MRC_API const MR_UndirectedEdgeMapMR_UnionFind_MR_UndirectedEdgeId_roots (MR_UnionFind_MR_UndirectedEdgeId *_this)
 
MRC_API const MR_UndirectedEdgeMapMR_UnionFind_MR_UndirectedEdgeId_parents (const MR_UnionFind_MR_UndirectedEdgeId *_this)
 
MRC_API int32_t MR_UnionFind_MR_UndirectedEdgeId_sizeOfComp (MR_UnionFind_MR_UndirectedEdgeId *_this, MR_UndirectedEdgeId a)
 

Typedef Documentation

◆ MR_FaceMap

typedef struct MR_FaceMap MR_FaceMap

◆ MR_std_pair_MR_FaceId_bool

◆ MR_std_pair_MR_UndirectedEdgeId_bool

◆ MR_std_pair_MR_VertId_bool

◆ MR_UndirectedEdgeMap

◆ MR_UnionFind_MR_FaceId

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
Iis the identifier of a set's element, e.g. FaceId Generated from class MR::UnionFind<MR::FaceId>.

◆ MR_UnionFind_MR_UndirectedEdgeId

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
Iis the identifier of a set's element, e.g. FaceId Generated from class MR::UnionFind<MR::UndirectedEdgeId>.

◆ MR_UnionFind_MR_VertId

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
Iis the identifier of a set's element, e.g. FaceId Generated from class MR::UnionFind<MR::VertId>.

◆ MR_VertMap

typedef struct MR_VertMap MR_VertMap

Function Documentation

◆ MR_UnionFind_MR_FaceId_AssignFromAnother()

MRC_API MR_UnionFind_MR_FaceId * MR_UnionFind_MR_FaceId_AssignFromAnother ( MR_UnionFind_MR_FaceId * _this,
MR_PassBy _other_pass_by,
MR_UnionFind_MR_FaceId * _other )

Generated from a method of class MR::UnionFind<MR::FaceId> named operator=. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UnionFind_MR_FaceId_Construct()

MRC_API MR_UnionFind_MR_FaceId * MR_UnionFind_MR_FaceId_Construct ( MR_uint64_t size)

creates union-find with given number of elements, each element is the only one in its disjoint set Generated from a constructor of class MR::UnionFind<MR::FaceId>. Never returns null. Returns an instance allocated on the heap! Must call MR_UnionFind_MR_FaceId_Destroy() to free it when you're done using it.

◆ MR_UnionFind_MR_FaceId_ConstructFromAnother()

MRC_API MR_UnionFind_MR_FaceId * MR_UnionFind_MR_FaceId_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_UnionFind_MR_FaceId * _other )

Generated from a constructor of class MR::UnionFind<MR::FaceId>. Never returns null. Returns an instance allocated on the heap! Must call MR_UnionFind_MR_FaceId_Destroy() to free it when you're done using it.

◆ MR_UnionFind_MR_FaceId_DefaultConstruct()

MRC_API MR_UnionFind_MR_FaceId * MR_UnionFind_MR_FaceId_DefaultConstruct ( void )

Constructs an empty (default-constructed) instance. Never returns null. Returns an instance allocated on the heap! Must call MR_UnionFind_MR_FaceId_Destroy() to free it when you're done using it.

◆ MR_UnionFind_MR_FaceId_DefaultConstructArray()

MRC_API MR_UnionFind_MR_FaceId * MR_UnionFind_MR_FaceId_DefaultConstructArray ( size_t num_elems)

Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_UnionFind_MR_FaceId_DestroyArray(). Use MR_UnionFind_MR_FaceId_OffsetMutablePtr() and MR_UnionFind_MR_FaceId_OffsetPtr() to access the array elements.

◆ MR_UnionFind_MR_FaceId_Destroy()

MRC_API void MR_UnionFind_MR_FaceId_Destroy ( const MR_UnionFind_MR_FaceId * _this)

Destroys a heap-allocated instance of MR_UnionFind_MR_FaceId. Does nothing if the pointer is null.

◆ MR_UnionFind_MR_FaceId_DestroyArray()

MRC_API void MR_UnionFind_MR_FaceId_DestroyArray ( const MR_UnionFind_MR_FaceId * _this)

Destroys a heap-allocated array of MR_UnionFind_MR_FaceId. Does nothing if the pointer is null.

◆ MR_UnionFind_MR_FaceId_find()

MRC_API MR_FaceId MR_UnionFind_MR_FaceId_find ( MR_UnionFind_MR_FaceId * _this,
MR_FaceId a )

finds the root of the set containing given element with optimizing data structure updates Generated from a method of class MR::UnionFind<MR::FaceId> named find. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_FaceId_findUpdateRange()

MRC_API MR_FaceId MR_UnionFind_MR_FaceId_findUpdateRange ( MR_UnionFind_MR_FaceId * _this,
MR_FaceId a,
MR_FaceId begin,
MR_FaceId end )

finds the root of the set containing given element with optimizing data structure in the range [begin, end) Generated from a method of class MR::UnionFind<MR::FaceId> named findUpdateRange. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_FaceId_isRoot()

MRC_API bool MR_UnionFind_MR_FaceId_isRoot ( const MR_UnionFind_MR_FaceId * _this,
MR_FaceId a )

returns true if given element is the root of some set Generated from a method of class MR::UnionFind<MR::FaceId> named isRoot. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_FaceId_OffsetMutablePtr()

MRC_API MR_UnionFind_MR_FaceId * MR_UnionFind_MR_FaceId_OffsetMutablePtr ( MR_UnionFind_MR_FaceId * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_UnionFind_MR_FaceId_OffsetPtr()

MRC_API const MR_UnionFind_MR_FaceId * MR_UnionFind_MR_FaceId_OffsetPtr ( const MR_UnionFind_MR_FaceId * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_UnionFind_MR_FaceId_parent()

MRC_API MR_FaceId MR_UnionFind_MR_FaceId_parent ( const MR_UnionFind_MR_FaceId * _this,
MR_FaceId a )

return parent element of this element, which is equal to given element only for set's root Generated from a method of class MR::UnionFind<MR::FaceId> named parent. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_FaceId_parents()

MRC_API const MR_FaceMap * MR_UnionFind_MR_FaceId_parents ( const MR_UnionFind_MR_FaceId * _this)

gets the parents of all elements as is Generated from a method of class MR::UnionFind<MR::FaceId> named parents. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UnionFind_MR_FaceId_reset()

MRC_API void MR_UnionFind_MR_FaceId_reset ( MR_UnionFind_MR_FaceId * _this,
MR_uint64_t size )

resets union-find to represent given number of elements, each element is the only one in its disjoint set Generated from a method of class MR::UnionFind<MR::FaceId> named reset. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_FaceId_roots()

MRC_API const MR_FaceMap * MR_UnionFind_MR_FaceId_roots ( MR_UnionFind_MR_FaceId * _this)

sets the root of corresponding set as the parent of each element, then returns the vector Generated from a method of class MR::UnionFind<MR::FaceId> named roots. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UnionFind_MR_FaceId_size()

MRC_API MR_uint64_t MR_UnionFind_MR_FaceId_size ( const MR_UnionFind_MR_FaceId * _this)

returns the number of elements in union-find Generated from a method of class MR::UnionFind<MR::FaceId> named size. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_FaceId_sizeOfComp()

MRC_API int32_t MR_UnionFind_MR_FaceId_sizeOfComp ( MR_UnionFind_MR_FaceId * _this,
MR_FaceId a )

returns the number of elements in the set containing given element Generated from a method of class MR::UnionFind<MR::FaceId> named sizeOfComp. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_FaceId_unite()

MRC_API MR_std_pair_MR_FaceId_bool * MR_UnionFind_MR_FaceId_unite ( MR_UnionFind_MR_FaceId * _this,
MR_FaceId first,
MR_FaceId second )

unite two elements,

Returns
first: new common root, second: true = union was done, false = first and second were already united Generated from a method of class MR::UnionFind<MR::FaceId> named unite. Parameter _this can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_pair_MR_FaceId_bool_Destroy() to free it when you're done using it.

◆ MR_UnionFind_MR_FaceId_united()

MRC_API bool MR_UnionFind_MR_FaceId_united ( MR_UnionFind_MR_FaceId * _this,
MR_FaceId first,
MR_FaceId second )

returns true if given two elements are from one set Generated from a method of class MR::UnionFind<MR::FaceId> named united. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_UndirectedEdgeId_AssignFromAnother()

MRC_API MR_UnionFind_MR_UndirectedEdgeId * MR_UnionFind_MR_UndirectedEdgeId_AssignFromAnother ( MR_UnionFind_MR_UndirectedEdgeId * _this,
MR_PassBy _other_pass_by,
MR_UnionFind_MR_UndirectedEdgeId * _other )

Generated from a method of class MR::UnionFind<MR::UndirectedEdgeId> named operator=. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UnionFind_MR_UndirectedEdgeId_Construct()

MRC_API MR_UnionFind_MR_UndirectedEdgeId * MR_UnionFind_MR_UndirectedEdgeId_Construct ( MR_uint64_t size)

creates union-find with given number of elements, each element is the only one in its disjoint set Generated from a constructor of class MR::UnionFind<MR::UndirectedEdgeId>. Never returns null. Returns an instance allocated on the heap! Must call MR_UnionFind_MR_UndirectedEdgeId_Destroy() to free it when you're done using it.

◆ MR_UnionFind_MR_UndirectedEdgeId_ConstructFromAnother()

MRC_API MR_UnionFind_MR_UndirectedEdgeId * MR_UnionFind_MR_UndirectedEdgeId_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_UnionFind_MR_UndirectedEdgeId * _other )

Generated from a constructor of class MR::UnionFind<MR::UndirectedEdgeId>. Never returns null. Returns an instance allocated on the heap! Must call MR_UnionFind_MR_UndirectedEdgeId_Destroy() to free it when you're done using it.

◆ MR_UnionFind_MR_UndirectedEdgeId_DefaultConstruct()

MRC_API MR_UnionFind_MR_UndirectedEdgeId * MR_UnionFind_MR_UndirectedEdgeId_DefaultConstruct ( void )

Constructs an empty (default-constructed) instance. Never returns null. Returns an instance allocated on the heap! Must call MR_UnionFind_MR_UndirectedEdgeId_Destroy() to free it when you're done using it.

◆ MR_UnionFind_MR_UndirectedEdgeId_DefaultConstructArray()

MRC_API MR_UnionFind_MR_UndirectedEdgeId * MR_UnionFind_MR_UndirectedEdgeId_DefaultConstructArray ( size_t num_elems)

Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_UnionFind_MR_UndirectedEdgeId_DestroyArray(). Use MR_UnionFind_MR_UndirectedEdgeId_OffsetMutablePtr() and MR_UnionFind_MR_UndirectedEdgeId_OffsetPtr() to access the array elements.

◆ MR_UnionFind_MR_UndirectedEdgeId_Destroy()

MRC_API void MR_UnionFind_MR_UndirectedEdgeId_Destroy ( const MR_UnionFind_MR_UndirectedEdgeId * _this)

Destroys a heap-allocated instance of MR_UnionFind_MR_UndirectedEdgeId. Does nothing if the pointer is null.

◆ MR_UnionFind_MR_UndirectedEdgeId_DestroyArray()

MRC_API void MR_UnionFind_MR_UndirectedEdgeId_DestroyArray ( const MR_UnionFind_MR_UndirectedEdgeId * _this)

Destroys a heap-allocated array of MR_UnionFind_MR_UndirectedEdgeId. Does nothing if the pointer is null.

◆ MR_UnionFind_MR_UndirectedEdgeId_find()

MRC_API MR_UndirectedEdgeId MR_UnionFind_MR_UndirectedEdgeId_find ( MR_UnionFind_MR_UndirectedEdgeId * _this,
MR_UndirectedEdgeId a )

finds the root of the set containing given element with optimizing data structure updates Generated from a method of class MR::UnionFind<MR::UndirectedEdgeId> named find. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_UndirectedEdgeId_findUpdateRange()

MRC_API MR_UndirectedEdgeId MR_UnionFind_MR_UndirectedEdgeId_findUpdateRange ( MR_UnionFind_MR_UndirectedEdgeId * _this,
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 a method of class MR::UnionFind<MR::UndirectedEdgeId> named findUpdateRange. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_UndirectedEdgeId_isRoot()

MRC_API bool MR_UnionFind_MR_UndirectedEdgeId_isRoot ( const MR_UnionFind_MR_UndirectedEdgeId * _this,
MR_UndirectedEdgeId a )

returns true if given element is the root of some set Generated from a method of class MR::UnionFind<MR::UndirectedEdgeId> named isRoot. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_UndirectedEdgeId_OffsetMutablePtr()

MRC_API MR_UnionFind_MR_UndirectedEdgeId * MR_UnionFind_MR_UndirectedEdgeId_OffsetMutablePtr ( MR_UnionFind_MR_UndirectedEdgeId * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_UnionFind_MR_UndirectedEdgeId_OffsetPtr()

MRC_API const MR_UnionFind_MR_UndirectedEdgeId * MR_UnionFind_MR_UndirectedEdgeId_OffsetPtr ( const MR_UnionFind_MR_UndirectedEdgeId * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_UnionFind_MR_UndirectedEdgeId_parent()

MRC_API MR_UndirectedEdgeId MR_UnionFind_MR_UndirectedEdgeId_parent ( const MR_UnionFind_MR_UndirectedEdgeId * _this,
MR_UndirectedEdgeId a )

return parent element of this element, which is equal to given element only for set's root Generated from a method of class MR::UnionFind<MR::UndirectedEdgeId> named parent. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_UndirectedEdgeId_parents()

MRC_API const MR_UndirectedEdgeMap * MR_UnionFind_MR_UndirectedEdgeId_parents ( const MR_UnionFind_MR_UndirectedEdgeId * _this)

gets the parents of all elements as is Generated from a method of class MR::UnionFind<MR::UndirectedEdgeId> named parents. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UnionFind_MR_UndirectedEdgeId_reset()

MRC_API void MR_UnionFind_MR_UndirectedEdgeId_reset ( MR_UnionFind_MR_UndirectedEdgeId * _this,
MR_uint64_t size )

resets union-find to represent given number of elements, each element is the only one in its disjoint set Generated from a method of class MR::UnionFind<MR::UndirectedEdgeId> named reset. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_UndirectedEdgeId_roots()

MRC_API const MR_UndirectedEdgeMap * MR_UnionFind_MR_UndirectedEdgeId_roots ( MR_UnionFind_MR_UndirectedEdgeId * _this)

sets the root of corresponding set as the parent of each element, then returns the vector Generated from a method of class MR::UnionFind<MR::UndirectedEdgeId> named roots. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UnionFind_MR_UndirectedEdgeId_size()

MRC_API MR_uint64_t MR_UnionFind_MR_UndirectedEdgeId_size ( const MR_UnionFind_MR_UndirectedEdgeId * _this)

returns the number of elements in union-find Generated from a method of class MR::UnionFind<MR::UndirectedEdgeId> named size. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_UndirectedEdgeId_sizeOfComp()

MRC_API int32_t MR_UnionFind_MR_UndirectedEdgeId_sizeOfComp ( MR_UnionFind_MR_UndirectedEdgeId * _this,
MR_UndirectedEdgeId a )

returns the number of elements in the set containing given element Generated from a method of class MR::UnionFind<MR::UndirectedEdgeId> named sizeOfComp. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_UndirectedEdgeId_unite()

unite two elements,

Returns
first: new common root, second: true = union was done, false = first and second were already united Generated from a method of class MR::UnionFind<MR::UndirectedEdgeId> named unite. Parameter _this can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_pair_MR_UndirectedEdgeId_bool_Destroy() to free it when you're done using it.

◆ MR_UnionFind_MR_UndirectedEdgeId_united()

MRC_API bool MR_UnionFind_MR_UndirectedEdgeId_united ( MR_UnionFind_MR_UndirectedEdgeId * _this,
MR_UndirectedEdgeId first,
MR_UndirectedEdgeId second )

returns true if given two elements are from one set Generated from a method of class MR::UnionFind<MR::UndirectedEdgeId> named united. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_VertId_AssignFromAnother()

MRC_API MR_UnionFind_MR_VertId * MR_UnionFind_MR_VertId_AssignFromAnother ( MR_UnionFind_MR_VertId * _this,
MR_PassBy _other_pass_by,
MR_UnionFind_MR_VertId * _other )

Generated from a method of class MR::UnionFind<MR::VertId> named operator=. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UnionFind_MR_VertId_Construct()

MRC_API MR_UnionFind_MR_VertId * MR_UnionFind_MR_VertId_Construct ( MR_uint64_t size)

creates union-find with given number of elements, each element is the only one in its disjoint set Generated from a constructor of class MR::UnionFind<MR::VertId>. Never returns null. Returns an instance allocated on the heap! Must call MR_UnionFind_MR_VertId_Destroy() to free it when you're done using it.

◆ MR_UnionFind_MR_VertId_ConstructFromAnother()

MRC_API MR_UnionFind_MR_VertId * MR_UnionFind_MR_VertId_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_UnionFind_MR_VertId * _other )

Generated from a constructor of class MR::UnionFind<MR::VertId>. Never returns null. Returns an instance allocated on the heap! Must call MR_UnionFind_MR_VertId_Destroy() to free it when you're done using it.

◆ MR_UnionFind_MR_VertId_DefaultConstruct()

MRC_API MR_UnionFind_MR_VertId * MR_UnionFind_MR_VertId_DefaultConstruct ( void )

Constructs an empty (default-constructed) instance. Never returns null. Returns an instance allocated on the heap! Must call MR_UnionFind_MR_VertId_Destroy() to free it when you're done using it.

◆ MR_UnionFind_MR_VertId_DefaultConstructArray()

MRC_API MR_UnionFind_MR_VertId * MR_UnionFind_MR_VertId_DefaultConstructArray ( size_t num_elems)

Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_UnionFind_MR_VertId_DestroyArray(). Use MR_UnionFind_MR_VertId_OffsetMutablePtr() and MR_UnionFind_MR_VertId_OffsetPtr() to access the array elements.

◆ MR_UnionFind_MR_VertId_Destroy()

MRC_API void MR_UnionFind_MR_VertId_Destroy ( const MR_UnionFind_MR_VertId * _this)

Destroys a heap-allocated instance of MR_UnionFind_MR_VertId. Does nothing if the pointer is null.

◆ MR_UnionFind_MR_VertId_DestroyArray()

MRC_API void MR_UnionFind_MR_VertId_DestroyArray ( const MR_UnionFind_MR_VertId * _this)

Destroys a heap-allocated array of MR_UnionFind_MR_VertId. Does nothing if the pointer is null.

◆ MR_UnionFind_MR_VertId_find()

MRC_API MR_VertId MR_UnionFind_MR_VertId_find ( MR_UnionFind_MR_VertId * _this,
MR_VertId a )

finds the root of the set containing given element with optimizing data structure updates Generated from a method of class MR::UnionFind<MR::VertId> named find. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_VertId_findUpdateRange()

MRC_API MR_VertId MR_UnionFind_MR_VertId_findUpdateRange ( MR_UnionFind_MR_VertId * _this,
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 a method of class MR::UnionFind<MR::VertId> named findUpdateRange. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_VertId_isRoot()

MRC_API bool MR_UnionFind_MR_VertId_isRoot ( const MR_UnionFind_MR_VertId * _this,
MR_VertId a )

returns true if given element is the root of some set Generated from a method of class MR::UnionFind<MR::VertId> named isRoot. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_VertId_OffsetMutablePtr()

MRC_API MR_UnionFind_MR_VertId * MR_UnionFind_MR_VertId_OffsetMutablePtr ( MR_UnionFind_MR_VertId * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_UnionFind_MR_VertId_OffsetPtr()

MRC_API const MR_UnionFind_MR_VertId * MR_UnionFind_MR_VertId_OffsetPtr ( const MR_UnionFind_MR_VertId * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_UnionFind_MR_VertId_parent()

MRC_API MR_VertId MR_UnionFind_MR_VertId_parent ( const MR_UnionFind_MR_VertId * _this,
MR_VertId a )

return parent element of this element, which is equal to given element only for set's root Generated from a method of class MR::UnionFind<MR::VertId> named parent. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_VertId_parents()

MRC_API const MR_VertMap * MR_UnionFind_MR_VertId_parents ( const MR_UnionFind_MR_VertId * _this)

gets the parents of all elements as is Generated from a method of class MR::UnionFind<MR::VertId> named parents. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UnionFind_MR_VertId_reset()

MRC_API void MR_UnionFind_MR_VertId_reset ( MR_UnionFind_MR_VertId * _this,
MR_uint64_t size )

resets union-find to represent given number of elements, each element is the only one in its disjoint set Generated from a method of class MR::UnionFind<MR::VertId> named reset. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_VertId_roots()

MRC_API const MR_VertMap * MR_UnionFind_MR_VertId_roots ( MR_UnionFind_MR_VertId * _this)

sets the root of corresponding set as the parent of each element, then returns the vector Generated from a method of class MR::UnionFind<MR::VertId> named roots. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_UnionFind_MR_VertId_size()

MRC_API MR_uint64_t MR_UnionFind_MR_VertId_size ( const MR_UnionFind_MR_VertId * _this)

returns the number of elements in union-find Generated from a method of class MR::UnionFind<MR::VertId> named size. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_VertId_sizeOfComp()

MRC_API int32_t MR_UnionFind_MR_VertId_sizeOfComp ( MR_UnionFind_MR_VertId * _this,
MR_VertId a )

returns the number of elements in the set containing given element Generated from a method of class MR::UnionFind<MR::VertId> named sizeOfComp. Parameter _this can not be null. It is a single object.

◆ MR_UnionFind_MR_VertId_unite()

MRC_API MR_std_pair_MR_VertId_bool * MR_UnionFind_MR_VertId_unite ( MR_UnionFind_MR_VertId * _this,
MR_VertId first,
MR_VertId second )

unite two elements,

Returns
first: new common root, second: true = union was done, false = first and second were already united Generated from a method of class MR::UnionFind<MR::VertId> named unite. Parameter _this can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_pair_MR_VertId_bool_Destroy() to free it when you're done using it.

◆ MR_UnionFind_MR_VertId_united()

MRC_API bool MR_UnionFind_MR_VertId_united ( MR_UnionFind_MR_VertId * _this,
MR_VertId first,
MR_VertId second )

returns true if given two elements are from one set Generated from a method of class MR::UnionFind<MR::VertId> named united. Parameter _this can not be null. It is a single object.