/[bison]/bison/lib/bitsetv.c
ViewVC logotype

Diff of /bison/lib/bitsetv.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by akim, Mon Mar 4 12:07:08 2002 UTC revision 1.3 by akim, Mon Mar 4 14:15:01 2002 UTC
# Line 111  bitsetv_ones (bsetv) Line 111  bitsetv_ones (bsetv)
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

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26