public BloomFilter(final Hasher hash,final double c,final int n,final int k,final int metric){
  this.h=hash;
  this.expectedNumberOfFilterElements=n;
  hash.setNumberOfRandomKeys(k);
  this.k=k;
  this.bitsPerElement=c;
  this.bitSetSize=(int)Math.ceil(c * n);
  hash.setMaxValue(bitSetSize);
  numberOfAddedElements=0;
  this.bitset=new BitSet(bitSetSize);
  lastID++;
  this.id=lastID;
  this.metric=metric;
}

public BloomFilter ( final Hasher hash , final double c , final int n , final int k , final int metric ) { this . h = hash ; this . expectedNumberOfFilterElements = n ; hash . setNumberOfRandomKeys ( k ) ; this . k = k ; this . bitsPerElement = c ; this . bitSetSize = ( int ) Math . ceil ( c * n ) ; hash . setMaxValue ( bitSetSize ) ; numberOfAddedElements = 0 ; this . bitset = new BitSet ( bitSetSize ) ; lastID ++ ; this . id = lastID ; this . metric = metric ; }
constructs an empty bloom filter . the total length of the bloom filter will be c * n .
