Skip to content

Commit

Permalink
In LinearCodeByGenerators, make sure the GeneratorMat record of the c…
Browse files Browse the repository at this point in the history
…reated code is mutable.
  • Loading branch information
osj1961 committed Dec 15, 2024
1 parent fe15e47 commit f211bb2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/codegen.gi
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ end);
##Create a linear code from a list of Codeword generators
LinearCodeByGenerators := function(F, gens)

local V;
local V, M;
V:= Objectify( NewType( FamilyObj( gens ),
IsLeftModule and
IsLinearCodeRep and IsCodeDefaultRep ),
Expand All @@ -120,6 +120,8 @@ LinearCodeByGenerators := function(F, gens)
SetGeneratorsOfLeftModule( V, AsList( One(F)*gens ) );
SetIsLinearCode(V, true);
SetWordLength(V, Length(gens[1]));
M := MutableCopyMat( GeneratorMat(V) );
V!.GeneratorMat := M;
return V;

end;
Expand Down

0 comments on commit f211bb2

Please sign in to comment.