Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Rand = rand.Float64
View Source
var RandCoin = rand.Int31n
Functions ¶
This section is empty.
Types ¶
type FDeltaPair ¶
type LossyCounter ¶
type LossyCounter struct { Support float64 ErrorTolerance float64 D map[string]FDeltaPair N uint64 BucketWidth uint64 }
func NewLossyCounter ¶
func NewLossyCounter(support, errorTolerance float64) *LossyCounter
func (*LossyCounter) ItemsAboveThreshold ¶
func (lc *LossyCounter) ItemsAboveThreshold(threshold float64) []Entry
ItemsAboveThreshold returns a list of items that occur more than threshold, along with their frequencies. threshold is in the range [0,1]
func (*LossyCounter) Observe ¶
func (lc *LossyCounter) Observe(key string)
Observe records a new sample
type NaiveSampler ¶
type NaiveSampler struct { N uint64 // contains filtered or unexported fields }
func NewNaiveSampler ¶
func NewNaiveSampler() *NaiveSampler
func (*NaiveSampler) ItemsAboveThreshold ¶
func (ns *NaiveSampler) ItemsAboveThreshold(val float64) []Entry
func (*NaiveSampler) Observe ¶
func (ns *NaiveSampler) Observe(key string)
type StickySampler ¶
type StickySampler struct { ErrorTolerance float64 Support float64 S map[string]float64 R float64 FailureProb float64 N float64 T float64 RequiredSamples int }
func NewSampler ¶
func NewSampler(Support, ErrorTolerance, FailureProb float64) *StickySampler
func (*StickySampler) ItemsAboveThreshold ¶
func (s *StickySampler) ItemsAboveThreshold(threshold float64) []Entry
ItemsAboveThreshold returns a list of items that occur more than threshold, along with their frequencies. threshold is in the range [0,1]
func (*StickySampler) Observe ¶
func (s *StickySampler) Observe(key string)
Observe records a new sample
Click to show internal directories.
Click to hide internal directories.