Previous: Uniform Arrays, Up: Arrays
Bit vectors are a specific type of uniform array: an array of booleans with a single zero-based index.
They are displayed as a sequence of 0s and
1s prefixed by #*, e.g.,
(make-uniform-vector 8 #t #f)
⇒ #*00000000
#b(#t #f #t)
⇒ #*101
Return the number of occurrences of the boolean b in bitvector.
Return the minimum index of an occurrence of bool in bitvector which is at least k (a non-negative integer not greater than the bitvector length), or
#fif no bool occurs within the specified range.
Replace each element in bitvector by its negation, and return it.
Set or clear bits in bitvector and return it.
If uve is a bit-vector, bitvector and uve must be of the same length. If bool is
#t, uve is ored into bitvector. If bool is#f, the inversion of uve is anded into bitvector.If uve is an unsigned integer vector, all the elements of uve must be between 0 (inclusive) and the length of bitvector (exclusive). The bits of bitvector corresponding to the indices in uve are set to bool.
Return a count of uve-specified bool bits in bitvector.
If uve is a bit-vector, bitvector and uve must be of the same length. In this case, the count includes only those bits that are set (i.e., 1 or
#t) in uve.If uve is an unsigned integer vector, all the elements of uve must be between 0 (inclusive) and the length of bitvector (exclusive). In this case, the count includes only those bits corresponding to the indices in uve.