Module bit_vec

Module bit_vec 

Source
Expand description

This module contains a simple bit vector implementation with no overhead and a fast succinct bit vector implementation with rank and select queries.

Modules§

fast_rs_vec
A fast succinct bit vector implementation with rank and select queries. Rank computes in constant-time, select on average in constant-time, with a logarithmic worst case.
mask
This module defines a struct for lazily masking BitVec. It offers all immutable operations of BitVec but applies a bit-mask during the operation. The struct is created through BitVec::mask_xor, BitVec::mask_and, BitVec::mask_or, or BitVec::mask_custom.
sparse
A sparse bit vector with rank1, rank0 and select1 support. The vector requires O(n log u/n) + 2n + o(n) bits of space, where n is the number of bits in the vector and u is the number of 1-bits. The vector is constructed from a sorted list of indices of 1-bits, or from an existing BitVec.

Structs§

BitVec
A simple bit vector that does not support rank and select queries. Bits are stored in little-endian order, i.e. the least significant bit is stored first. The bit vector is stored as a sequence of 64 bit limbs. The last limb may be partially filled.
BitVecIter
An owning iterator for BitVec.
BitVecRefIter
A borrowing iterator for BitVec.

Type Aliases§

BitMask
Type alias for masked bitvectors that implement a simple bitwise binary operation. The first lifetime is for the bit vector that is being masked, the second lifetime is for the mask.