topk

package
Version: v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL