This commit is contained in:
2026-09-07 18:48:16 +08:00
parent 1564716731
commit c945aa211f
138 changed files with 10337 additions and 150 deletions
+7 -5
View File
@@ -10,6 +10,8 @@
/* ------------------------------------------------------------------------------------------------------------------ */
/* */
typedef c_uint_t c_VertexId_t;
typedef struct {
c_size_t V;
c_size_t E;
@@ -24,15 +26,15 @@ c_err_t c_Graph_Init(c_Graph_t* self, c_size_t V, c_Allocator_t* allocator);
void c_Graph_Destroy(c_Graph_t* self);
c_err_t c_Graph_AddEdge(c_Graph_t* self, c_size_t v, c_size_t w);
c_err_t c_Graph_AddEdge(c_Graph_t* self, c_VertexId_t v, c_VertexId_t w);
c_err_t c_Graph_RemoveEdge(c_Graph_t* self, c_size_t v, c_size_t w);
c_err_t c_Graph_RemoveEdge(c_Graph_t* self, c_VertexId_t v, c_VertexId_t w);
c_bool_t c_Graph_HasEdge(const c_Graph_t* self, c_size_t v, c_size_t w);
c_bool_t c_Graph_HasEdge(const c_Graph_t* self, c_VertexId_t v, c_VertexId_t w);
c_size_t c_Graph_Degree(c_Graph_t* self, c_size_t v);
c_size_t c_Graph_Degree(c_Graph_t* self, c_VertexId_t v);
c_AdjList_t* c_Graph_GetAdjList(c_Graph_t* self, c_size_t v);
c_AdjList_t* c_Graph_GetAdjList(c_Graph_t* self, c_VertexId_t v);
/**
* @brief Creates a complete deep copy of a source graph.