bitsetv.h 2.1 KB

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