Skip to content

Commit

Permalink
Fixup last3
Browse files Browse the repository at this point in the history
  • Loading branch information
James Mitchell committed Mar 29, 2018
1 parent b3d6d3b commit 354cb5d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
17 changes: 10 additions & 7 deletions src/pperm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3681,13 +3681,16 @@ Obj PowPPerm2Perm4(Obj f, Obj p)
ptp = ADDR_PERM4(p);
dom = DOM_PPERM(f);
// find deg of conjugate
GAP_ASSERT(dep > deg);

degconj = 0;
for (i = 1; i <= rank; i++) {
j = INT_INTOBJ(ELM_PLIST(dom, i)) - 1;
if (ptp[j] >= degconj)
degconj = ptp[j] + 1;
if (deg > dep) {
degconj = deg;
}
else {
degconj = 0;
for (i = 1; i <= rank; i++) {
j = INT_INTOBJ(ELM_PLIST(dom, i)) - 1;
if (ptp[j] >= degconj)
degconj = ptp[j] + 1;
}
}

conj = NEW_PPERM4(degconj);
Expand Down
16 changes: 8 additions & 8 deletions tst/testinstall/pperm.tst
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ gap> MeetOfPartialPerms(PartialPerm([1]), PartialPerm([2]));
gap> MeetOfPartialPerms(PartialPerm([1]), PartialPerm([1, 2]));
<identity partial perm on [ 1 ]>
gap> MeetOfPartialPerms([]);
Error, usage: the argument should be a collection of partial perms,
Error, usage: the argument should be a collection of partial perms,
gap> MeetOfPartialPerms([PartialPerm([1]), PartialPerm([1, 2])]);
<identity partial perm on [ 1 ]>
gap> MeetOfPartialPerms(SymmetricInverseMonoid(3));
Expand Down Expand Up @@ -3332,7 +3332,7 @@ gap> PartialPermOpNC(PartialPerm([1]), SymmetricInverseMonoid(1));
gap> RandomPartialPerm(4);;
gap> RandomPartialPerm(2 ^ 60);
Error, usage: the argument must be a positive integer, a set, or 2 sets, of po\
sitive integers,
sitive integers,
gap> f := RandomPartialPerm([4 .. 10]);;
gap> IsSubset([4 .. 10], DomainOfPartialPerm(f));
true
Expand All @@ -3345,25 +3345,25 @@ gap> IsSubset([1 .. 5], ImageSetOfPartialPerm(f));
true
gap> f := RandomPartialPerm([1, 2 ^ 60]);
Error, usage: the argument must be a positive integer, a set, or 2 sets, of po\
sitive integers,
sitive integers,
gap> f := RandomPartialPerm([3, 1, 2]);
Error, usage: the argument must be a positive integer, a set, or 2 sets, of po\
sitive integers,
sitive integers,
gap> f := RandomPartialPerm([1 .. 3], [3, 1, 2]);
Error, usage: the argument must be a positive integer, a set, or 2 sets, of po\
sitive integers,
sitive integers,
gap> f := RandomPartialPerm([3, 1, 2], [1 .. 3]);
Error, usage: the argument must be a positive integer, a set, or 2 sets, of po\
sitive integers,
sitive integers,
gap> f := RandomPartialPerm([3, 1, 2], [1, 3, 2 ^ 60]);
Error, usage: the argument must be a positive integer, a set, or 2 sets, of po\
sitive integers,
sitive integers,
# PartialPermNC
gap> PartialPermNC(1, 2, 3);
Error, usage: there should be one or two arguments,
gap> PartialPerm(1, 2, 3);
Error, usage: there should be one or two arguments,
Error, usage: there should be one or two arguments,
gap> PartialPerm([1, 2, 2 ^ 60]);
Error, usage: the argument must be a list of non-negative integers and the non\
-zero elements must be duplicate-free,
Expand Down

0 comments on commit 354cb5d

Please sign in to comment.