Documentation ¶
Overview ¶
Package bloomfilter contains a bloomfilter implement with roaring bitmap.
Index ¶
Constants ¶
View Source
const ( HASHER_DEFAULT = "default" HASHER_OPTIMAL = "optimal" )
Variables ¶
View Source
var ( HashFactoryNames = map[string]HashFactory{ HASHER_DEFAULT: DefaultHashFactory, HASHER_OPTIMAL: OptimalHashFactory, } ErrImpossibleToTreat = fmt.Errorf("unable to union") MD5 = HashWrapper(md5.New()) SHA1 = HashWrapper(sha1.New()) CRC64 = HashWrapper(crc64.New(crc64.MakeTable(crc64.ECMA))) FNV64 = HashWrapper(fnv.New64()) FNV128 = HashWrapper(fnv.New128()) )
Functions ¶
Types ¶
type Config ¶
type Config struct { N uint64 // capacity P float64 // false probability HashName string // hash functions }
Config for bloomfilter defining the parameters: N - number of elements to be stored in the filter P - desired false positive probability HashName - the name of the particular hashfunction
type HashFactory ¶
Click to show internal directories.
Click to hide internal directories.