20.9 PermList

PermList( list )

PermList returns the permutation perm that moves points as describes by the list list. That means that i^perm = list[i] if i lies between 1 and the length of list, and i^perm = i if i is larger than the length of the list list. It will signal an error if list does not define a permutation, i.e., if list is not a list of integers without holes, or if list contains an integer twice, or if list contains an integer not in the range [1..Length(list)].

    gap> PermList( [6,2,4,1,5,3] );
    (1,6,3,4)
    gap> PermList( [] );
    () 

ListPerm (see ListPerm) performs the inverse operation.

Previous Up Top Next
Index

GAP 3.4.4
April 1997