Skip to content

Commit

Permalink
Added more expensive test.
Browse files Browse the repository at this point in the history
Also included `sisyphus` option to force extra work for testing and
minor code cleanup by using `Remove`.
  • Loading branch information
hulpke committed Sep 27, 2018
1 parent b6f633d commit d5d687b
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 6 deletions.
29 changes: 23 additions & 6 deletions lib/csetgrp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -851,12 +851,23 @@ local live,orbs,orbset,done,nr,p,o,os,orbitextender,bahn,i,j,enum,dict,map,pam;
if IsBound(map[j]) and map[j]>i then map[j]:=map[j]-1; fi;
od;

p:=[i..Length(orbs)-1];
orbs{p}:=orbs{p+1};Unbind(orbs[Length(orbs)]);
orbset{p}:=orbset{p+1};Unbind(orbset[Length(orbset)]);
done{p}:=done{p+1};Unbind(done[Length(done)]);
bahn{p}:=bahn{p+1};Unbind(bahn[Length(bahn)]);
pam{p}:=pam{p+1};Unbind(pam[Length(pam)]);
<<<<<<< HEAD
# Remove entry i, i.e.
#p:=[i..Length(orbs)-1];
#orbs{p}:=orbs{p+1};Unbind(orbs[Length(orbs)]);
=======
#p:=[i..Length(orbs)-1];
#orbs{p}:=orbs{p+1};Unbind(orbs[Length(orbs)]);
#orbset{p}:=orbset{p+1};Unbind(orbset[Length(orbset)]);
#done{p}:=done{p+1};Unbind(done[Length(done)]);
#bahn{p}:=bahn{p+1};Unbind(bahn[Length(bahn)]);
#pam{p}:=pam{p+1};Unbind(pam[Length(pam)]);
>>>>>>> 57ac0bd2e... Added `sisyphus` option to force extra work for testing
Remove(orbs,i);
Remove(orbset,i);
Remove(done,i);
Remove(bahn,i);
Remove(pam,i);
else
done[i]:=-p;
fi;
Expand Down Expand Up @@ -1029,6 +1040,12 @@ local c, flip, maxidx, refineChainActionLimit, cano, tryfct, p, r, t,

fi;

elif ValueOption("sisyphus")=true then
# purely to allow for tests of up-step mechanism in smaller examples.
# This is creating unneccessary extra work and thus should never be used
# in practice, but will force some code to be run through.
c:=Concatenation([TrivialSubgroup(G)],c);
cano:=true;
fi;

r:=[One(G)];
Expand Down
19 changes: 19 additions & 0 deletions tst/testextra/doublecoset.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#############################################################################
##
#W doublecoset.tst Alexander Hulpke
##
##
#Y Copyright (C) 1997, Lehrstuhl D für Mathematik, RWTH Aachen, Germany
##
## This file tests for double coset calculations
##
gap> START_TEST("doublecoset.tst");
gap> g:=SimpleGroup("Co3");;
gap> m:=MaximalSubgroupClassReps(g);;
gap> u:=First(m,x->Index(g,x)=17931375);;
gap> dc:=DoubleCosetRepsAndSizes(g,u,u);;
gap> Length(dc);Sum(dc,x->x[2])=Size(g);
913
true

gap> STOP_TEST( "doublecoset.tst", 1);
8 changes: 8 additions & 0 deletions tst/teststandard/permgrp.tst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ gap> p:=Image(IsomorphismPermGroup(g));;
gap> s:=SylowSubgroup(p,7);;
gap> Length(IntermediateSubgroups(p,s).subgroups);
71
gap> g:=SymmetricGroup(9);;s:=SylowSubgroup(g,3);;
gap> dc:=DoubleCosetRepsAndSizes(g,s,s);;
gap> Length(dc);Sum(dc,x->x[2])=Size(g);
88
true
gap> dc1:=DoubleCosetRepsAndSizes(g,s,s:sisyphus);;
gap> Collected(List(dc,x->x[2]))=Collected(List(dc1,x->x[2]));
true

# Unbind variables so we can GC memory
gap> Unbind(g); Unbind(dc); Unbind(ac); Unbind(g); Unbind(p); Unbind(s);
Expand Down

0 comments on commit d5d687b

Please sign in to comment.