[−][src]Function natural_slice::permutation::decode_permutation
pub fn decode_permutation<'a, T: Ord + Clone, ToDecode: TryInto<usize>>(
permutation: ToDecode,
data: &'a [T]
) -> Result<Vec<T>, ToDecode::Error>
Decode a permutation number into a unique slice's permutation
Take as input the permutation number produced by encode_permutation
and a slice with each
element of the set in an arbitrary order.
Output a Vec with the data ordered in the unique permutation that matches this permutation number.