Closed JustinChu closed 5 years ago
I agree 100%. Having the ntHash tightly coupled with the Bloom filter is bad design, IMO. It makes it more difficult to upgrade to newer versions of ntHash or to use alternate hash functions. It also makes the code more complicated and harder to maintain.
The new generic Bloom filter class could be either a base (parent) class of the existing Bloom filter or a separate class that supports a subset of the existing Bloom filter methods. Either option would be fine by me.
We should have a superclass bloom filter that is agnostic of the hash functions used, where all contains and insert functions expect only a set of hash functions. This will help modularize the code between projects.
There should be subclasses which inherit from it that we can use for the swig/perl version of the code that will have insert and contains functions that can accept the actual key they are expecting.
@benvvalk any input on this?