示例#1
0
        public BloomFilter(int number, float rate, IBloomStore store)
        {
            this.insertSize         = number;
            this.rate               = rate;
            this.arraySize          = this.getBitArraySize(insertSize, rate);
            this.hashFunctionNumber = this.getHashFunctionsNumber(insertSize, arraySize);
            System.Console.WriteLine($"arraysize:{arraySize} hashfunctioncount:{this.hashFunctionNumber}");
            this._store = store;
            var size = (uint)this.arraySize;

            store.Init(size);
        }
示例#2
0
 public BloomFilter(IBloomStore store) : this(100, 0.01f, store)
 {
 }