00001 #include "converse.h" 00002 00003 typedef struct {int node1, node2;} Edge; 00004 00005 typedef struct {int next; 00006 Edge * edges;} EdgeListType; 00007 00008 typedef struct { 00009 int degree; 00010 int next; /* temporary count needed to tell where to insert the next entry */ 00011 int adjListInd; /* where in the big array does its adj list begin */ 00012 /* int available;*/ /* number of connections still available. 12/2/97 */ 00013 } Vertex; 00014 00015 typedef struct { 00016 int numVertices; 00017 Vertex * vertexArray; /* ptr to an array of records, one for each vertex */ 00018 int * adjArray; /* ptr to an array in which adjacency sub-arrays for each 00019 vertex are stored contiguosly */ 00020 } VerticesListType; 00021 00022 #define connections(graph, i) (graph->vertexArray[i].degree) 00023 00024 /* -----*/ 00025 typedef struct { 00026 int size, head, tail; 00027 int numElements; 00028 int * buf; } 00029 Q; 00030