Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve some reported minor issues #3879

Merged
merged 3 commits into from
Feb 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/ref/meataxe.xml
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ and <A>change</A> is the base change from <A>bas</A> to <A>sub</A>

<Description>
creates a new module corresponding to the action of <A>module</A> on
the non-trivial submodule
<A>sub</A>.
In the <C>NB</C> version the basis <A>sub</A> must be normed.
(That is it must be in echelon form with pivots normed to 1,
Expand All @@ -405,7 +406,7 @@ see&nbsp;<Ref Func="MTX.NormedBasisAndBaseChange"/>.)

<Description>
creates a new module corresponding to the action of <A>module</A> on the
factor of <A>sub</A>. If <A>compl</A> is given, it has to be a basis of a
factor of the proper submodule <A>sub</A>. If <A>compl</A> is given, it has to be a basis of a
(vector space-)complement of <A>sub</A>. The action then will correspond to
<A>compl</A>.
<P/>
Expand Down
1 change: 1 addition & 0 deletions lib/combinat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2466,6 +2466,7 @@ InstallGlobalFunction(AssociatedPartition,function(lambda)
local res, k, j;
res := [];
k := Length(lambda);
if k=0 then return res;fi; # empty partition
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minimal test which just executes AssociatedPartition([]); would be nice.

for j in [1..lambda[1]] do
if j <= lambda[k] then
res[j] := k;
Expand Down
13 changes: 1 addition & 12 deletions lib/meataxe.gi
Original file line number Diff line number Diff line change
Expand Up @@ -3128,17 +3128,6 @@ local a,u,i,nb;
end;
SMTX.BasesMinimalSupermodules:=SMTX_BasesMinimalSupermodules;

SMTX_BasisRadical:=function(module)
local m,i,r;
m:=SMTX.BasesMaximalSubmodules(module);
r:=m[1];
for i in [2..Length(m)] do
r:=SumIntersectionMat(r,m[i])[2];
od;
return r;
end;
SMTX.BasisRadical:=SMTX_BasisRadical;

#############################################################################
##
#F SMTX.SpanOfMinimalSubGModules(m1, m2) . .
Expand Down Expand Up @@ -3182,7 +3171,7 @@ local cf, mat, i;
cf:=SMTX.CollectedFactors(module);
mat:=Concatenation(List(cf,i->SMTX_SpanOfMinimalSubGModules(i[1],module)));
if Length(cf) = 1 then
return mat;
return ImmutableMatrix(module.field,mat);
fi;
TriangulizeMat(mat);
mat:=ImmutableMatrix(module.field,mat);
Expand Down
6 changes: 6 additions & 0 deletions tst/testinstall/combinat.tst
Original file line number Diff line number Diff line change
Expand Up @@ -498,5 +498,11 @@ gap> Print(List( [0..14], Bernoulli ),"\n");
gap> Bernoulli( 80 );
-4603784299479457646935574969019046849794257872751288919656867/230010

# AssociatedPartition
gap> AssociatedPartition([]);
[ ]
gap> AssociatedPartition(Concatenation([7],ListWithIdenticalEntries(99,1)));
[ 100, 1, 1, 1, 1, 1, 1 ]

# thats it for the combinatorical package ##################################
gap> STOP_TEST( "combinat.tst", 1);