Suppose I want to write an algorithm in GL(3,5), where my main loop actually traverses through the conjugacy class representatives of the group. Here is an example:
G:=GL(3,5);
cl:=ConjugacyClasses(G);
for g in cl do
%body of the loop which involves some operation on g;
od;
Now, the compiler is returning some error message. I think that the main problem is probably that the elements in cl are not being treated as elements of the group and hence it is unable to perform any sort of group operation on the elements of cl. I would like to know the remedy for this.
Thank you in advance!
The elemengs of
clare classes, not representatives. If you useand then iterate
you will get the desired behavior.