MeshLib C Docs
Loading...
Searching...
No Matches
MRUnionFind.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRId.h>
4#include <MRCMisc/common.h>
5#include <MRCMisc/exports.h>
6
7#include <stdbool.h>
8#include <stddef.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14typedef struct MR_FaceMap MR_FaceMap; // Defined in `#include <MRCMesh/MRVector.h>`.
15typedef struct MR_UndirectedEdgeMap MR_UndirectedEdgeMap; // Defined in `#include <MRCMesh/MRVector.h>`.
16typedef struct MR_VertMap MR_VertMap; // Defined in `#include <MRCMesh/MRVector.h>`.
17typedef struct MR_std_pair_MR_FaceId_bool MR_std_pair_MR_FaceId_bool; // Defined in `#include <MRCMisc/std_pair_MR_FaceId_bool.h>`.
18typedef struct MR_std_pair_MR_UndirectedEdgeId_bool MR_std_pair_MR_UndirectedEdgeId_bool; // Defined in `#include <MRCMisc/std_pair_MR_UndirectedEdgeId_bool.h>`.
19typedef struct MR_std_pair_MR_VertId_bool MR_std_pair_MR_VertId_bool; // Defined in `#include <MRCMisc/std_pair_MR_VertId_bool.h>`.
20
21
33
45
57
61
66
69
72
76
81
84
87
92
97
102
109
114
119
124
129
134
140
146
151
155
160
163
166
170
175
178
181
186
191
196
203
208
213
218
223
228
234
240
245
249
254
257
260
264
269
272
275
280
285
290
297
302
307
312
317
322
328
334
339
340#ifdef __cplusplus
341} // extern "C"
342#endif
struct MR_VertMap MR_VertMap
Definition MRBitSet.h:40
struct MR_UndirectedEdgeMap MR_UndirectedEdgeMap
Definition MRBitSet.h:30
struct MR_FaceMap MR_FaceMap
Definition MRBitSet.h:26
struct MR_UnionFind_MR_FaceId MR_UnionFind_MR_FaceId
Definition MRMeshComponents.h:21
struct MR_UnionFind_MR_VertId MR_UnionFind_MR_VertId
Definition MRMeshComponents.h:23
struct MR_UnionFind_MR_UndirectedEdgeId MR_UnionFind_MR_UndirectedEdgeId
Definition MRMeshComponents.h:22
struct MR_std_pair_MR_FaceId_bool MR_std_pair_MR_FaceId_bool
Definition MRUnionFind.h:17
MRC_API bool MR_UnionFind_MR_UndirectedEdgeId_isRoot(const MR_UnionFind_MR_UndirectedEdgeId *_this, MR_UndirectedEdgeId a)
MRC_API MR_UnionFind_MR_VertId * MR_UnionFind_MR_VertId_ConstructFromAnother(MR_PassBy _other_pass_by, MR_UnionFind_MR_VertId *_other)
MRC_API const MR_UndirectedEdgeMap * MR_UnionFind_MR_UndirectedEdgeId_parents(const MR_UnionFind_MR_UndirectedEdgeId *_this)
MRC_API MR_UnionFind_MR_UndirectedEdgeId * MR_UnionFind_MR_UndirectedEdgeId_Construct(MR_uint64_t size)
MRC_API MR_VertId MR_UnionFind_MR_VertId_find(MR_UnionFind_MR_VertId *_this, MR_VertId a)
MRC_API MR_std_pair_MR_VertId_bool * MR_UnionFind_MR_VertId_unite(MR_UnionFind_MR_VertId *_this, MR_VertId first, MR_VertId second)
MRC_API MR_UndirectedEdgeId MR_UnionFind_MR_UndirectedEdgeId_parent(const MR_UnionFind_MR_UndirectedEdgeId *_this, MR_UndirectedEdgeId a)
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_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 MR_UndirectedEdgeId MR_UnionFind_MR_UndirectedEdgeId_find(MR_UnionFind_MR_UndirectedEdgeId *_this, MR_UndirectedEdgeId a)
MRC_API void MR_UnionFind_MR_FaceId_reset(MR_UnionFind_MR_FaceId *_this, MR_uint64_t size)
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 MR_UnionFind_MR_UndirectedEdgeId * MR_UnionFind_MR_UndirectedEdgeId_AssignFromAnother(MR_UnionFind_MR_UndirectedEdgeId *_this, MR_PassBy _other_pass_by, MR_UnionFind_MR_UndirectedEdgeId *_other)
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)
MRC_API void MR_UnionFind_MR_VertId_reset(MR_UnionFind_MR_VertId *_this, MR_uint64_t size)
MRC_API MR_std_pair_MR_FaceId_bool * MR_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)
struct MR_std_pair_MR_UndirectedEdgeId_bool MR_std_pair_MR_UndirectedEdgeId_bool
Definition MRUnionFind.h:18
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 n...
MRC_API MR_UnionFind_MR_UndirectedEdgeId * MR_UnionFind_MR_UndirectedEdgeId_DefaultConstruct(void)
MRC_API bool MR_UnionFind_MR_UndirectedEdgeId_united(MR_UnionFind_MR_UndirectedEdgeId *_this, MR_UndirectedEdgeId first, MR_UndirectedEdgeId second)
MRC_API MR_UnionFind_MR_FaceId * MR_UnionFind_MR_FaceId_DefaultConstruct(void)
MRC_API MR_std_pair_MR_UndirectedEdgeId_bool * MR_UnionFind_MR_UndirectedEdgeId_unite(MR_UnionFind_MR_UndirectedEdgeId *_this, MR_UndirectedEdgeId first, MR_UndirectedEdgeId second)
MRC_API MR_UnionFind_MR_FaceId * MR_UnionFind_MR_FaceId_DefaultConstructArray(size_t num_elems)
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...
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...
MRC_API int MR_UnionFind_MR_VertId_sizeOfComp(MR_UnionFind_MR_VertId *_this, MR_VertId a)
MRC_API bool MR_UnionFind_MR_FaceId_isRoot(const MR_UnionFind_MR_FaceId *_this, MR_FaceId a)
MRC_API void MR_UnionFind_MR_UndirectedEdgeId_reset(MR_UnionFind_MR_UndirectedEdgeId *_this, MR_uint64_t size)
MRC_API MR_UnionFind_MR_FaceId * MR_UnionFind_MR_FaceId_Construct(MR_uint64_t size)
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)
MRC_API MR_UnionFind_MR_UndirectedEdgeId * MR_UnionFind_MR_UndirectedEdgeId_DefaultConstructArray(size_t num_elems)
MRC_API int MR_UnionFind_MR_FaceId_sizeOfComp(MR_UnionFind_MR_FaceId *_this, MR_FaceId a)
MRC_API MR_UnionFind_MR_VertId * MR_UnionFind_MR_VertId_Construct(MR_uint64_t size)
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_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...
MRC_API MR_uint64_t MR_UnionFind_MR_VertId_size(const MR_UnionFind_MR_VertId *_this)
MRC_API int MR_UnionFind_MR_UndirectedEdgeId_sizeOfComp(MR_UnionFind_MR_UndirectedEdgeId *_this, MR_UndirectedEdgeId 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_findUpdateRange(MR_UnionFind_MR_VertId *_this, MR_VertId a, MR_VertId begin, MR_VertId end)
MRC_API const MR_VertMap * MR_UnionFind_MR_VertId_roots(MR_UnionFind_MR_VertId *_this)
struct MR_std_pair_MR_VertId_bool MR_std_pair_MR_VertId_bool
Definition MRUnionFind.h:19
MRC_API MR_FaceId MR_UnionFind_MR_FaceId_parent(const MR_UnionFind_MR_FaceId *_this, MR_FaceId a)
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 i...
MRC_API MR_UnionFind_MR_UndirectedEdgeId * MR_UnionFind_MR_UndirectedEdgeId_ConstructFromAnother(MR_PassBy _other_pass_by, MR_UnionFind_MR_UndirectedEdgeId *_other)
MRC_API MR_UnionFind_MR_VertId * MR_UnionFind_MR_VertId_DefaultConstruct(void)
MRC_API MR_UnionFind_MR_VertId * MR_UnionFind_MR_VertId_DefaultConstructArray(size_t num_elems)
MRC_API MR_uint64_t MR_UnionFind_MR_FaceId_size(const MR_UnionFind_MR_FaceId *_this)
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...
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_uint64_t MR_UnionFind_MR_UndirectedEdgeId_size(const MR_UnionFind_MR_UndirectedEdgeId *_this)
MRC_API const MR_FaceMap * MR_UnionFind_MR_FaceId_roots(MR_UnionFind_MR_FaceId *_this)
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 MR_FaceId MR_UnionFind_MR_FaceId_find(MR_UnionFind_MR_FaceId *_this, MR_FaceId a)
MRC_API const MR_FaceMap * MR_UnionFind_MR_FaceId_parents(const MR_UnionFind_MR_FaceId *_this)
MRC_API MR_UnionFind_MR_FaceId * MR_UnionFind_MR_FaceId_ConstructFromAnother(MR_PassBy _other_pass_by, MR_UnionFind_MR_FaceId *_other)
MRC_API const MR_VertMap * MR_UnionFind_MR_VertId_parents(const MR_UnionFind_MR_VertId *_this)
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...
MRC_API bool MR_UnionFind_MR_VertId_isRoot(const MR_UnionFind_MR_VertId *_this, MR_VertId a)
MRC_API bool MR_UnionFind_MR_VertId_united(MR_UnionFind_MR_VertId *_this, MR_VertId first, MR_VertId second)
MRC_API const MR_UndirectedEdgeMap * MR_UnionFind_MR_UndirectedEdgeId_roots(MR_UnionFind_MR_UndirectedEdgeId *_this)
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...
MR_PassBy
Definition common.h:23
uint64_t MR_uint64_t
Definition common.h:18
#define MRC_API
Definition exports.h:11
size_t size() const
Definition MRId.h:45
Definition MRId.h:35
Definition MRId.h:55