{"modulePath":"github.com/omalloc/tavern","version":"v1.2.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package heavykeeper\n\n## Types\n\n```go\ntype HeavyKeeper struct {\n\t// contains filtered or unexported fields\n}\n```\nHeavyKeeper is a probabilistic data structure for top-k items.\n\n```go\nfunc New(depth, width int, decay float64) *HeavyKeeper\n```\nNew creates a new HeavyKeeper. depth: number of arrays (hash functions) width: number of buckets per array decay: probability of decay (0.9 means 90% chance to decay)\n\n```go\nfunc (hk *HeavyKeeper) Add(key []byte)\n```\nAdd adds a key to the HeavyKeeper.\n\n```go\nfunc (hk *HeavyKeeper) Clear()\n```\nClear resets the HeavyKeeper.\n\n```go\nfunc (hk *HeavyKeeper) Query(key []byte) uint32\n```\nQuery returns the estimated count for the key.\n\n","path":"github.com/omalloc/tavern/pkg/algorithm/heavykeeper","name":"heavykeeper","synopsis":"","isRedistributable":true}
