bitsetv.h 2.2 KB

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