From 6db1a2cdd3b96731f2e092d55d8c2136eabc52d0 Mon Sep 17 00:00:00 2001 From: Julian T Date: Tue, 11 Feb 2020 12:24:56 +0100 Subject: Rename and cleanup --- sem1/algo/workshop2/dfs/graph.h | 45 ----------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 sem1/algo/workshop2/dfs/graph.h (limited to 'sem1/algo/workshop2/dfs/graph.h') diff --git a/sem1/algo/workshop2/dfs/graph.h b/sem1/algo/workshop2/dfs/graph.h deleted file mode 100644 index e169a8a..0000000 --- a/sem1/algo/workshop2/dfs/graph.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef GRAPH_H_ -#define GRAPH_H_ - -#define COLOR_WHITE 0 -#define COLOR_GRAY 1 -#define COLOR_BLACK 2 - -#define HASHSIZE 128 - -struct vertex_struct; - -// Linked list -typedef struct edge_struct { - int weight; - struct vertex_struct *from; - struct vertex_struct *to; - // Linked list stuff - struct edge_struct *next; - struct edge_struct *prev; -} edge_t; - -typedef struct vertex_struct { - char *ref; - int color; - - int dtime; - int ftime; - - edge_t *adj; - - // Hash table stuff - struct vertex_struct *next; -} vertex_t; - -typedef struct { - vertex_t *hashtable[128]; -} graph_t; - -int graph_to_dot(FILE *f, graph_t *g); -int graph_print_adj(graph_t *g, char *ref); -void graph_edge(graph_t *g, char *from, char *to, int weight); -edge_t *edge_next(graph_t *g, edge_t *e); -vertex_t *vertex_next(graph_t *g, vertex_t *v); - -#endif // GRAPH_H_ -- cgit v1.2.3