Struct std::slice::Permutations[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<T: Clone>(&mut self) -> Option<Vec<T>>

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

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

fn chain<U: Iterator<Vec<T>>>(self, U) -> Chain<Permutations<T>, U>

fn zip<B, U: Iterator<B>>(self, U) -> Zip<Permutations<T>, U>

fn map<B>(self, |Vec<T>|: 'r -> B) -> Map<'r, Vec<T>, B, Permutations<T>>

fn filter<T: Clone>(self, |&Vec<T>|: 'r -> bool) -> Filter<'r, Vec<T>, Permutations<T>>

fn filter_map<B>(self, |Vec<T>|: 'r -> Option<B>) -> FilterMap<'r, Vec<T>, B, Permutations<T>>

fn enumerate<T: Clone>(self) -> Enumerate<Permutations<T>>

fn peekable<T: Clone>(self) -> Peekable<Vec<T>, Permutations<T>>

fn skip_while<T: Clone>(self, |&Vec<T>|: 'r -> bool) -> SkipWhile<'r, Vec<T>, Permutations<T>>

fn take_while<T: Clone>(self, |&Vec<T>|: 'r -> bool) -> TakeWhile<'r, Vec<T>, Permutations<T>>

fn skip<T: Clone>(self, uint) -> Skip<Permutations<T>>

fn take<T: Clone>(self, uint) -> Take<Permutations<T>>

fn scan<St, B>(self, St, |&mut St, Vec<T>|: 'r -> Option<B>) -> Scan<'r, Vec<T>, B, Permutations<T>, St>

fn flat_map<B, U: Iterator<B>>(self, |Vec<T>|: 'r -> U) -> FlatMap<'r, Vec<T>, Permutations<T>, U>

fn fuse<T: Clone>(self) -> Fuse<Permutations<T>>

fn inspect<T: Clone>(self, |&Vec<T>|: 'r) -> Inspect<'r, Vec<T>, Permutations<T>>

fn by_ref<T: Clone>(&'r mut self) -> ByRef<'r, Permutations<T>>

fn advance<T: Clone>(&mut self, |Vec<T>| -> bool) -> bool

fn collect<B: FromIterator<Vec<T>>>(&mut self) -> B

fn nth<T: Clone>(&mut self, uint) -> Option<Vec<T>>

fn last<T: Clone>(&mut self) -> Option<Vec<T>>

fn fold<B>(&mut self, B, |B, Vec<T>| -> B) -> B

fn count<T: Clone>(&mut self) -> uint

fn all<T: Clone>(&mut self, |Vec<T>| -> bool) -> bool

fn any<T: Clone>(&mut self, |Vec<T>| -> bool) -> bool

fn find<T: Clone>(&mut self, |&Vec<T>| -> bool) -> Option<Vec<T>>

fn position<T: Clone>(&mut self, |Vec<T>| -> bool) -> Option<uint>

fn max_by<B: Ord>(&mut self, |&Vec<T>| -> B) -> Option<Vec<T>>

fn min_by<B: Ord>(&mut self, |&Vec<T>| -> B) -> Option<Vec<T>>