iter-fns - v0.13.0
    Preparing search index...

    Function permute

    • 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.

      Type Parameters

      • T

      Parameters

      • xs: T[]

        array to permute

      • ixs: number[]

        permutation

      Returns void