create

fun create(expectedElements: Int, falsePositiveRate: Double = 0.01): BloomFilter

Create a BloomFilter sized for expectedElements at the given falsePositiveRate (default 1%). The optimal bit count and hash count are derived from the standard formulas:

m = -n * ln(p) / (ln 2)²
k = (m / n) * ln 2

where n = expectedElements and p = falsePositiveRate.