Baqend / Orestes-Bloomfilter

Library of different Bloom filters in Java with optional Redis-backing, counting and many hashing options.
Other
839 stars 245 forks source link

Memory Bloom filter: TODO "union", "intersect", and "clone config" #26

Open rogerdielrton opened 8 years ago

rogerdielrton commented 8 years ago

Please, could you implemente these three features?

package orestes.bloomfilter.memory;
public class CountingBloomFilterMemory<T> implements CountingBloomFilter<T> {
    @Override
    public boolean union(BloomFilter<T> other) {
        //TODO
        throw new UnsupportedOperationException();
    }
    @Override
    public boolean intersect(BloomFilter<T> other) {
        //TODO
        throw new UnsupportedOperationException();
    }
}
public class BloomFilterMemory<T> implements BloomFilter<T> {
    @Override
    @SuppressWarnings("unchecked")
    public synchronized BloomFilter<T> clone() {
        BloomFilterMemory<T> o = null;
        try {
            o = (BloomFilterMemory<T>) super.clone();
        } 
        catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        o.bloom = (BitSet) bloom.clone();
        //TODO clone config
        return o;
    }
DivineTraube commented 8 years ago

Hi, this is on the roadmap, we hope to have it soon.

EdwardRaff commented 8 years ago

Is there an ETA for these functions?

fbuecklers commented 7 years ago

We are sorry, but we can not estimate any ETA up to now. But feel free to provide a pull request.

Btw: The BloomFilterMemory can already be cloned. The TODO was just not removed from the code. That the config is not cloned is a wanted behavior.

Best