MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / build_bloom

Function build_bloom

nodedb-columnar/src/predicate.rs:435–437  ·  view source on GitHub ↗

Build a new `BloomFilter` with the default parameters (`k=3`, `m=2048`) and insert all provided string values. Skips empty strings and nulls (caller passes only valid, non-null values).

(values: &[&str])

Source from the content-addressed store, hash-verified

433///
434/// Skips empty strings and nulls (caller passes only valid, non-null values).
435pub fn build_bloom(values: &[&str]) -> BloomFilter {
436 build_bloom_with_params(values, BLOOM_K_DEFAULT, BLOOM_BITS_DEFAULT)
437}
438
439/// Build a `BloomFilter` with explicit `k` (hash function count) and `m`
440/// (bit-array size). `m` must be a power of two and at least 8.

Callers 4

bloom_insert_and_queryFunction · 0.85
bloom_eq_skip_via_filterFunction · 0.85

Calls 1

build_bloom_with_paramsFunction · 0.85

Tested by 4

bloom_insert_and_queryFunction · 0.68
bloom_eq_skip_via_filterFunction · 0.68