-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcycle.h
125 lines (100 loc) · 3.13 KB
/
cycle.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/*
$Id: cycle.h,v 1.7 1999/07/15 01:30:19 dbader Exp $
$Log: cycle.h,v $
Revision 1.7 1999/07/15 01:30:19 dbader
Added MALLOC_DEBUG support.
Revision 1.6 1999/07/05 01:44:06 dbader
Split Express Graph LUT into entr and exit vertices, and
removed entrLUT.
Revision 1.5 1999/06/01 13:15:12 dbader
Added new field to pExpGraph
Revision 1.4 1999/05/29 15:52:28 dbader
Added new auxiliary fields for the packed express graph.
Revision 1.3 1999/05/27 19:22:55 dbader
Daily Update 990526
Revision 1.2 1999/05/27 19:20:54 dbader
Daily Update 990525
Revision 1.1 1999/05/27 19:09:08 dbader
Initial revision
*/
#ifndef CYCLE_H
#define CYCLE_H
#ifdef DEBUG_MALLOC
#include "rmalloc.h"
#endif
#define BLACK 0
#define WHITE 1
#define GREEN 2
#define RED 3
typedef struct arc_s {
int head; /* vertex at head of arc */
int assn; /* node assignment of the head vertex */
} *arc_t;
typedef struct vertex_s {
int label; /* My vertex label */
int arcs; /* Number of adjacent vertices */
arc_t alist; /* Array of arcs */
} *vertex_t;
typedef struct reachlist_s {
int idx;
struct reachlist_s *next;
} *reachlist_t;
typedef struct vertexList_s {
int num; /* Number of vertices */
vertex_t vlist; /* Array of vertices */
unsigned char *color; /* Color of each vertex */
reachlist_t R; /* list of outgoing transarc tail vertices */
} *vertexList_t;
typedef struct expVertex_s {
transArc_t *transArc;
int expArcsNum;
struct expArc_s *expArcs;
struct expVertex_s *next;
} *expVertex_t;
typedef struct expArc_s {
expVertex_t headVertex;
struct expArc_s *next;
} *expArc_t;
typedef struct labelLookup_s {
int label;
expVertex_t expVertex;
} *labelLookup_t;
#define ENTR_LUT 0
typedef struct eGraph_s {
int entrNum; /* Number of entrance vertices */
int exitNum; /* Number of exit vertices */
expVertex_t entrV; /* Entrance vertices */
expVertex_t exitV; /* Exit vertices */
#if ENTR_LUT
labelLookup_t entrLUT; /* Table from vertex label -> express vertex */
int entrLUTNum; /* Number of filled LUT entries */
#endif
labelLookup_t exitLUT; /* Table from vertex label -> express vertex */
int exitLUTNum; /* Number of filled LUT entries */
} *eGraph_t;
/***************************************************************/
typedef struct pArc_s {
int idx;
int head;
struct pArc_s *next;
} *pArc_t;
typedef struct pArcFlat_s {
int idx;
int head;
} *pArcFlat_t;
typedef struct pExpGraph_s {
int entrNum; /* Number of entrance vertices */
int exitNum; /* Number of exit vertices */
int arcNum; /* Number of express arcs */
int *data; /* Data of packed express graph */
/********************************************************/
struct pArc_s *newArcs; /* Additional express arcs to merge in */
int deadEntr;
int deadExit;
int deadArc;
int newArc;
BOOL *deadEntrMask;
BOOL *deadExitMask;
} *pExpGraph_t;
/***************************************************************/
#endif