Function eytzinger::eytzingerize
[−]
[src]
pub fn eytzingerize<T, P: Permutator<T, PermutationGenerator>>(
data: &mut [T],
permutator: &mut P
)
Converts a sorted array to its eytzinger representation.
Example
let mut data = [0, 1, 2, 3, 4, 5, 6]; eytzinger::eytzingerize(&mut data, &mut eytzinger::permutation::InplacePermutator); assert_eq!(data, [3, 1, 5, 0, 2, 4, 6]);