Documentation ¶ Index ¶ type Element type Samples func (sm Samples) Len() int func (sm Samples) Less(i, j int) bool func (sm Samples) Swap(i, j int) type Stream func New(k int) *Stream func (s *Stream) Insert(x string) func (s *Stream) Merge(sm Samples) func (s *Stream) Query() Samples Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Element ¶ type Element struct { Value string Count int } type Samples ¶ type Samples []*Element func (Samples) Len ¶ func (sm Samples) Len() int func (Samples) Less ¶ func (sm Samples) Less(i, j int) bool func (Samples) Swap ¶ func (sm Samples) Swap(i, j int) type Stream ¶ type Stream struct { // contains filtered or unexported fields } func New ¶ func New(k int) *Stream func (*Stream) Insert ¶ func (s *Stream) Insert(x string) func (*Stream) Merge ¶ func (s *Stream) Merge(sm Samples) func (*Stream) Query ¶ func (s *Stream) Query() Samples Source Files ¶ View all Source files topk.go Click to show internal directories. Click to hide internal directories.