(index ("make-bloom-filter" 0) ("make-bloom-filter" 804) ("bloom-filter-set!" 1172) ("bloom-filter-exists?" 1345) ("bloom-filter?" 1535) ("check-bloom-filter" 1535) ("error-bloom-filter" 1535) ("bloom-filter-algorithms" 1775) ("bloom-filter-n" 1944) ("bloom-filter-m" 2140) ("bloom-filter-k" 2271) ("bloom-filter-p-false-positive" 2399) ("actual-k" 2666) ("optimum-size" 2803) ("desired-m" 3085) ("optimum-k" 3690) ("optimum-m" 3872) ("p-false-positive" 4064) ("p-random-one-bit" 4304))
(def (sig (procedure "(make-bloom-filter M MDPS [K]) --> bloom-filter" (id make-bloom-filter))) (p "Returns a bloom-filter object with " (tt "M") " bits of discrimination and a set of hash functions built from the supplied " (tt "MDPS") ", a " (tt "(list-of message-digest-primitive)") " objects.") (p "The number of hashes, " (tt "K") ", is not necessarily the same as the number of message-digests. A hash (here) is defined as an unsigned 32 bit integer. Most message-digests return more 32 bits of hash. The actual length of the hash is divided into 32 bit blocks to get the individual hashes.") (p "The argument " (tt "K") " will restrict the actual number of hashes to the \"first\" " (i "K") ", no matter how many more the supplied message-digests create. First in the order of " (tt "MDPS") "."))
(def (sig (procedure "(make-bloom-filter P N MDPS) --> bloom-filter" (id make-bloom-filter))) (p "Returns a bloom-filter object with " (tt "M") " and " (tt "K") " values chosen for the given population capacity " (tt "N") " and probablity of false-positives " (tt "P") ".") (p "Selecting the optimal set of message-digests is beyond the scope of make-bloom-filter."))
(def (sig (procedure "(bloom-filter-set! BLOOM-FILTER OBJECT)" (id bloom-filter-set!))) (p "Add the specified " (tt "OBJECT") " to the indicated " (tt "BLOOM-FILTER") "."))
(def (sig (procedure "(bloom-filter-exists? BLOOM-FILTER OBJECT) --> boolean" (id bloom-filter-exists?))) (p "Is the specified " (tt "OBJECT") " in the indicated " (tt "BLOOM-FILTER") "."))
(def (sig (procedure "(bloom-filter? OBJ) --> boolean" (id bloom-filter?)) (procedure "(check-bloom-filter LOC OBJ [NAM]) --> bloom-filter" (id check-bloom-filter)) (procedure "(error-bloom-filter LOC OBJ [NAM])" (id error-bloom-filter))))
(def (sig (procedure "(bloom-filter-algorithms BLOOM-FILTER) --> (list-of message-digest-primitive)" (id bloom-filter-algorithms))) (p "The mdps used for the filter."))
(def (sig (procedure "(bloom-filter-n BLOOM-FILTER) --> fixnum" (id bloom-filter-n))) (p "The current population - the number of objects added to the filter.") (p "Not the population capacity."))
(def (sig (procedure "(bloom-filter-m BLOOM-FILTER) --> fixnum" (id bloom-filter-m))) (p "The number of bits of discrimination."))
(def (sig (procedure "(bloom-filter-k BLOOM-FILTER) --> fixnum" (id bloom-filter-k))) (p "The number of hashes. (See above.)"))
(def (sig (procedure "(bloom-filter-p-false-positive BLOOM-FILTER [N]) --> number" (id bloom-filter-p-false-positive))) (p "The probability of a false-positive for the population capacity " (tt "N") ", default is the current population, " (tt "bloom-filter-n") "."))
(def (sig (procedure "(actual-k MDPS) --> fixnum" (id actual-k))) (p "Calculates the actual number of hashes for the " (tt "MDPS") "."))
(def (sig (procedure "(optimum-size P N) --> fixnum fixnum" (id optimum-size))) (p "Returns 2 values, an optimal " (tt "M") ", bits of discrimination, and " (tt "K") ", number of hashes, for the given population size " (tt "N") " and probability of false-positives " (tt "P") "."))
(def (sig (procedure "(desired-m P N [K]) --> fixnum fixnum number" (id desired-m))) (p "Calculates a near-optimal number of bits of discrimination to meet the desired probability of false positives " (tt "P") ", with the given population size " (tt "N") " and number of hashes " (tt "K") ". When the " (tt "K") " parameter is missing " (tt "optimum-k") " is used to calculate a value.") (p "A multi-valued return of the calculated " (tt "M") ", " (tt "K") ", and " (tt "P") " values. The calculated probability may be lower than the desired. The calculated " (tt "M") " value will always be a fixnum."))
(def (sig (procedure "(optimum-k N M) --> fixnum" (id optimum-k))) (p "Optimal count of hashes for the given population size " (tt "N") " and " (tt "M") " bits of discrimination."))
(def (sig (procedure "(optimum-m K N) --> fixnum" (id optimum-m))) (p "Optimal count of bits of discrimination for the given population size " (tt "N") " and " (tt "K") " number of hashes."))
(def (sig (procedure "(p-false-positive K N M) --> number" (id p-false-positive))) (p "What is the probability of false positives for the population size " (tt "N") " assuming " (tt "K") " hashes and " (tt "M") " bits of discrimination."))
(def (sig (procedure "(p-random-one-bit K N M) --> number" (id p-random-one-bit))) (p "Calculates the probablility of a random set bit for the given number of hash functions " (tt "K") ", population size " (tt "N") ", and bits of discrimination " (tt "M") "."))
