/****************************  types.h  **********************************

   Purpose:	Define globally-useful data types.

   Provenance:	Written and tested by Q. Chen and E. Fox, March 1991.
   		Edited and tested by S. Wartik, April 1991.

   Notes:	None.
**/

#include "const.h"

typedef struct arc {         /* arc data structure    		  */
   int 	h0,                  /* h0 value              		  */
        h12[2];              /* h1 and h2 values      		  */
   struct arc *next_edge[2]; /* pointer to arc sharing same h1 or */
}  arcType;                  /* h2 values                         */

typedef struct {             /* vertex data structure	   	    */
   struct arc *first_edge;   /* pointer to the first adjacent edge  */
   int	g,                   /* g value.                            */
        prec,                /* backward pointer of the vertex-list */
        succ;                /* forward pointer of the vertex-list  */
}  vertexType; 

typedef struct {             /* arcs data structure          */
   int no_arcs;              /* number of arcs in the graph  */
   arcType* arcArray;        /* arc array                    */
} arcsType;

typedef struct {             /* vertices data structure         */
   int no_vertices,          /* number of vertices in the graph */
       maxDegree,            /* max degree of the graph         */
       vsHead,               /* VS list head                    */
       vsTail,               /* VS list tail                    */
       rlistHead;            /* remaining vertex list head      */
   vertexType* vertexArray;  /* vertex array                    */
} verticesType;

typedef struct {             /* integer set data structure        */
   int count,                /* number of elements in the set     */
       *intSetRep;           /* set representation                */
} intSetType;
