Macros§
- define_
rng - Use this to define a unique type which will be used as a key to retrieve
an independent rng instance when calling
.get_rng
.
Traits§
Functions§
- sample_
multiple_ from_ known_ length - Sample multiple random elements uniformly without replacement from a container of known length.
This function assumes
set.len() >= requested
. - sample_
multiple_ l_ reservoir - Sample multiple random elements uniformly without replacement from a container of known length. If more samples are requested than are in the set, the function returns as many items as it can.
- sample_
single_ from_ known_ length - Sample a random element uniformly from a container of known length.
- sample_
single_ l_ reservoir - Sample a random element uniformly from a container of unknown length.