Module rand::seq[][src]

Functions for randomly accessing and sampling sequences.

Re-exports

use super::Rng;
use std::collections::HashMap;

Functions

sample_indices

Randomly sample exactly amount indices from 0..length.

sample_indices_cache

This method performs a partial fisher-yates on a range of indices using a HashMap as a cache to record potential collisions.

sample_indices_inplace

Sample an amount of indices using an inplace partial fisher yates method.

sample_iter

Randomly sample amount elements from a finite iterator.

sample_slice

Randomly sample exactly amount values from slice.

sample_slice_ref

Randomly sample exactly amount references from slice.