GAP Manual: 27.31. Permuted

Permuted( list, perm )

Permuted returns a new list new that contains the elements of the list list permuted according to the permutation perm. That is new[i^perm] = list[i].

    gap> Permuted( [ 5, 4, 6, 1, 7, 5 ], (1,3,5,6,4) );
    [ 1, 4, 5, 5, 6, 7 ] 

Sortex (see Sortex) allows you to compute the permutation that must be applied to a list to get the sorted list.


[next] [prev] [up]