An implementation of an object that acts like a collection of on/off bits.
Base class for a set of positive integers, implementing a subset of the built-in set type’s interface with extra docid-related methods.
This is a superclass for alternative set implementations to the built-in set which are more memory-efficient and specialized toward storing sorted lists of positive integers, though they will inevitably be slower than set for most operations since they’re pure Python.
Returns the next integer in the set after i, or None.
Returns the previous integer in the set before i, or None.
Returns the first (lowest) integer in the set.
Updates the set in-place to contain numbers in the range [0 - size) except numbers that are in this set.
Returns the last (highest) integer in the set.
A DocIdSet backed by an array of bits. This can also be useful as a bit array (e.g. for a Bloom filter). It is much more memory efficient than a large built-in set of integers, but wastes memory for sparse sets.
A DocIdSet backed by a sorted array of integers.