[GAP Forum] question about translations

Alexander Hulpke hulpke at math.colostate.edu
Tue Apr 24 16:28:56 BST 2007


Dear Forum,

> I have a matrix of transformations:
> [[Transformation([1,2]),Transformation([2,2])],
> [Transformation([2,2]),Transformation([2,2])],
> [Transformation([1,2]),Transformation([2,1])]]
>
> and I want to replace
>
> [Transformation([1,2]) by 1;
> [Transformation([2,2]) by 2;
> [Transformation([2,1]) by 3

A rather simple way is to use `Position':

t:=[Transformation([1,2]),Transformation([2,2]),Transformation([2,1])];
matn:=List(mat,i->List(i,j->Position(t,j)));

Best,

     Alexander Hulpke



More information about the Forum mailing list