Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Module BatBitSet
Efficient bit sets.
A bitset is an array of boolean values that can be accessed with indexes like an array but provides a better memory usage (divided by Sys.word_size; either 32 or 64) for a very small speed trade-off. It can provide efficient storage of dense sets of nonnegative integers near zero. Sparse sets should use BatSet, sets with large ranges of contiguous ints should use BatISet.
next_set_bit s n returns Some m when m is the next set element with index greater than or equal n, or None if no such element exists (i.e. n is greater than the largest element)
More efficient than scanning with repeated BitSet.mem.
compare s1 s2 compares two bitsets using a lexicographic ordering. Highest bit indexes are compared first. The capacity of the bitsets is not important for this comparison, only the bits starting with the highest set bit and going down.