Handbook
Glossary
cuckoo-delete ( bytes cuckoo-filter -- ? )
Vocabulary
cuckoo-filters
Inputs
bytes
a
byte-array
cuckoo-filter
a
cuckoo-filter
Outputs
?
a
boolean
Word description
Remove the data from the
cuckoo-filter
, returning
t
if the data appears to be removed.
Definition
USING:
accessors
combinators.short-circuit
cuckoo-filters.private
kernel
math
sequences
;
IN:
cuckoo-filters
::
cuckoo-delete
( bytes cuckoo-filter -- ? )
bytes cuckoo-filter
hash-indices
:>
( fp i1 i2 )
cuckoo-filter
buckets>>
:>
buckets buckets
length
:>
n
{
[
fp i1 n
mod
buckets
nth
bucket-delete
]
[
fp i2 n
mod
buckets
nth
bucket-delete
]
}
0||
dup
[
cuckoo-filter
[
1
-
]
change-size
drop
]
when
;