Struct collections::slice::PermutationsUnstable [-]  [+] [src]

pub struct Permutations<T> {
    // some fields omitted
}

An iterator that uses ElementSwaps to iterate through all possible permutations of a vector.

The first iteration yields a clone of the vector as it is, then each successive element is the vector with one swap applied.

Generates even and odd permutations alternately.

Trait Implementations

impl<T: Clone> Iterator<Vec<T>> for Permutations<T>

fn next(&mut self) -> Option<Vec<T>>

fn size_hint(&self) -> (uint, Option<uint>)