Skip to content

Commit

Permalink
TEST: get best/acheived degree
Browse files Browse the repository at this point in the history
NEW

NEW2
  • Loading branch information
hulpke committed Jan 21, 2020
1 parent 6ac18ee commit d35e37f
Showing 1 changed file with 22 additions and 27 deletions.
49 changes: 22 additions & 27 deletions lib/morpheus.gi
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,9 @@ local hom, allinner, gens, c, ran, r, cen, img, dom, u, subs, orbs, cnt,
SetIsGroupHomomorphism(hom,true);
SetIsBijective(hom,true);
SetFilterObj(hom,IsNiceMonomorphism);
AppendTo("~/autgrpdegrees",
"[",Size(g),",",baddegree,",",NrMovedPoints(Image(hom)),
",",Size(Image(hom)),",",IsPermGroup(g),"],\n");
SetNiceMonomorphism(au,hom);
SetIsHandledByNiceMonomorphism(au,true);
end;
Expand All @@ -385,7 +388,7 @@ local hom, allinner, gens, c, ran, r, cen, img, dom, u, subs, orbs, cnt,
if HasAsSSortedList(clas) then
return AsSSortedList(clas);
else
return MakeImmutable(Set(Orbit(g,Representative(clas))));
return Immutable(Set(Orbit(g,Representative(clas))));
fi;
end;

Expand All @@ -398,15 +401,28 @@ local hom, allinner, gens, c, ran, r, cen, img, dom, u, subs, orbs, cnt,
SetIsFinite(au,true);
fi;

actbase:=ValueOption("autactbase");

bestdeg:=infinity;
# what degree would we consider immediately acceptable?
if actbase<>fail then
baddegree:=RootInt(Sum(actbase,Size)^2,3);
else
baddegree:=RootInt(Size(g)^3,4);
fi;
if IsPermGroup(g) then baddegree:=Minimum(baddegree,Maximum(2000,NrMovedPoints(g)*10));fi;
Info(InfoMorph,4,"degree limit ",baddegree);

if IsFpGroup(g) then
# no sane person should work with automorphism groups of fp groups, as
# this is doubly inefficient, but if someone really does, this is a
# shortcut that avoids canonization issues.
# this is doubly inefficient,but if someone really does, this is a
#shortcut that avoids canonization issues.
c:=Filtered(Elements(g),x->not IsOne(x));
hom:=ActionHomomorphism(au,c,
function(e,a) return Image(a,e);end,"surjective");
finish(hom); return;
elif IsAbelian(g) or (Size(g)<50000 and Size(DerivedSubgroup(g))^2<Size(g)) then
elif IsAbelian(g)
or (Size(g)<50000 and Size(DerivedSubgroup(g))^2<Size(g)) then
# for close to abelian groups, just act on orbits of generators
if IsAbelian(g) then
gens:=IndependentGeneratorsOfAbelianGroup(g);
Expand Down Expand Up @@ -464,18 +480,6 @@ local hom, allinner, gens, c, ran, r, cen, img, dom, u, subs, orbs, cnt,
fi;
fi;

actbase:=ValueOption("autactbase");

bestdeg:=infinity;
# what degree would we consider immediately acceptable?
if actbase<>fail then
baddegree:=RootInt(Sum(actbase,Size)^2,3);
else
baddegree:=RootInt(Size(g)^3,4);
fi;
if IsPermGroup(g) then baddegree:=Minimum(baddegree,Maximum(2000,NrMovedPoints(g)*10));fi;
Info(InfoMorph,4,"degree limit ",baddegree);

ser:=StructuralSeriesOfGroup(g);
# eliminate very small subgroups -- there are just very few elements in
r:=RootInt(Size(ser),4);
Expand Down Expand Up @@ -533,11 +537,7 @@ local hom, allinner, gens, c, ran, r, cen, img, dom, u, subs, orbs, cnt,
while Size(u)<Size(g) do
if Size(u)>1 then SortBy(c,Size);fi; # once an outside class is known, sort
of:=First(c,x->not Representative(x) in u);
if MemoryUsage(Representative(of))*Size(of)
# if a single class only requires
<10000
# for element storage, just store its elements
then
if SIZE_OBJ(Representative(of))*Size(of)<10000 then
of:=Orbit(auo,claselms(of),OnSets);
elif preproc<>fail then
of:=List(Orbit(auo,preproc(of),action),postproc);
Expand Down Expand Up @@ -598,12 +598,7 @@ local hom, allinner, gens, c, ran, r, cen, img, dom, u, subs, orbs, cnt,
# no need to process classes that will not improve
and Size(c[1])<bestdeg-offset then
if Length(c)>1 then
if Size(c[1])<250 and
MemoryUsage(Representative(c[1]))*Size(c[1])*Length(c)
# at most
<10^7
# bytes storage
then
if Size(c[1])<250 and SIZE_OBJ(Representative(c[1]))*Size(c[1])*Length(c)<10^7 then
c:=List(c,claselms);
Sort(c);
Info(InfoMorph,4,"Element sets");
Expand Down

0 comments on commit d35e37f

Please sign in to comment.