+/* Given a vector BSETV of N bitsets of size N, modify its contents to
+ be the transitive closure of what was given. */
+void
+bitsetv_transitive_closure (bitsetv bsetv)
+{
+ bitset_bindex i;
+ bitset_bindex j;
+
+ for (i = 0; bsetv[i]; i++)
+ for (j = 0; bsetv[j]; j++)
+ if (bitset_test (bsetv[j], i))
+ bitset_or (bsetv[j], bsetv[j], bsetv[i]);
+}
+
+
+/* Given a vector BSETV of N bitsets of size N, modify its contents to
+ be the reflexive transitive closure of what was given. This is
+ the same as transitive closure but with all bits on the diagonal
+ of the bit matrix set. */
+void
+bitsetv_reflexive_transitive_closure (bitsetv bsetv)
+{
+ bitset_bindex i;
+
+ bitsetv_transitive_closure (bsetv);
+ for (i = 0; bsetv[i]; i++)
+ bitset_set (bsetv[i], i);
+}
+
+