Skip to content

Commit

Permalink
Make Zuppos(G,func) faster
Browse files Browse the repository at this point in the history
This variant of Zuppos is currently undocumented, but used internally by
LatticeByCyclicExtension. This change speeds it as follows:

1. If Zuppos(G) is already known, it is faster to simply filter that list.
2. It replaces Group(c) by Subgroup(G,[c]), which makes things faster if
   G is a IsHandledByNiceMonomorphism group (such as an automorphism group).
3. In addition, it only creates this subgroup once (not twice as before),
   which can lead to further improvements.
  • Loading branch information
fingolfin committed Sep 28, 2016
1 parent 4a96477 commit d813764
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/grplatt.gi
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,22 @@ function (G,func)
local zuppos, # set of zuppos,result
c, # a representative of a class of elements
o, # its order
h, # the subgroup < c > of G
N, # normalizer of < c >
t; # loop variable

if HasZuppos(G) then
return Filtered(Zuppos(G), c -> func(Subgroup(G,[c])));
fi;

# compute the zuppos
zuppos:=[One(G)];
for c in List(ConjugacyClasses(G),Representative) do
o:=Order(c);
if func(Group(c)) and IsPrimePowerInt(o) then
h:=Subgroup(G,[c]);
if IsPrimePowerInt(o) and func(h) then
if ForAll([2..o],i -> Gcd(o,i) <> 1 or not c^i in zuppos) then
N:=Normalizer(G,Subgroup(G,[c]));
N:=Normalizer(G,h);
for t in RightTransversal(G,N) do
Add(zuppos,c^t);
od;
Expand Down

0 comments on commit d813764

Please sign in to comment.