Documentation
¶
Overview ¶
Package hotlist provides utilities for summarizing frequently encountered items.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HotList ¶
type HotList interface {
AddWeighted(x Item)
AddNWeighted(x Item, n int)
Reset()
Top(k int) []Entry
}
HotList tracks the frequency of items added to it, discarding infrequent items and potentially retaining items based on relative weights.
func NewPerfect ¶
func NewPerfect() HotList
NewPerfect returns an implementation of HotList that tracks all items added, without sampling loss.
Note that the returned HotList has unbounded memory consumption.
Click to show internal directories.
Click to hide internal directories.