apache / datasketches-java

A software library of stochastic streaming algorithms, a.k.a. sketches.
https://datasketches.apache.org
Apache License 2.0
875 stars 207 forks source link

Common bitarray #567

Closed jmalkin closed 1 month ago

jmalkin commented 1 month ago

Refactored BloomFilter's BitArray class to make it common across filters. That involved making it public, so all the methods in the abstract base class now have a javadoc.

BitArray now has getBits(index, numBits) and setBits(index, numBits, value) (where the max size is 64 bits) as well as assignBit(index, value). The QuotientFilter has been updated to use this class, and the old Bitmap wrapping some legacy CERN code has been removed.

Opening this against the reviewed branch, but we probably then want to merge back into quotient-filter after that?