Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitArray ¶
type BitArray struct {
// contains filtered or unexported fields
}
func NewBitArray ¶
* Creates a New Bit Array of specified length
type BloomFilter ¶
type BloomFilter struct {
// contains filtered or unexported fields
}
func New ¶
func New(insertionCount uint64, falsePositiveProbability float64) *BloomFilter
* Create new BloomFilter with approximate unique keys insertion count and tolerated false positive probability
func NewWithSize ¶
func NewWithSize(numberOfBits uint64, hashFunctions int) *BloomFilter
* Create new BloomFilter with number of bits and hash functions to use
func (*BloomFilter) MightContain ¶
func (bf *BloomFilter) MightContain(key string) bool
* Check if bloom filter might contain string key Can give false positives. But if returns false key is definitely not present
func (*BloomFilter) MightContainBytes ¶
func (bf *BloomFilter) MightContainBytes(key []byte) bool
* Check if bloom filter might contain bytes key Can give false positives. But if returns false key is definitely not present
func (*BloomFilter) Put ¶
func (bf *BloomFilter) Put(key string)
* Put the string key in bloom filter
func (*BloomFilter) PutBytes ¶
func (bf *BloomFilter) PutBytes(key []byte)
* Put the bytes key in bloom filter
Click to show internal directories.
Click to hide internal directories.