pub type KPermutationParams<'a, T> = (&'a [T], usize);Expand description
A pair of parameter that allow Permutation trait
to create k-permutation iterator from it.
This type is used exclusively in trait Permutation
§Format
- First value in tuple is
&'a [T]. It’s a source data to generate k-permutation. - Second value in tuple is
usize. It’sksize which shall be less thannwherenis a length of the first value.
Trait Implementations§
Source§impl<'a, T> Permutation<'a> for KPermutationParams<'a, T>
impl<'a, T> Permutation<'a> for KPermutationParams<'a, T>
Source§type Permutator = KPermutationIterator<'a, T>
type Permutator = KPermutationIterator<'a, T>
A permutation generator for a collection of data. Read more
Source§fn permutation(&'a mut self) -> KPermutationIterator<'a, T> ⓘ
fn permutation(&'a mut self) -> KPermutationIterator<'a, T> ⓘ
Create a permutation based on Heap’s algorithm.
It return HeapPermutation object.