Handbook
Glossary
size-bloom-filter ( error-rate number-objects -- number-hashes number-bits )
Vocabulary
bloom-filters
.
private
Inputs
error-rate
an
object
number-objects
an
object
Outputs
number-hashes
an
object
number-bits
an
object
Definition
USING:
arrays
kernel
sequences
;
IN:
bloom-filters.private
:
size-bloom-filter
( error-rate number-objects -- number-hashes number-bits )
[
#hashes-range
identity-configuration
]
2dip
[
[
[
dup
]
]
dip
]
dip
[
bits-to-satisfy-error-rate
2array
smaller-second
]
2curry
compose
reduce
check-hashes
first2
;