bloomfilter

package module
v0.0.0-...-9f55551 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2018 License: MIT Imports: 2 Imported by: 0

README

bloomfilter

a simple golang bloom filter

Install
go get -u github.com/bttown/bloomfilter
Usage
filter := New(10000)
var texts = []string{
    "中国食物真棒。",
    "중국 음식 정말 맛있다.",
    "Chinese food is delicious。",
    "中国の食べ物は本当においしいです",
}

for _, text := range texts {
    filter.Put(text)
    filter.MightContains(text)
}
Notice

only support string object now!

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
}

func New

func New(bitSize int64) *Filter

func (*Filter) MightContains

func (filter *Filter) MightContains(v interface{}) bool

func (*Filter) Put

func (filter *Filter) Put(v interface{})

Jump to

Keyboard shortcuts

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