Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bloom ¶
type Bloom struct { ElemNum uint64 // contains filtered or unexported fields }
Bloom filter
func NewBloomFilter ¶
NewBloomFilter returns a new bloomfilter.
func NewBloomFilterWithErrorRate ¶
NewBloomFilterWithErrorRate returns a new bloomfilter with optimal size for the given error rate
func (*Bloom) AddIfNotHas ¶
AddIfNotHas only Adds hash, if it's not present in the bloomfilter. Returns true if hash was added. Returns false if hash was already registered in the bloomfilter.
func (Bloom) Has ¶
Has checks if bit(s) for entry hash is/are set, returns true if the hash was added to the Bloom Filter.
Click to show internal directories.
Click to hide internal directories.