Bloom Filter

example usage:

import com.twitter.algebird._
// import com.twitter.algebird._

val NUM_HASHES = 6
// NUM_HASHES: Int = 6

val WIDTH = 32
// WIDTH: Int = 32

val SEED = 1
// SEED: Int = 1

val bfMonoid = new BloomFilterMonoid(NUM_HASHES, WIDTH, SEED)
// bfMonoid: com.twitter.algebird.BloomFilterMonoid = BloomFilterMonoid(6,32,1)

val bf = bfMonoid.create("1", "2", "3", "4", "100")
// bf: com.twitter.algebird.BF =
// BFSparse(<function1>, EWAHCompressedBitmap, size in bits = 32 size in words = 2
// 0 0x00
// 1 dirties
// ,32)

val approxBool = bf.contains("1")
// approxBool: com.twitter.algebird.ApproximateBoolean = ApproximateBoolean(true,0.9290349745708529)

val res = approxBool.isTrue
// res: Boolean = true

Documentation Help

We’d love your help fleshing out this documentation! You can edit this page in your browser by clicking this link. These links might be helpful: