'Calculates minimum number of bits in filter array and
number of hash functions given a number of enteries (maximum)
and the desired error rate (falese positives).
Example:
m, k = self._optimal_size(3000, 0.01)   # m=28756, k=7'

def _optimal_size(self, capacity, error):

    m = math.ceil(((capacity * math.log(error)) / math.log((1.0 / math.pow(2.0, math.log(2.0))))))
    k = math.ceil(((math.log(2.0) * m) / capacity))
    return (int(m), int(k))
