From a23cb6d6f011950b11789898c10e63f4473a5200 Mon Sep 17 00:00:00 2001 From: Mikkel Thestrup Date: Sun, 30 Nov 2025 14:24:52 +0100 Subject: Updated every file and function to follow style guide --- src/graph.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/graph.c (limited to 'src/graph.c') diff --git a/src/graph.c b/src/graph.c new file mode 100644 index 0000000..4be2b44 --- /dev/null +++ b/src/graph.c @@ -0,0 +1,16 @@ +#include "graph.h" +#include + +Graph *graph_new(int n) { + Graph *graph = malloc(sizeof(Graph)); + if (!graph) return NULL; + + graph->numEdges = n; + graph->numVertices = 0; + graph->vertices = malloc(sizeof(Vertex[n])); + + return graph; +} + +void graph_add_edge(Graph *g, int i, int j) { +} -- cgit v1.2.3-70-g09d2