reservoir

Unweighted reservoir sampling

https://github.com/ahaym/reservoir

Latest on Hackage:0.2.0.0

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD-3-Clause licensed by Mark Hay
Maintained by [email protected]

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.