SparseFixedBitSet
A bit set that only stores longs that have at least one bit which is set. The way it works is that the space of bits is divided into blocks of 4096 bits, which is 64 longs. Then for each block, we have:
a long[] which stores the non-zero longs for that block
a long so that bit
ibeing set means that thei-thlong of the block is non-null, and its offset in the array of longs is the number of one bits on the right of thei-thbit.
Properties
Functions
Apply this Bits instance to the given FixedBitSet, which starts at the given offset.
Return an approximation of the cardinality of this set. Some implementations may trade accuracy for speed if they have the ability to estimate the cardinality of the set without iterating over all the data. The default implementation returns .cardinality.
Return the number of bits that are set. NOTE: this method is likely to run in linear time
Does in-place OR of the bits provided by the iterator. The state of the iterator after this operation terminates is undefined.
Returns the index of the last set bit before or on the index specified. -1 is returned if there are no more set bits.
Return the memory usage of this object in bytes. Negative values are illegal.