#ifndef GRAPH_H #define GRAPH_H /* adjacency list implementation */ struct vertex; struct edge; struct graph; struct edge { struct vertex *to; struct edge *next; }; struct vertex { struct edge *adj; }; struct graph { struct vertex *v; unsigned int nv; }; struct graph * new_graph (unsigned int nv); int new_edge (struct graph *g, unsigned int vi, unsigned int vj); #endif /* GRAPH_H */