Trait permutohedron::LexicalPermutation [] [src]

pub trait LexicalPermutation {
    fn next_permutation(&mut self) -> bool;
    fn prev_permutation(&mut self) -> bool;
}

Permute a slice into its next or previous permutation (in lexical order).

Required Methods

fn next_permutation(&mut self) -> bool

Return true if the slice was permuted, false if it is already at the last ordered permutation.

fn prev_permutation(&mut self) -> bool

Return true if the slice was permuted, false if it is already at the first ordered permutation.

Implementors