Crate smallbitset

Source

Macros§

bitset
conversion
primitive

Structs§

Bits
This iterator goes over all the bits whose value are 1 in a biset
BitsBuilder
This structure is really only meant to facilitate the writing of iterator methods on bitsets. This way, only the const param can be specified while leaving all the other types inferred by the compiler. (That’s kind of type curry-ing).
Set8
This structure implemts a bitset with a maximum capacity of $capa bits. The structure requires no dynamic allocation and it is therefore fully copiable
Set16
This structure implemts a bitset with a maximum capacity of $capa bits. The structure requires no dynamic allocation and it is therefore fully copiable
Set32
This structure implemts a bitset with a maximum capacity of $capa bits. The structure requires no dynamic allocation and it is therefore fully copiable
Set64
This structure implemts a bitset with a maximum capacity of $capa bits. The structure requires no dynamic allocation and it is therefore fully copiable
Set128
This structure implemts a bitset with a maximum capacity of $capa bits. The structure requires no dynamic allocation and it is therefore fully copiable
Set256
This structure implemts a bitset with a maximum capacity of $capa bits. The structure requires no dynamic allocation and it is therefore fully copiable
SubsetsOfSize
This is an iterator that will iterate over all the subsets of a given size of a given bitset

Functions§

nb_combinations
This will count the number of possible cases. Given that we want to draw k items among a set of n, without considering the repetitions and without considerations for the order, we are computing the number of possible combinations $C^n_k = \frac{n!}{k! (n-k)!}$.