I hereby claim:
- I am robfitzgerald on github.
- I am robfitzgerald (https://keybase.io/robfitzgerald) on keybase.
- I have a public key ASBxo5zkWB5tWZDivZ2hAv0LTgmZQq1meoRBxtZhESzqeQo
To claim this, I am signing this object:
import scala.util.Random | |
import scala.annotation.tailrec | |
object ReservoirSampling { | |
/** | |
* Use Efraimidis and Spirakis' "Algorithm A-ExpJ" for weighted reservoir sampling | |
* without replacement. | |
* | |
* [[see https://en.wikipedia.org/wiki/Reservoir_sampling#Algorithm_A-ExpJ]] |
I hereby claim:
To claim this, I am signing this object: