[GAP Forum] ListPerm
Laurent Bartholdi
laurent.bartholdi at gmail.com
Fri Dec 16 12:22:12 GMT 2005
Hi,
In the course of programming some stuff, it's been useful for me to
use ListPerm with a specified length of result. I coded:
MyListPerm := function(perm,n)
local l;
l := ListPerm(perm);
Append(l,[Length(l)+1..n]);
return l;
end;
gap> ListPerm((1,2));
[ 2, 1 ]
gap> MyListPerm((1,2),3);
[ 2, 1, 3 ]
gap> PermList(MyListPerm((1,2),3));
(1,2)
Maybe this is of general interest, and should be coded as another
method for ListPerm?
Best, Laurent
--
Laurent Bartholdi \ laurent.bartholdi<at>gmail<dot>com
EPFL SB SMA IMB MAD \ Téléphone: +41 21-6930380
CH-1015 Lausanne, Switzerland \ Fax: +41 21-6930385
More information about the Forum
mailing list