From 5b3e8b8ee791afbc663cfa3d8d57cd045da3e792 Mon Sep 17 00:00:00 2001 From: Joe Fields Date: Mon, 30 Dec 2024 21:08:10 -0500 Subject: [PATCH] Fixes to CoveringRadius and LinearCodeByGenerators --- lib/codecr.gi | 2 +- lib/codegen.gi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/codecr.gi b/lib/codecr.gi index 9add944..d2bf331 100644 --- a/lib/codecr.gi +++ b/lib/codecr.gi @@ -42,7 +42,7 @@ CalculateLinearCodeCoveringRadius := function( code ) #return Maximum( List( SyndromeTable( code ), i -> Weight( i[ 1 ] ) ) ); # (old version had line above in place of next 5) H:=CheckMat(code); - CLs:=CosetLeadersMatFFE(H,LeftActingDomain(code)); + CLs:=List(Set(CosetLeadersMatFFE(H,LeftActingDomain(code)))); wts:=List([1..Length(CLs)],i->WeightVecFFE(CLs[i])); rho:=Maximum(wts); return rho; diff --git a/lib/codegen.gi b/lib/codegen.gi index f2e3387..49b10a3 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; + local V, M, row, i, j; V:= Objectify( NewType( FamilyObj( gens ), IsLeftModule and IsLinearCodeRep and IsCodeDefaultRep ),