示例#1
0
func (this *ScalableBloom) addBloomFilter() {
	var bf bloom.Bloom
	if this.bfc == nil {
		bf = partitioned.New(this.n)
	} else {
		bf = this.bfc(this.n)
	}

	e := this.e * math.Pow(float64(this.r), float64(len(this.bfs)))

	bf.SetHasher(this.h)
	bf.SetErrorProbability(e)
	bf.Reset()

	this.bfs = append(this.bfs, bf)
	//fmt.Println("Added new bloom filter")
}