diff --git a/lib/codegen.gi b/lib/codegen.gi index d42f4e8..f2e3387 100644 --- a/lib/codegen.gi +++ b/lib/codegen.gi @@ -111,7 +111,7 @@ end); ##Create a linear code from a list of Codeword generators LinearCodeByGenerators := function(F, gens) - local V, M, i, j, row; + local V, M; V:= Objectify( NewType( FamilyObj( gens ), IsLeftModule and IsLinearCodeRep and IsCodeDefaultRep ), @@ -128,7 +128,7 @@ LinearCodeByGenerators := function(F, gens) od; Append(M, [row]); od; - SetGeneratorMat(V, M ) ; + SetGeneratorMat(V, M); return V; end; diff --git a/lib/codeops.gi b/lib/codeops.gi index 3e8dc1f..652ba82 100644 --- a/lib/codeops.gi +++ b/lib/codeops.gi @@ -691,7 +691,7 @@ function(C) local majority,G0, Gp, Gpt, Gt, L, k, i, j, dimMat, Grstr, J, d1, arrayd1, Combo, rows, row, rowSum, G, F, zero, AClosestVec, s, p, num; F:=LeftActingDomain(C); if F<>GF(2) then Print("Code must be binary. Quitting. \n"); return(0); fi; - G := GeneratorMat(C); + G := MutableCopyMatrix(GeneratorMat(C)); if (IsInStandardForm(G)=false) then PutStandardForm(G); fi; @@ -757,7 +757,7 @@ function(C,p,num) # p = 5 seems to be optimal # num = 8 seems to be optimal local majority,G0, Gp, Gpt, Gt, L, k, i, j, dimMat, Grstr, J, d1, arrayd1, Combo, rows, row, rowSum, G, F, zero, AClosestVec, s; - G := GeneratorMat(C); + G := MutableCopyMatrix(GeneratorMat(C)); if (IsInStandardForm(G)=false) then PutStandardForm(G); fi; diff --git a/lib/matrices.gi b/lib/matrices.gi index fcb1629..d3388b9 100644 --- a/lib/matrices.gi +++ b/lib/matrices.gi @@ -636,7 +636,7 @@ InstallOtherMethod(PutStandardForm, "method for matrix and Field", true, [IsMatrix, IsField], 0, function(M, F) local mat, perm, k, i, j, d ; - mat := MutableCopyMatrix(M); + mat:=MutableCopyMatrix(M); d := Length(mat[1]); TriangulizeMat(mat); perm := ();