Re:Vitter's reservoir sampling algorithm D: randomly selecti...
by vrfcodf on Monday April 04, 2016 @04:07AM
(#11420164)
MLCG is sequential. No value will be repeated within the period.
[ Parent
| on HN ]
Re:Vitter's reservoir sampling algorithm D: randomly selecti...
by tomp on Monday April 04, 2016 @04:17AM
(#11420197)
"sequential" in the sense that if returned values are i1, i2, ..., in, then 0 <= i1 < i2 < ... < in <= N.
A MLCG will return numbers all over the place; sorting them will take an additional O(n log n) time.
Re:Vitter's reservoir sampling algorithm D: randomly selecti...
by vrfcodf on Monday April 04, 2016 @04:22AM
(#11420220)
I see.
Re:Vitter's reservoir sampling algorithm D: randomly selecti...
by tomsmeding on Monday April 04, 2016 @04:15AM
(#11420188)
He means: outputs are sorted.