Skip to main content

Module bit_vector

Module bit_vector 

Source
Expand description

Fixed-width bit vectors in natural binary order, with rank/unrank.

Position 0 is the least-significant bit, so ordinal r maps to the bit vector whose bit j is (r >> j) & 1.

Structs§

BitVectorIter
Iterator over all 2^width bit vectors of length width, in ordinal order.

Functions§

bit_vector_rank
The ordinal of a bit vector (position 0 = least significant bit).
bit_vector_unrank
The bit vector of the given width for ordinal rank.
bit_vectors
Construct a bit-vector iterator, rejecting widths that would overflow the u128 cursor.