<reservoir-sampler> ( k -- sampler )
Reservoir Sampling

Next:reservoir-sample ( obj sampler -- )


Vocabulary
reservoir-sampling

Inputs
kan integer


Outputs
sampleran object


Word description
Creates an object that will hold k samples from everything it sees with equal probability. To show a reservoir-sampler an object, call reservoir-sample.

Definition