RngSubsetExtension

Trait RngSubsetExtension 

Source
pub trait RngSubsetExtension {
    // Required method
    fn subset(&mut self, m: usize, n: usize) -> Vec<usize>;
}
Expand description

An extension to Rng which allows for sampling from a subset of the integers [0..n) without replacement.

Required Methods§

Source

fn subset(&mut self, m: usize, n: usize) -> Vec<usize>

Draw a random subset of m indices between 0 and n.

Implementations on Foreign Types§

Source§

impl RngSubsetExtension for Rng

Source§

fn subset(&mut self, m: usize, n: usize) -> Vec<usize>

Implementors§