Expand description
Low-level API for sampling indices
Enumsยง
- Index
Vec - A vector of indices.
- Index
VecInto Iter - Return type of
IndexVec::into_iter
. - Index
VecIter - Return type of
IndexVec::iter
.
Traitsยง
- UInt ๐
Functionsยง
- sample
- Randomly sample exactly
amount
distinct indices from0..length
, and return them in random order (fully shuffled). - sample_
efraimidis_ ๐spirakis - Randomly sample
amount
distinct indices from0..length
- sample_
floyd ๐ - Randomly sample exactly
amount
indices from0..length
, using Floydโs combination algorithm. - sample_
inplace ๐ - Randomly sample exactly
amount
indices from0..length
, using an inplace partial Fisher-Yates method. Sample an amount of indices using an inplace partial fisher yates method. - sample_
rejection ๐ - Randomly sample exactly
amount
indices from0..length
, using rejection sampling. - sample_
weighted - Randomly sample
amount
distinct indices from0..length