Skip to content

Commit

Permalink
Downrank MatrixObj methods to unbreak Semigroups
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Pfeiffer committed Sep 5, 2018
1 parent e628410 commit ab46263
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions lib/matobj.gi
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ InstallMethod( Matrix,
#
InstallMethod( Matrix,
[IsSemiring, IsList, IsInt],
# FIXME: Remove this downranking, it was introduced to prevent
# Semigroups from breaking ahead of the 4.10 release
-SUM_FLAGS,
function( basedomain, list, nrCols )
local rep;
rep := DefaultMatrixRepForBaseDomain(basedomain);
Expand All @@ -187,6 +190,9 @@ InstallMethod( Matrix,

InstallMethod( Matrix,
[IsSemiring, IsList],
# FIXME: Remove this downranking, it was introduced to prevent
# Semigroups from breaking ahead of the 4.10 release
-SUM_FLAGS,
function( basedomain, list )
local rep;
if Length(list) = 0 then Error("list must be not empty"); fi;
Expand All @@ -196,6 +202,9 @@ InstallMethod( Matrix,

InstallMethod( Matrix,
[IsSemiring, IsMatrixObj],
# FIXME: Remove this downranking, it was introduced to prevent
# Semigroups from breaking ahead of the 4.10 release
-SUM_FLAGS,
function( basedomain, mat )
# TODO: can we do better? encourage MatrixObj implementors to overload this?
return NewMatrix( DefaultMatrixRepForBaseDomain(basedomain), basedomain, NrCols(mat), Unpack(mat) );
Expand Down
4 changes: 3 additions & 1 deletion lib/matrix.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,9 @@ end );
InstallOtherMethod( BaseDomain,
"generic method for a row vector",
[ IsRowVector ],
# FIXME: Remove this downranking, it was introduced to prevent
# Semigroups from breaking ahead of the 4.10 release
-SUM_FLAGS,
DefaultRing );

InstallOtherMethod( OneOfBaseDomain,
Expand Down Expand Up @@ -1249,7 +1252,6 @@ InstallOtherMethod( ZeroOfBaseDomain,
[ IsMatrix and IsPlistRep ],
mat -> Zero( mat[1,1] ) );


#############################################################################
##
#M DepthOfUpperTriangularMatrix( <mat> )
Expand Down

0 comments on commit ab46263

Please sign in to comment.