Options
All
  • Public
  • Public/Protected
  • All
Menu

A Scalable Bloom Filter is a variant of Bloom Filters that can adapt dynamically to the number of elements stored, while assuring a maximum false positive probability

Reference: ALMEIDA, Paulo Sérgio, BAQUERO, Carlos, PREGUIÇA, Nuno, et al. Scalable bloom filters. Information Processing Letters, 2007, vol. 101, no 6, p. 255-261.

see

https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.725.390&rep=rep1&type=pdf

author

Thomas Minier & Arnaud Grall

Hierarchy

Implements

Index

Properties

_error_rate: number

The error rate desired.

_filters: PartitionedBloomFilter[] = []

Internal Partition Bloom Filters

_hashing: Hashing
_initial_size: number

The initial size of this filter in number of elements, not in bytes.

_ratio: number

The load factor of each filter, By default: 0.5 half of the set

_rng: prng
_s: number = 2

Static value, will power the size of the new set, by default we will follow a power of 2.

_seed: number

Methods

  • capacity(): number
  • Create a Scalable Bloom Filter based on Partitionned Bloom Filter.

    Parameters

    • _size: number

      the starting size of the filter

    • _error_rate: number

      ther error rate desired of the filter

    • _ratio: number = 0.5

      the load factor desired

    Returns ScalableBloomFilter

  • fromJSON(json: JSON): any
  • Load an Object from a provided JSON object

    Parameters

    • json: JSON

      the JSON object to load

    Returns any

    Return the Object loaded from the provided JSON object

  • nextInt32(): number
  • rate(): number
  • saveAsJSON(): any

Constructors

  • new ScalableBloomFilter(_initial_size?: number, _error_rate?: number, _ratio?: number): ScalableBloomFilter

Accessors

  • Get a function used to draw random number

    Returns prng

    A factory function used to draw random integer

  • get seed(): number
  • set seed(seed: number): void
  • override

    Return the current seed. For obscure reason we must code this function...

    Returns number

  • override

    Set the seed for this structure. If you override the seed after adding data, all the filters will be updated and you may get wrong indexes for already indexed data due to the seed change. So only change it once before adding data.

    Parameters

    • seed: number

      the new seed that will be used in this structure

    Returns void

Generated using TypeDoc