Push the WIP graphs handling code
[Algorithmic_C.git] / TP7 / exo1 / main.c
CommitLineData
fa5222dc
JB
1#include <stdio.h>
2
3#include "graphs.h"
4
5int main() {
6 int adj_matrix[num_nodes][num_nodes] = {
7 {0, 0, 0, 1, 0},
8 {0, 0, 1, 0, 0},
9 {0, 0, 0, 0, 0},
10 {0, 1, 0, 0, 1},
11 {1, 1, 1, 0, 0}
12 };
13 succ_list_t* nodes[num_nodes] = { NULL };
14 for (unsigned int i = 0; i < num_nodes; i++) {
15 LIST_HEAD(nodes);
16 }
17
18 display_adj_matrix(adj_matrix);
19
20 convert_adj_matrix_to_adj_lists(adj_matrix, nodes);
21
22 display_adj_lists(nodes);
23
24 return 0;
25}