bloomfilter

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BloomFilter

type BloomFilter struct {
	// contains filtered or unexported fields
}

BloomFilter .

func New

func New(expectedInsertions uint, fpp float64, hashSeed uint) (*BloomFilter, error)

New return a bloomFilter struct. fpp is probability of false positives

func (*BloomFilter) Insert

func (bf *BloomFilter) Insert(key []byte)

Insert to bloom filter's bit array.

func (*BloomFilter) MightContain

func (bf *BloomFilter) MightContain(key []byte) bool

MightContain return true if key might contain.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL