Module bit_set

Source

Macros§

bit_relations_inherent_impls πŸ”’

Structs§

BitIter
BitMatrix
A fixed-size 2D bit matrix type with a dense representation.
ChunkedBitIter
ChunkedBitSet
A fixed-size bitset type with a partially dense, partially sparse representation. The bitset is broken into chunks, and chunks that are all zeros or all ones are represented and handled very efficiently.
DenseBitSet
A fixed-size bitset type with a dense representation.
FiniteBitSet
A fixed-sized bitset type represented by an integer type. Indices outwith than the range representable by T are considered set.
GrowableBitSet
A resizable bitset type with a dense representation.
SparseBitMatrix
A fixed-column-size, variable-row-size 2D bit matrix with a moderately sparse representation.

Enums§

Chunk πŸ”’
ChunkIter πŸ”’
MixedBitIter
MixedBitSet
A bitset with a mixed representation, using DenseBitSet for small and medium bitsets, and ChunkedBitSet for large bitsets, i.e. those with enough bits for at least two chunks. This is a good choice for many bitsets that can have large domain sizes (e.g. 5000+).

Constants§

CHUNK_BITS πŸ”’
CHUNK_WORDS πŸ”’
WORD_BITS πŸ”’
WORD_BYTES πŸ”’

Traits§

BitRelations
FiniteBitSetTy
Integral type used to represent the bit set.

Functions§

bitwise πŸ”’
Sets out_vec[i] = op(out_vec[i], in_vec[i]) for each index i in both slices. The slices must have the same length.
bitwise_changes πŸ”’
Does this bitwise operation change out_vec?
chunk_index πŸ”’
chunk_word_index_and_mask πŸ”’
clear_excess_bits_in_final_word πŸ”’
inclusive_start_end πŸ”’
max_bit πŸ”’
num_chunks πŸ”’
num_words πŸ”’
sequential_update πŸ”’
word_index_and_mask πŸ”’

Type Aliases§

ChunkSize πŸ”’
ChunkSize is small to keep Chunk small. The static assertion ensures it’s not too small.
Word πŸ”’