bloomfilter

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: MIT Imports: 2 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
}

func NewBloomFilter

func NewBloomFilter(n uint64, falsePositiveProb float64) *BloomFilter

create a new bloom filter

func (*BloomFilter) Insert

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

Insert(x) : To insert an element in the Bloom Filter.

func (*BloomFilter) Lookup

func (bf *BloomFilter) Lookup(element []byte) bool

Lookup(x) : to check whether an element is already present in Bloom Filter if element is present it will return true with a false positive probability. if element is not present it will return false

Jump to

Keyboard shortcuts

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