Defined in: packages/scalar-sketch/src/split-block-bloom-filter.ts:37
A split-block Bloom filter specialized for strings.
Extends
Section titled “Extends”Properties
Section titled “Properties”
readonlykind:"split-block-bloom-filter"
Defined in: packages/scalar-sketch/src/split-block-bloom-filter.ts:15
Inherited from
Section titled “Inherited from”SplitBlockBloomFilterMetadata.kind
blockCount
Section titled “blockCount”
readonlyblockCount:number
Defined in: packages/scalar-sketch/src/split-block-bloom-filter.ts:18
Effective number of 256-bit blocks. Always a power of two.
Inherited from
Section titled “Inherited from”SplitBlockBloomFilterMetadata.blockCount
stateByteLength
Section titled “stateByteLength”
readonlystateByteLength:number
Defined in: packages/scalar-sketch/src/split-block-bloom-filter.ts:20
Bytes occupied by the mutable bit state, excluding object overhead.
Inherited from
Section titled “Inherited from”SplitBlockBloomFilterMetadata.stateByteLength
updateCount
Section titled “updateCount”
readonlyupdateCount:bigint
Defined in: packages/scalar-sketch/src/split-block-bloom-filter.ts:22
Number of accepted update attempts, including repeated values.
Inherited from
Section titled “Inherited from”SplitBlockBloomFilterMetadata.updateCount
estimatedFalsePositiveProbability
Section titled “estimatedFalsePositiveProbability”
readonlyestimatedFalsePositiveProbability:number
Defined in: packages/scalar-sketch/src/split-block-bloom-filter.ts:31
Current split-block Bloom model estimate.
The model averages each block’s eight-lane false-positive probability over its binomially distributed load. Counting attempts instead of distinct inputs makes the reported value conservative when callers repeat updates. The model assumes uniform XXH64 block selection and independent lanes.
Inherited from
Section titled “Inherited from”SplitBlockBloomFilterMetadata.estimatedFalsePositiveProbability
readonlyseed:bigint
Defined in: packages/scalar-sketch/src/split-block-bloom-filter.ts:33
XXH64 seed that participates in merge compatibility.
Inherited from
Section titled “Inherited from”SplitBlockBloomFilterMetadata.seed
scalarKind
Section titled “scalarKind”
readonlyscalarKind:"string"
Defined in: packages/scalar-sketch/src/split-block-bloom-filter.ts:38
Overrides
Section titled “Overrides”SplitBlockBloomFilterMetadata.scalarKind
update
Section titled “update”update: (
value) =>void
Defined in: packages/scalar-sketch/src/split-block-bloom-filter.ts:45
Add one string. O(length); mutates the filter.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
Throws
Section titled “Throws”From knotkit/hash for an invalid string.
Throws
Section titled “Throws”With CAPACITY_EXCEEDED when the update count is full.
mightContain
Section titled “mightContain”mightContain: (
value) =>boolean
Defined in: packages/scalar-sketch/src/split-block-bloom-filter.ts:51
Return false for a definite miss and true for a possible member. O(length).
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
Throws
Section titled “Throws”From knotkit/hash for an invalid string.
merge: (
other) =>void
Defined in: packages/scalar-sketch/src/split-block-bloom-filter.ts:58
Union a compatible filter into this filter. O(blockCount); mutates only this filter.
Parameters
Section titled “Parameters”StringSplitBlockBloomFilter
Returns
Section titled “Returns”void
Throws
Section titled “Throws”With FOREIGN_STRUCTURE,
WRONG_FAMILY, INCOMPATIBLE_SKETCH, or CAPACITY_EXCEEDED.
reduce
Section titled “reduce”reduce: (
targetBlockCount) =>StringSplitBlockBloomFilter
Defined in: packages/scalar-sketch/src/split-block-bloom-filter.ts:64
Return a new filter folded to a power-of-two block count no larger than this one.
Parameters
Section titled “Parameters”targetBlockCount
Section titled “targetBlockCount”number
Returns
Section titled “Returns”StringSplitBlockBloomFilter
Throws
Section titled “Throws”With INVALID_REDUCTION for an unsound target.