MeshLib C Docs
Loading...
Searching...
No Matches
MRGraph.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_GraphEdgeBitSet MR_GraphEdgeBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
15typedef struct MR_GraphVertBitSet MR_GraphVertBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
16typedef struct MR_Vector_MR_Graph_EndVertices_MR_GraphEdgeId MR_Vector_MR_Graph_EndVertices_MR_GraphEdgeId; // Defined in `#include <MRCMesh/MRVector.h>`.
18typedef struct MR_std_function_void_from_MR_GraphEdgeId_MR_GraphEdgeId MR_std_function_void_from_MR_GraphEdgeId_MR_GraphEdgeId; // Defined in `#include <MRCMisc/std_function_void_from_MR_GraphEdgeId_MR_GraphEdgeId.h>`.
19typedef struct MR_std_vector_MR_GraphEdgeId MR_std_vector_MR_GraphEdgeId; // Defined in `#include <MRCMisc/std_vector_MR_GraphEdgeId.h>`.
20
21
24typedef struct MR_Graph MR_Graph;
25
28
32
37
39MRC_API const MR_Graph *MR_Graph_OffsetPtr(const MR_Graph *ptr, ptrdiff_t i);
40
43
47
50
53
58
62MRC_API void MR_Graph_construct(MR_Graph *_this, MR_PassBy neighboursPerVertex_pass_by, MR_Vector_std_vector_MR_GraphEdgeId_MR_GraphVertId *neighboursPerVertex, MR_PassBy endsPerEdge_pass_by, MR_Vector_MR_Graph_EndVertices_MR_GraphEdgeId *endsPerEdge);
63
68
74
79
84
90
95
101
107
112
117
123
128
129// v0 < v1
134
135// v0 < v1
139
140// v0 < v1
145
146// v0 < v1
151
152// v0 < v1
156
157// v0 < v1
162
166
171
175
178
181
186
189
192
198
202
206
207#ifdef __cplusplus
208} // extern "C"
209#endif
struct MR_GraphEdgeBitSet MR_GraphEdgeBitSet
Definition MRBitSet.h:151
struct MR_GraphVertBitSet MR_GraphVertBitSet
Definition MRBitSet.h:143
struct MR_std_function_void_from_MR_GraphEdgeId_MR_GraphEdgeId MR_std_function_void_from_MR_GraphEdgeId_MR_GraphEdgeId
Definition MRGraph.h:18
MRC_API MR_Graph * MR_Graph_DefaultConstruct(void)
MRC_API MR_GraphVertId * MR_Graph_EndVertices_GetMutable_v0(MR_Graph_EndVertices *_this)
MRC_API const MR_GraphEdgeBitSet * MR_Graph_validEdges(const MR_Graph *_this)
MRC_API MR_Graph_EndVertices * MR_Graph_EndVertices_DefaultConstruct(void)
MRC_API bool MR_Graph_areNeighbors(const MR_Graph *_this, MR_GraphVertId a, MR_GraphVertId b)
MRC_API void MR_Graph_EndVertices_replaceEnd(MR_Graph_EndVertices *_this, MR_GraphVertId what, MR_GraphVertId with)
MRC_API MR_Graph * MR_Graph_ConstructFromAnother(MR_PassBy _other_pass_by, MR_Graph *_other)
struct MR_Vector_std_vector_MR_GraphEdgeId_MR_GraphVertId MR_Vector_std_vector_MR_GraphEdgeId_MR_GraphVertId
Definition MRGraph.h:17
MRC_API const MR_std_vector_MR_GraphEdgeId * MR_Graph_neighbours(const MR_Graph *_this, MR_GraphVertId v)
MRC_API void MR_Graph_EndVertices_Destroy(const MR_Graph_EndVertices *_this)
Destroys a heap-allocated instance of MR_Graph_EndVertices. Does nothing if the pointer is null.
MRC_API void MR_Graph_EndVertices_Set_v0(MR_Graph_EndVertices *_this, MR_GraphVertId value)
MRC_API MR_Graph * MR_Graph_OffsetMutablePtr(MR_Graph *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
struct MR_Graph MR_Graph
Definition MRGraph.h:24
MRC_API const MR_GraphVertId * MR_Graph_EndVertices_Get_v1(const MR_Graph_EndVertices *_this)
struct MR_std_vector_MR_GraphEdgeId MR_std_vector_MR_GraphEdgeId
Definition MRGraph.h:19
MRC_API void MR_Graph_EndVertices_DestroyArray(const MR_Graph_EndVertices *_this)
Destroys a heap-allocated array of MR_Graph_EndVertices. Does nothing if the pointer is null.
MRC_API const MR_GraphVertId * MR_Graph_EndVertices_Get_v0(const MR_Graph_EndVertices *_this)
MRC_API MR_Graph_EndVertices * MR_Graph_EndVertices_OffsetMutablePtr(MR_Graph_EndVertices *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_Graph_EndVertices_Set_v1(MR_Graph_EndVertices *_this, MR_GraphVertId value)
MRC_API void MR_Graph_Destroy(const MR_Graph *_this)
Destroys a heap-allocated instance of MR_Graph. Does nothing if the pointer is null.
MRC_API bool MR_Graph_valid_MR_GraphEdgeId(const MR_Graph *_this, MR_GraphEdgeId e)
struct MR_Graph_EndVertices MR_Graph_EndVertices
Generated from class MR::Graph::EndVertices.
Definition MRGraph.h:27
MRC_API const MR_Graph * MR_Graph_OffsetPtr(const MR_Graph *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 const MR_Graph_EndVertices * MR_Graph_EndVertices_OffsetPtr(const MR_Graph_EndVertices *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_GraphVertId * MR_Graph_EndVertices_GetMutable_v1(MR_Graph_EndVertices *_this)
MRC_API MR_Graph_EndVertices * MR_Graph_EndVertices_DefaultConstructArray(size_t num_elems)
struct MR_Vector_MR_Graph_EndVertices_MR_GraphEdgeId MR_Vector_MR_Graph_EndVertices_MR_GraphEdgeId
Definition MRGraph.h:16
MRC_API MR_Graph_EndVertices * MR_Graph_EndVertices_ConstructFromAnother(const MR_Graph_EndVertices *_other)
MRC_API MR_GraphVertId MR_Graph_EndVertices_otherEnd(const MR_Graph_EndVertices *_this, MR_GraphVertId a)
MRC_API MR_Graph * MR_Graph_DefaultConstructArray(size_t num_elems)
MRC_API MR_uint64_t MR_Graph_edgeSize(const MR_Graph *_this)
MRC_API void MR_Graph_merge(MR_Graph *_this, MR_GraphVertId remnant, MR_GraphVertId dead, MR_PassBy onMergeEdges_pass_by, MR_std_function_void_from_MR_GraphEdgeId_MR_GraphEdgeId *onMergeEdges)
MRC_API bool MR_Graph_checkValidity(const MR_Graph *_this)
MRC_API MR_Graph * MR_Graph_AssignFromAnother(MR_Graph *_this, MR_PassBy _other_pass_by, MR_Graph *_other)
MRC_API const MR_GraphVertBitSet * MR_Graph_validVerts(const MR_Graph *_this)
MRC_API const MR_Graph_EndVertices * MR_Graph_ends(const MR_Graph *_this, MR_GraphEdgeId e)
MRC_API MR_GraphEdgeId MR_Graph_findEdge(const MR_Graph *_this, MR_GraphVertId a, MR_GraphVertId b)
MRC_API MR_Graph_EndVertices * MR_Graph_EndVertices_AssignFromAnother(MR_Graph_EndVertices *_this, const MR_Graph_EndVertices *_other)
MRC_API MR_uint64_t MR_Graph_vertSize(const MR_Graph *_this)
MRC_API void MR_Graph_DestroyArray(const MR_Graph *_this)
Destroys a heap-allocated array of MR_Graph. Does nothing if the pointer is null.
MRC_API bool MR_Graph_valid_MR_GraphVertId(const MR_Graph *_this, MR_GraphVertId v)
MRC_API MR_Graph_EndVertices * MR_Graph_EndVertices_ConstructFrom(MR_GraphVertId v0, MR_GraphVertId v1)
MRC_API void MR_Graph_construct(MR_Graph *_this, MR_PassBy neighboursPerVertex_pass_by, MR_Vector_std_vector_MR_GraphEdgeId_MR_GraphVertId *neighboursPerVertex, MR_PassBy endsPerEdge_pass_by, MR_Vector_MR_Graph_EndVertices_MR_GraphEdgeId *endsPerEdge)
MR_PassBy
Definition common.h:19
uint64_t MR_uint64_t
Definition common.h:14
#define MRC_API
Definition exports.h:11
Definition MRId.h:127
Definition MRId.h:117