Permutation
ZPL supports non-local data movement with the permutation operators, <## gather and >## scatter
A reordering array must be provided for each dimension
Let Order = 5 4 3 2 1 and Data = ‘ABCDE’
[1..5] Result := <##[Order] Data;
Then Result = ‘EDCBA’
A common operation is transpose:
[1..n,1..n] AT := <##[Index2,Index1] A;
Permutation is ZPL’s most expensive operator