jasondavies/bloomfilter.js — Issue #1: Use optimal m/k given n/p option
Author: Glench
Created: 2012-01-05 20:21:11+00:00
State: open

I was just wondering why you don't have an option to use the optimal m and k parameters ([see here](http://hur.st/bloomfilter?n=4&p=1.0E-20)) based on n and p.

There are a couple ways I imagine this going:

- Add an optional 3rd argument in the constructor that when present and set to `true` would interpret the first and second values of the constructor as n and p instead of m and k.

- Change the constructor to accept a hash of either {m: blah, k: blah} or {n: blah, k: blah} (hopefully with better names than the single letters.

- Add a new function, something like BloomFilter.useOptimal(n, p).

I could implement any of these, but I wanted to ask you first if there was any reason why you didn't do this.