|
@@ -35,9 +35,6 @@ type ExpDecaySample struct {
|
|
|
values expDecaySampleHeap
|
|
values expDecaySampleHeap
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// Force the compiler to check that ExpDecaySample implements Sample.
|
|
|
|
|
-var _ Sample = &ExpDecaySample{}
|
|
|
|
|
-
|
|
|
|
|
// Create a new exponentially-decaying sample with the given reservoir size
|
|
// Create a new exponentially-decaying sample with the given reservoir size
|
|
|
// and alpha.
|
|
// and alpha.
|
|
|
func NewExpDecaySample(reservoirSize int, alpha float64) Sample {
|
|
func NewExpDecaySample(reservoirSize int, alpha float64) Sample {
|
|
@@ -109,9 +106,6 @@ func (s *ExpDecaySample) Values() []int64 {
|
|
|
// No-op Sample.
|
|
// No-op Sample.
|
|
|
type NilSample struct{}
|
|
type NilSample struct{}
|
|
|
|
|
|
|
|
-// Force the compiler to check that ExpDecaySample implements Sample.
|
|
|
|
|
-var _ Sample = NilSample{}
|
|
|
|
|
-
|
|
|
|
|
// No-op.
|
|
// No-op.
|
|
|
func (s NilSample) Clear() {}
|
|
func (s NilSample) Clear() {}
|
|
|
|
|
|