Function flow_sdk::algorithms::rand::seq::sample_slice_ref [−][src]
pub fn sample_slice_ref<R, T>(
rng: &mut R,
slice: &'a [T],
amount: usize
) -> Vec<&'a T, Global> where
R: Rng + ?Sized,
👎 Deprecated since 0.6.0:
use SliceRandom::choose_multiple instead
Expand description
Randomly sample exactly amount
references from slice
.
The references are non-repeating and in random order.
This implementation uses O(amount)
time and memory.
Panics if amount > slice.len()
Deprecated: use SliceRandom::choose_multiple
instead.