bloomfilter

package module
v0.0.0-...-7cb1c5d Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

README

BloomFilter

A rudimentary implementation of a Bloom filter.

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 NewBloomFilter

func NewBloomFilter(size int, numHash int) *BloomFilter

NewBloomFilter 创建一个新的布隆过滤器,指定大小。

func (*BloomFilter) Add

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

Add 将元素添加到布隆过滤器中。

func (*BloomFilter) Contains

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

Contains 检查元素是否可能在布隆过滤器中。

Jump to

Keyboard shortcuts

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