Interface BloomFilterOptions<T>

Options for creating a BloomFilter.

interface BloomFilterOptions {
    hash?: ((value, seed) => number);
    k: number;
    m: number;
    n?: number;
    value?: string | number | bigint;
}

Type Parameters

  • T

Properties

Properties

hash?: ((value, seed) => number)

Type declaration

    • (value, seed): number
    • The k hash functions

      Parameters

      • value: T
      • seed: number

      Returns number

k: number

The number of hash functions to use.

m: number

The bit size of the bloom filter.

n?: number

The initial number of elements in the bloom filter.

value?: string | number | bigint

The initial bit value of the bloom filter.

Generated using TypeDoc