Function rusty_machine::learning::toolkit::rand_utils::reservoir_sample
[−]
[src]
pub fn reservoir_sample<T: Copy>(pool: &[T], reservoir_size: usize) -> Vec<T>
use rusty_machine::learning::toolkit::rand_utils; let mut pool = &mut [1,2,3,4]; let sample = rand_utils::reservoir_sample(pool, 3); println!("{:?}", sample);