This function provides a very efficient way to pull an integer random sample sequence from an integer interval.
Details
The algorithm runs in O(length)
expected time, even if
high-low
is big. It is much faster (but of course less general) than
the builtin sample
function of R.
References
Jeffrey Scott Vitter: An Efficient Algorithm for Sequential Random Sampling, ACM Transactions on Mathematical Software, 13/1, 58–67.
See also
Other other:
convex_hull()
,
running_mean()
Author
Gabor Csardi csardi.gabor@gmail.com