3 Copyright (C) 2002, 2004, 2009-2015, 2018-2025 Free Software Foundation,
6 Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <https://www.gnu.org/licenses/>. */
24 /* This file uses _GL_ATTRIBUTE_DEALLOC. */
25 #if !_GL_CONFIG_H_INCLUDED
26 #error "Please include config.h first."
36 typedef bitset
* bitsetv
;
38 /* Free vector of bitsets. Do nothing if NULL. */
39 void bitsetv_free (bitsetv
);
41 /* Create a vector of N_VECS bitsets, each of N_BITS, and of
43 bitsetv
bitsetv_alloc (bitset_bindex
, bitset_bindex
, enum bitset_type
)
44 _GL_ATTRIBUTE_DEALLOC (bitsetv_free
, 1);
46 /* Create a vector of N_VECS bitsets, each of N_BITS, and with
47 attribute hints specified by ATTR. */
48 bitsetv
bitsetv_create (bitset_bindex
, bitset_bindex
, unsigned)
49 _GL_ATTRIBUTE_DEALLOC (bitsetv_free
, 1);
51 /* Zero vector of bitsets. */
52 void bitsetv_zero (bitsetv
);
54 /* Set vector of bitsets. */
55 void bitsetv_ones (bitsetv
);
57 /* Given a vector BSETV of N bitsets of size N, modify its contents to
58 be the transitive closure of what was given. */
59 void bitsetv_transitive_closure (bitsetv
);
61 /* Given a vector BSETV of N bitsets of size N, modify its contents to
62 be the reflexive transitive closure of what was given. This is
63 the same as transitive closure but with all bits on the diagonal
64 of the bit matrix set. */
65 void bitsetv_reflexive_transitive_closure (bitsetv
);
67 /* Dump vector of bitsets. */
68 void bitsetv_dump (FILE *, const char *, const char *, bitsetv
);
70 /* Function to debug vector of bitsets from debugger. */
71 void debug_bitsetv (bitsetv
);
73 /* Dump vector of bitsets as a matrix. */
74 void bitsetv_matrix_dump (FILE *, const char *, bitsetv
);
81 #endif /* _BITSETV_H */