Module Bitvector

module Bitvector: sig .. end
Bit vectors. Assumed to be 0 after the last bit. Grow automatically.

type bitvector 
val empty : bitvector
Empty bit vector.
val is_empty : bitvector -> bool
Check if a bitvector is empty.
val nbr_set_bits : bitvector -> int
Number of bits set in a vector.
val get_bit : bitvector -> int -> bool
Get the bit at the given position.
val set_bit : bitvector -> int -> bitvector
Set the bit at the given position to 1.
val clear_bit : bitvector -> int -> bitvector
Clear the bit at the given position, i.e. set it to 0.
val of_list : int list -> bitvector
Mark the bits at positions given in the list.
val to_list : bitvector -> int list
The list of set bits.
val to_rev_list : bitvector -> int list
The list of set bits, in reverse order.
val str : bitvector -> string
Print the bit vector to string.
val (&&&) : bitvector -> bitvector -> bitvector
Bitwise and.
val (|||) : bitvector -> bitvector -> bitvector
Bitwise or.