bloom

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 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 Filter

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

Filter is the sturct of BloomFilter false positive error rate p approximately (1 - e^(-kn/m))^k probability of false positives decreases as m increases, and increases as n increases. k is number of hash function, m is the size of filter, n is the number of elements inserted

func New

func New(size uint64, k uint64, race bool) *Filter

func (*Filter) Add

func (f *Filter) Add(data []byte) *Filter

Jump to

Keyboard shortcuts

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