Description
Unweighted reservoir sampling.
Description
From https://en.wikipedia.org/wiki/Reservoir_sampling: "Reservoir sampling is a family of randomized algorithms for randomly choosing a sample of k items from a list S containing n items, where n is either a very large or unknown number. Typically n is large enough that the list doesn't fit into main memory." This package implements Jeffrey Vitter's Algorithm R http://www.cs.umd.edu/~samir/498/vitter.pdf, suitable for unweighted sampling from a collection of unknown size.