• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Bitset vectors.
2 
3    Copyright (C) 2002, 2004, 2009-2012 Free Software Foundation, Inc.
4 
5    Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
6 
7    This program is free software: you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation, either version 3 of the License, or
10    (at your option) any later version.
11 
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16 
17    You should have received a copy of the GNU General Public License
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19 
20 #ifndef _BITSETV_H
21 #define _BITSETV_H
22 
23 #include "bitset.h"
24 
25 typedef bitset * bitsetv;
26 
27 /* Create a vector of N_VECS bitsets, each of N_BITS, and of
28    type TYPE.  */
29 extern bitsetv bitsetv_alloc (bitset_bindex, bitset_bindex, enum bitset_type);
30 
31 /* Create a vector of N_VECS bitsets, each of N_BITS, and with
32    attribute hints specified by ATTR.  */
33 extern bitsetv bitsetv_create (bitset_bindex, bitset_bindex, unsigned int);
34 
35 /* Free vector of bitsets.  */
36 extern void bitsetv_free (bitsetv);
37 
38 /* Zero vector of bitsets.  */
39 extern void bitsetv_zero (bitsetv);
40 
41 /* Set vector of bitsets.  */
42 extern void bitsetv_ones (bitsetv);
43 
44 /* Given a vector BSETV of N bitsets of size N, modify its contents to
45    be the transitive closure of what was given.  */
46 extern void bitsetv_transitive_closure (bitsetv);
47 
48 /* Given a vector BSETV of N bitsets of size N, modify its contents to
49    be the reflexive transitive closure of what was given.  This is
50    the same as transitive closure but with all bits on the diagonal
51    of the bit matrix set.  */
52 extern void bitsetv_reflexive_transitive_closure (bitsetv);
53 
54 /* Dump vector of bitsets.  */
55 extern void bitsetv_dump (FILE *, const char *, const char *, bitsetv);
56 
57 /* Function to debug vector of bitsets from debugger.  */
58 extern void debug_bitsetv (bitsetv);
59 
60 #endif  /* _BITSETV_H  */
61