Skip to content

Commit

Permalink
RingMapOntoRewrittenResidueClassRing avoids creating a new ring if no…
Browse files Browse the repository at this point in the history
…t necessary
  • Loading branch information
mohamed-barakat committed May 10, 2019
1 parent 0818f01 commit 9af140d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion MatricesForHomalg/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PackageName := "MatricesForHomalg",
Subtitle := "Matrices for the homalg project",

Version := Maximum( [
"2019.02.10", ## Mohamed's version
"2019.02.12", ## Mohamed's version
## this line prevents merge conflicts
"2019.02.11", ## Fabian's version
## this line prevents merge conflicts
Expand Down
9 changes: 6 additions & 3 deletions MatricesForHomalg/gap/Tools.gi
Original file line number Diff line number Diff line change
Expand Up @@ -7269,9 +7269,12 @@ InstallMethod( RingMapOntoRewrittenResidueClassRing,

zero_rows := ZeroRows( matrix - images );

indets := indets{zero_rows};

S := k * List( indets, String );
if Length( indets ) = Length( zero_rows ) then
S := A;
else
indets := indets{zero_rows};
S := k * List( indets, String );
fi;

if not zero_rows = [ ] then
map := RingMap( indets, S, R );
Expand Down

0 comments on commit 9af140d

Please sign in to comment.