Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckLocations ¶
CheckLocations returns true if all locations are set in the BitSet, false otherwise.
func Equal ¶
Equal tests the equvalence of two BitSets. False if they are of different sizes, otherwise true only if all the same bits are set
func EstimateParameters ¶
EstimateParameters estimates requirements for the number of bits and hash functions, to use in the Bloom Filter. Computed from the number of items to add and the false positive rate
Types ¶
type BitSet ¶
type BitSet struct {
// contains filtered or unexported fields
}
BitSet is a set of bits
func NewBitSet ¶
NewBitSet creates a new BitSet with numBits bits Parameters are forced to be at least 1
func SetLocations ¶
SetLocations will set all specified bits to 1 in the bitset
func (*BitSet) Bytes ¶
Bytes returns the raw bitset data - can be passed into From to recreate the BitSet