Documentation
¶
Overview ¶
Package sample solves problem of choosing k random elements with weights from some(potentially big) sequence. Such problem is called Reservoir Sampling.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEmptyInput used when input sequence is empty - nothing to sample. ErrEmptyInput = errors.New("input sequence empty") // ErrTooBigSample returned when requested sample is bigger than input sequence. ErrTooBigSample = errors.New("requested sample size exceeds size of sequence") )
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.