permutation_iterator 0.1.2

A Rust library for iterating over random permutations using O(1) (i.e. constant) space.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use permutation_iterator::Permutor;

fn main() {
    let max = 10;

    // Since we don't pass in a key we will get a random permutation every time we run this.
    // Try it out!
    let permutor = Permutor::new(max);

    for (index, permuted) in permutor.enumerate() {
        println!("{} -> {}", index, permuted);
    }
}