1/* Bitset vectors.
2
3 Copyright (C) 2002, 2004, 2009-2015, 2018-2019 Free Software Foundation,
4 Inc.
5
6 Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
7
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.
12
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.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20
21#ifndef _BITSETV_H
22#define _BITSETV_H
23
24#include "bitset.h"
25
26typedef bitset * bitsetv;
27
28/* Create a vector of N_VECS bitsets, each of N_BITS, and of
29 type TYPE. */
30bitsetv bitsetv_alloc (bitset_bindex, bitset_bindex, enum bitset_type);
31
32/* Create a vector of N_VECS bitsets, each of N_BITS, and with
33 attribute hints specified by ATTR. */
34bitsetv bitsetv_create (bitset_bindex, bitset_bindex, unsigned);
35
36/* Free vector of bitsets. Do nothing if NULL. */
37void bitsetv_free (bitsetv);
38
39/* Zero vector of bitsets. */
40void bitsetv_zero (bitsetv);
41
42/* Set vector of bitsets. */
43void bitsetv_ones (bitsetv);
44
45/* Given a vector BSETV of N bitsets of size N, modify its contents to
46 be the transitive closure of what was given. */
47void bitsetv_transitive_closure (bitsetv);
48
49/* Given a vector BSETV of N bitsets of size N, modify its contents to
50 be the reflexive transitive closure of what was given. This is
51 the same as transitive closure but with all bits on the diagonal
52 of the bit matrix set. */
53void bitsetv_reflexive_transitive_closure (bitsetv);
54
55/* Dump vector of bitsets. */
56void bitsetv_dump (FILE *, const char *, const char *, bitsetv);
57
58/* Function to debug vector of bitsets from debugger. */
59void debug_bitsetv (bitsetv);
60
61/* Dump vector of bitsets as a matrix. */
62void bitsetv_matrix_dump (FILE *, const char *, bitsetv);
63
64#endif /* _BITSETV_H */
65