permutearray - eisclimber/ExPresS-XR GitHub Wiki

QuizUtility.PermuteArray(T[],int[])

Method in QuizUtility

Summary

Permutes an array using the given permutation as indices. Both arrays must be of same length. Entries in the permutation array less 0 will be ignored and no entries will be added.

public static T[] PermuteArray<T>(T[] array, int[] permutation)

Parameters

Name Description
T[] array Array to be permuted.
int[] permutation Permutation to be applied.

Type Parameters

Name Description
T Type of the permuted array.

Returns

A permuted array.

⚠️ **GitHub.com Fallback** ⚠️