Skip to main content
Code Review

Return to Question

Commonmark migration
Source Link

I posted [this][1]this an answer this to a question about drawing a random line from a file too large to put into memory. I hacked the below code together. In essence, this is what Reservoir Sampling does, in pseudo-code:

Is this a) efficient, and b) actually reservoir sampling (with equal odds of any line being drawn)? [1]: https://stackoverflow.com/a/12679544/1075247

I posted [this][1] an answer this to a question about drawing a random line from a file too large to put into memory. I hacked the below code together. In essence, this is what Reservoir Sampling does, in pseudo-code:

Is this a) efficient, and b) actually reservoir sampling (with equal odds of any line being drawn)? [1]: https://stackoverflow.com/a/12679544/1075247

I posted this an answer this to a question about drawing a random line from a file too large to put into memory. I hacked the below code together. In essence, this is what Reservoir Sampling does, in pseudo-code:

Is this a) efficient, and b) actually reservoir sampling (with equal odds of any line being drawn)?

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Is this a) efficient, and b) actually reservoir sampling (with equal odds of any line being drawn)? [1]: http://stackoverflow.com/a/12679544/1075247 https://stackoverflow.com/a/12679544/1075247

Is this a) efficient, and b) actually reservoir sampling (with equal odds of any line being drawn)? [1]: http://stackoverflow.com/a/12679544/1075247

Is this a) efficient, and b) actually reservoir sampling (with equal odds of any line being drawn)? [1]: https://stackoverflow.com/a/12679544/1075247

edited tags
Link
200_success
  • 145.6k
  • 22
  • 190
  • 479
clarified explanation
Source Link
Loading
added 534 characters in body
Source Link
Loading
Tweeted twitter.com/#!/StackCodeReview/status/253510171278585857
Source Link
Loading
lang-java

AltStyle によって変換されたページ (->オリジナル) /