Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/codecr.gi
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ CalculateLinearCodeCoveringRadius := function( code )
# (old version had line above in place of next 5)
H:=CheckMat(code);
CLs:=GuavaCosetLeadersMatFFE(H,LeftActingDomain(code));
wts:=List([1..Length(CLs)],i->WeightVecFFE(CLs[i]));
wts:=List(CLs, WeightVecFFE);
rho:=Maximum(wts);
return rho;
fi;
Expand Down
4 changes: 2 additions & 2 deletions lib/codecstr.gi
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ function(C, D, check)
NewH := List( [ 2..Length( H ) ], x -> H[ x ] );
# throw away the first column of H' (it is (1, 0, ..., 0),
# the one is already present in the new generator matrix)
NewH := List( [ 1..Length( NewH ) ], x -> List(
[ 2 .. WordLength( D ) ], y -> NewH[ x ][ y ] ) );
NewH := List( NewH, x -> List(
[ 2 .. WordLength( D ) ], y -> x[ y ] ) );
# fill the lower left part with zeroes
Nulmat := List( [ 1 .. Dimension( D ) - 1 ],
x -> NullVector( WordLength( C ) , LeftActingDomain(C) ) );
Expand Down
2 changes: 1 addition & 1 deletion lib/codegen.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1903,7 +1903,7 @@ function(n, L, F)
fi;
p := Characteristic(Field(L));
CC:=CyclotomicCosets(p,q-1);
CCz:=List([1..Length(CC)],i->List(CC[i],j->z^j));
CCz:=List(CC,cc->List(cc,j->z^j));
## this is the set of cyclotomic cosets, represented
## as powers of a primitive element z
powerlist := [];
Expand Down
8 changes: 4 additions & 4 deletions lib/codeman.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2138,7 +2138,7 @@ __G_BZCode := function(O, I)
VectorRep := function(e, F)
local a, f, MF;
if IsZero(e) then;
return List([1..LogInt(Size(F), Characteristic(F))], i->Zero(GF(Characteristic(F))));
return List([1..DegreeOverPrimeField(F)], i->Zero(GF(Characteristic(F))));
fi;
a := PrimitiveElement(F);
f := MinimalPolynomial( GF(Characteristic(F)), a);
Expand All @@ -2152,17 +2152,17 @@ __G_BZCode := function(O, I)
fi;

# Make sure list O (outer codes) contains all linear codes
if (PositionNot( List([1..Size(O)], i->IsLinearCode(O[i])), true ) < Size(O)) then
if not ForAll(O, IsLinearCode) then
Error("The list O contains non linear code(s)\n");
fi;

# Make sure list I (inner codes) contains all linear codes
if (PositionNot( List([1..Size(I)], i->IsLinearCode(I[i])), true ) < Size(I)) then
if not ForAll(I, IsLinearCode) then
Error("The list I contains non linear code(s)\n");
fi;

# Make sure that all outer codes have the same length
if (PositionNot(List([1..Size(O)], i->CodeLength(O[i])), CodeLength(O[1])) < Size(O)) then
if Length(Set(O, CodeLength)) > 1 then
Error("Code lengths of all outer codes are required to be the same\n");
fi;

Expand Down
8 changes: 2 additions & 6 deletions lib/curves.gi
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ local partsf,monsf,vars,deg,i,j;
partsf:=ConstituentsPolynomial(f);
# varsf:=partsf.variables;
monsf:=partsf.monomials;
deg:=List([1..Length(monsf)],i->
List([1..Length(vars)],j->
[monsf[i],vars[j],DegreeIndeterminate(monsf[i],vars[j])]));
deg:=List(monsf,mon->List(vars,var->[mon,var,DegreeIndeterminate(mon,var)]));
return deg;
end);

Expand All @@ -161,9 +159,7 @@ local partsf,monsf,vars,deg,i,j;
partsf:=ConstituentsPolynomial(f);
# varsf:=partsf.variables;
monsf:=partsf.monomials;
deg:=List([1..Length(monsf)],i->
Sum(List([1..Length(vars)],j->
DegreeIndeterminate(monsf[i],vars[j]))));
deg:=List(monsf,mon->Sum(vars,var->DegreeIndeterminate(mon,var)));
return Maximum(deg);
end);

Expand Down
2 changes: 1 addition & 1 deletion lib/decoders.gi
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ function (C, r)
fi;
x := Indeterminate(F);
if q = 2 then # error locator is not necessary
pol := Sum(List([1..Length(ErrorLocator)], i->x^ErrorLocator[i]));
pol := Sum(List(ErrorLocator, i->x^i));
return Codeword((r - pol) mod (x^n-1), C);
else
pol := Derivative(sigma);
Expand Down
4 changes: 2 additions & 2 deletions lib/matrices.gi
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,10 @@ function(arg)
if Length(arg) = 1 then
M:=arg[1];
else
M:=List([1..Length(arg)],i->arg[i]);
M:=arg;
fi;
n:=Length(M);
if ( n >= Length(M[1]) ) or not ForAll(M, i-> IsLatinSquare(i)) then
if n >= Length(M[1]) or not ForAll(M, IsLatinSquare) then
return false; #this is right
fi;
q2 := Length(M[1])^2;
Expand Down
Loading