Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReservoirSampling ¶
type ReservoirSampling[T any] struct { // contains filtered or unexported fields }
ReservoirSampling selects k items from a stream of unknown size
func NewReservoirSampling ¶
func NewReservoirSampling[T any](k int) *ReservoirSampling[T]
func (*ReservoirSampling[T]) Add ¶
func (r *ReservoirSampling[T]) Add(v T)
Click to show internal directories.
Click to hide internal directories.