This file defines several variants of bit sets. A bit set is a densely stored set of integers with a known maximum, in which each integer gets a single bit. Bit sets have very fast presence checks, update operations, and union and intersection operations. However, if the number of possible items is very large and the number of actual items in a given set is usually small, they may be less memory efficient than an array set.
There are five variants defined here:
IntegerBitSet: A bit set with static size, which is backed by a single integer. This set is good for sets with a small size, but may generate inefficient code for larger sets, especially in debug mode.
ArrayBitSet: A bit set with static size, which is backed by an array of usize. This set is good for sets with a larger size, but may use more bytes than necessary if your set is small.
StaticBitSet: Picks either IntegerBitSet or ArrayBitSet depending on the requested size. The interfaces of these two types match exactly, except for fields.
DynamicBitSet: A bit set with runtime-known size, backed by an allocated slice of usize.
DynamicBitSetUnmanaged: A variant of DynamicBitSet which does not store a pointer to its allocator, in order to save space.