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
Context::get_rng.
Traits§
Functions§
- count_
and_ sample_ single_ l_ reservoir - Count elements and sample one element uniformly from an iterator of unknown length.
- sample_
multiple_ from_ known_ length - Samples
requestedelements uniformly at random without replacement from an iterator whose length is known at runtime. Requireslen >= requested. - sample_
multiple_ l_ reservoir - Sample multiple random elements uniformly without replacement from a container of unknown 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 - Samples one element uniformly at random from an iterator whose length is known at runtime.
- sample_
single_ l_ reservoir - Sample a random element uniformly from an iterator of unknown length.