fastrand icon indicating copy to clipboard operation
fastrand copied to clipboard

Add choose_multiple

Open DE0CH opened this issue 1 year ago • 0 comments

The choose_multiple function chooses multiple elements from an iterable, using the reservoir sampling algorithm. It is useful for sampling numbers from a list and generating a list of random numbers with no repetition.

Adapted from: https://docs.rs/rand/latest/rand/seq/trait.IteratorRandom.html#method.choose_multiple.

DE0CH avatar Jul 17 '22 15:07 DE0CH