Skip to content

Commit

Permalink
Construct all projections and embeddings before efficient in test
Browse files Browse the repository at this point in the history
  • Loading branch information
FriedrichRober committed Oct 21, 2024
1 parent 4e79479 commit 543140f
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions gap/WreathProductElements.gi
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,17 @@ end);

InstallMethod( \in, "perm, and perm wreath product", true,[IsPerm, IsPermGroup and HasWreathProductInfo], OVERRIDENICE + 42,
function(g, G)
local info;
local info, i;
info := WreathProductInfo(G);
if not IsBound(info.projection) then
if not IsBound(info.constructingProjection) then
info.constructingProjection := true;
if not IsBound(info.projection) or Length(info.embeddings) < NrMovedPoints(info.I) + 1 then
if not IsBound(info.constructingMaps) then
info.constructingMaps := true;
for i in [1 .. NrMovedPoints(info.I) + 1] do
Embedding(G, i);
od;
Projection(G);
else
info.constructingProjection := false;
elif info.constructingMaps then
TryNextMethod();
fi;
fi;
Expand All @@ -48,13 +52,17 @@ end);

InstallMethod( \in, "matrix, and matrix wreath product", true, [IsMatrix, IsMatrixGroup and HasWreathProductInfo], OVERRIDENICE + 42,
function(g, G)
local info;
local info, i;
info := WreathProductInfo(G);
if not IsBound(info.projection) then
if not IsBound(info.constructingProjection) then
info.constructingProjection := true;
if not IsBound(info.projection) or Length(info.embeddings) < NrMovedPoints(info.I) + 1 then
if not IsBound(info.constructingMaps) then
info.constructingMaps := true;
for i in [1 .. NrMovedPoints(info.I) + 1] do
Embedding(G, i);
od;
Projection(G);
else
info.constructingProjection := false;
elif info.constructingMaps then
TryNextMethod();
fi;
fi;
Expand Down

0 comments on commit 543140f

Please sign in to comment.