111 |
} |
} |
112 |
|
|
113 |
|
|
114 |
|
/* Given a vector BSETV of N bitsets of size N, modify its contents to |
115 |
|
be the transitive closure of what was given. */ |
116 |
|
void |
117 |
|
bitsetv_transitive_closure (bsetv) |
118 |
|
bitset *bsetv; |
119 |
|
{ |
120 |
|
unsigned int i; |
121 |
|
unsigned int j; |
122 |
|
|
123 |
|
for (i = 0; bsetv[i]; i++) |
124 |
|
for (j = 0; bsetv[j]; j++) |
125 |
|
if (bitset_test (bsetv[j], i)) |
126 |
|
bitset_or (bsetv[j], bsetv[j], bsetv[i]); |
127 |
|
} |
128 |
|
|
129 |
|
|
130 |
|
/* Given a vector BSETV of N bitsets of size N, modify its contents to |
131 |
|
be the reflexive transitive closure of what was given. This is |
132 |
|
the same as transitive closure but with all bits on the diagonal |
133 |
|
of the bit matrix set. */ |
134 |
|
void |
135 |
|
bitsetv_reflexive_transitive_closure (bitsetv bsetv) |
136 |
|
{ |
137 |
|
int i; |
138 |
|
|
139 |
|
bitsetv_transitive_closure (bsetv); |
140 |
|
for (i = 0; bsetv[i]; i++) |
141 |
|
bitset_set (bsetv[i], i); |
142 |
|
} |
143 |
|
|
144 |
|
|
145 |
/* Dump the contents of a bitset vector BSETV with N_VECS elements to |
/* Dump the contents of a bitset vector BSETV with N_VECS elements to |
146 |
FILE. */ |
FILE. */ |
147 |
void |
void |