Add a link to the algorithm implemented: http://en.wikipedia.org/wiki/Reservoir_sampling
also rand_generated doesn't follow variable's naming convention.