aboutsummaryrefslogtreecommitdiff
path: root/sem3/algo/workshop2/dfs/graph.h
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2020-10-12 16:26:42 +0200
committerJulian T <julian@jtle.dk>2020-10-12 16:54:48 +0200
commit4e05a55e373bd315e721d534a1711fec4c0054c5 (patch)
tree4fc0141760c2730ed79aaa4c7aa60ea45cc66cc0 /sem3/algo/workshop2/dfs/graph.h
parentb7f9cf43c8a9ab3400cbb30d5e1cadb0c6c2cf23 (diff)
Moved to linux kernel inspired clang-format
Diffstat (limited to 'sem3/algo/workshop2/dfs/graph.h')
-rw-r--r--sem3/algo/workshop2/dfs/graph.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/sem3/algo/workshop2/dfs/graph.h b/sem3/algo/workshop2/dfs/graph.h
index e169a8a..ad61b1e 100644
--- a/sem3/algo/workshop2/dfs/graph.h
+++ b/sem3/algo/workshop2/dfs/graph.h
@@ -2,7 +2,7 @@
#define GRAPH_H_
#define COLOR_WHITE 0
-#define COLOR_GRAY 1
+#define COLOR_GRAY 1
#define COLOR_BLACK 2
#define HASHSIZE 128
@@ -11,29 +11,29 @@ 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;
+ 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;
+ char *ref;
+ int color;
- int dtime;
- int ftime;
+ int dtime;
+ int ftime;
- edge_t *adj;
+ edge_t *adj;
- // Hash table stuff
- struct vertex_struct *next;
+ // Hash table stuff
+ struct vertex_struct *next;
} vertex_t;
typedef struct {
- vertex_t *hashtable[128];
+ vertex_t *hashtable[128];
} graph_t;
int graph_to_dot(FILE *f, graph_t *g);