bloom

Source   Edit  

Types

Bloom[K; N] = array[K, set[range[0'u16 .. uint16(N - 1)]]]
A bloom filter of K layers and N entries per layer. Source   Edit  

Procs

proc `$`[K, N](bloom: Bloom[K, N]): string
Render the bloom filter distribution as a string. Source   Edit  
proc add[K, N](bloom: var Bloom[K, N]; item: Bloomable)
Record the item as a member of the bloom filter. Source   Edit  
proc `and`[K, N](a, b: Bloom[K, N]): Bloom[K, N]
A bitwise and of filters a and b. Source   Edit  
proc clear(bloom: var Bloom)
Empty the bloom filter. Source   Edit  
proc contains[K, N](bloom: Bloom[K, N]; item: Bloomable): bool
Yields false only if the item is not in the bloom filter. Source   Edit  
proc del(bloom: var Bloom; item: Bloomable)
Unsupported by bloom filters; yields a compile-time error. Source   Edit  
proc `or`[K, N](a, b: Bloom[K, N]): Bloom[K, N]
A bitwise or of filters a and b. Source   Edit