Skip to main content

random_pair/
random_pair.rs

1use permutation_iterator::RandomPairPermutor;
2
3fn main() {
4    let xs = [1, 2, 3];
5    let ys = [4, 5, 6, 7, 8];
6
7    let permutor = RandomPairPermutor::new(xs.len() as u32, ys.len() as u32);
8    for (i, j) in permutor {
9        println!("({}, {})", xs[i as usize], ys[j as usize]);
10    }
11}