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 an implementation of a bloom filter.
func NewWithBitSet ¶
NewWithBitSet creates a new Filter with an existing BitSet.
func (*Filter) Clear ¶
func (f *Filter) Clear()
Clear clears the bloom filter, resetting every bit in the internal bit set.
func (*Filter) Test ¶
Test tests whether a value is present in the bloom filter.
When the result is false, the value is not present in the bloom filter. When the result is true, the value may have been added to the bloom filter, but it is not guaranteed to be present.
func (*Filter) TestAdd ¶
TestAdd tests whether a value is in the bloom filter, and adds it in the process.
Equivalent to a call to Test and then Add, but more efficient than calling both.
func (*Filter) TestAddString ¶
TestAddString tests whether a string is in the bloom filter, and adds it in the process.
Equivalent to a call to Test and then Add, but more efficient than calling both.
func (*Filter) TestString ¶
TestString tests whether a string is present in the bloom filter.
When the result is false, the value is not present in the bloom filter. When the result is true, the value may have been added to the bloom filter, but it is not guaranteed to be present.