Permutes an array in-place using an array of indices.
ixs must have the same length as xs, and must contain all indices from 0 to
|xs|. If ixs is not valid, this function will infinitely loop.
Note that this will mutate both the items array and the permutations array.
The permutation array will become the identity permutation [0, 1, ..., |xs|].
Permutes an array in-place using an array of indices.
ixs must have the same length as xs, and must contain all indices from 0 to |xs|. If ixs is not valid, this function will infinitely loop.
Note that this will mutate both the items array and the permutations array. The permutation array will become the identity permutation [0, 1, ..., |xs|].
This uses a cycle-based permutation strategy.