fn random_index_subset(n: usize, r: usize) -> Vec<usize> {
        let mut mask = vec![false; n];
        for _ in 0..r {
            let u = rand::random::<usize>() % mask.len();
            mask[u] = true;
        }
        mask.iter().enumerate().filter(|(_, &x)| x).map(|(i, _)| i).collect()
    }
// a nonempty set of max size r containing indices into a vec of length n, in sorted order
a nonempty set of max size r containing indices into a vec of length n, in sorted order
a nonempty set of max size r containing indices into a vec of length n in sorted order
fn random_index_subset(n: usize, r: usize) -> Vec<usize> {
        let mut mask = vec![false; n];
        for _ in 0..r {
            let u = rand::random::<usize>() % mask.len();
            mask[u] = true;
        }
        mask.iter().enumerate().filter(|(_, &x)| x).map(|(i, _)| i).collect()
    }
fn random_index_subset ( n : usize , r : usize ) -> Vec < usize > { let mut mask = vec ! [ false n ] ; for _ in 0 .. r { let u = rand :: random :: < usize > ( ) % mask . len ( ) ; mask [ u ] = true ; } mask . iter ( ) . enumerate ( ) . filter ( | ( _ , & x ) | x ) . map ( | ( i , _ ) | i ) . collect ( ) }
a nonempty set of max size r containing indices into a vec of length n, in sorted order
a nonempty set of max size r containing indices into a vec of length n in sorted order
n
usize
r
usize
n
usize
r
usize