top | item 4833655

(no title)

snoble | 13 years ago

the magic of reservoir sampling is the memory footprint is the size of the output while being completely random. In this particular implementation the order of the output is slightly biased but each row has an equal chance of being in the output.

discuss

order

snoble|13 years ago

but yes. it has to wait until the stream is done before producing any output.