graph.h |
| #ifndef GRAPH_H #define GRAPH_H #include <stdio.h> #include "queue.h" typedef struct graphrec *graph; typedef struct linkrec *list; typedef enum color_c { WHITE, GREY, BLACK } color_t; typedef enum dir_c { ONE, BI,} dir_t; extern graph graph_new(int size); extern void graph_add_edge(graph g, int u, int v, dir_t dir); extern void graph_print(graph g); extern void graph_breadth_first(graph g, int s); extern void graph_depth_first(graph g); extern void graph_strongly(graph g); extern void graph_shortest_path(graph g, int u, int v); #endif |
James Little |