Expand description
Low-level API for sampling indices
Enums§
- Index
Vec alloc
- A vector of indices.
- Index
VecInto Iter alloc
- Return type of
IndexVec::into_iter
. - Index
VecIter alloc
- Return type of
IndexVec::iter
.
Functions§
- sample
alloc
- Randomly sample exactly
amount
distinct indices from0..length
, and return them in random order (fully shuffled). - sample_
array - Randomly sample exactly
N
distinct indices from0..len
, and return them in random order (fully shuffled). - sample_
weighted alloc
andstd
- Randomly sample
amount
distinct indices from0..length