bloomfilter-redis-0.1.0.3: Distributed bloom filters on Redis (using the Hedis client).

Safe HaskellSafe
LanguageHaskell2010

Data.RedisBloom.Suggestions

Contents

Description

Suggestions based on http://hur.st/bloomfilter

Synopsis

Suggestions

suggestCapacity Source #

Arguments

:: (Integral a, RealFrac b, Floating b) 
=> a

expected maximum capacity

-> b

desired false positive rate where 0 < e < 1

-> Capacity 

Suggests an appropriate capacity for a given number of elements.

This uses the algorithm described at http://hur.st/bloomfilter

suggestHashCount Source #

Arguments

:: Integral a 
=> a

expected maximum capacity

-> Capacity 
-> HashCount 

Suggets an appropriate number of hash functions for a given capacity and false positive pro

Bloom filter creation

suggestCreate Source #

Arguments

:: (Integral a, RealFrac b, Floating b, Hashable d) 
=> a

expected maximum capacity

-> b

desired false positive rate where 0 < e < 1

-> Key

Redis key for the bloom filter

-> Bloom d 

Creates a bloom filter configuration with the specified values.