Documentation
¶
Index ¶
- type LocalHeavyHitter
- type Sketch
- func (sk *Sketch) Delta() float64
- func (sk *Sketch) Epsilon() float64
- func (sk *Sketch) Insert(key string, count uint64)
- func (sk *Sketch) Marshal() ([]byte, error)
- func (sk *Sketch) Merge(other *Sketch) error
- func (sk *Sketch) Result(threshold uint64) []LocalHeavyHitter
- func (sk *Sketch) Unmarshal(p []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalHeavyHitter ¶
type Sketch ¶
type Sketch struct {
// contains filtered or unexported fields
}
func New ¶
New creates a new Topkapi Sketch with given error rate and confidence. Accuracy guarantees will be made in terms of a pair of user specified parameters, ε and δ, meaning that the error in answering a query is within a factor of ε with probability 1-δ
func NewTopK ¶
NewTopK creates a sketch suitable for finding TopK in a corpus of a given size, with an error rate of delta.