Skip to content

Commit

Permalink
Sync NewVector for compressed reps with HPC-GAP
Browse files Browse the repository at this point in the history
Now that we have CopyToVectorRep in regular GAP, use it
  • Loading branch information
fingolfin committed Apr 19, 2021
1 parent 284c231 commit 4a96db5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions lib/vec8bit.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1094,13 +1094,10 @@ InstallMethod( BaseField, "for a compressed 8bit vector",
InstallMethod( NewVector, "for Is8BitVectorRep, GF(q), and a list",
[ Is8BitVectorRep, IsField and IsFinite, IsList ],
function( filter, f, l )
local v;
if not Size(f) in [3..256] then
Error("Is8BitVectorRep only supports base fields with 3 to 256 elements");
fi;
v := ShallowCopy(l);
ConvertToVectorRep(v,Size(f));
return v;
return CopyToVectorRep(l,Size(f));
end );

InstallMethod( NewZeroVector, "for Is8BitVectorRep, GF(q), and an int",
Expand Down
5 changes: 1 addition & 4 deletions lib/vecmat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2444,11 +2444,8 @@ InstallMethod( BaseField, "for a compressed gf2 vector",
InstallMethod( NewVector, "for IsGF2VectorRep, GF(2), and a list",
[ IsGF2VectorRep, IsField and IsFinite, IsList ],
function( filter, f, l )
local v;
if Size(f) <> 2 then Error("IsGF2VectorRep only supported over GF(2)"); fi;
v := ShallowCopy(l);
ConvertToVectorRepNC(v,2);
return v;
return CopyToVectorRep(l,2);
end );

InstallMethod( NewZeroVector, "for IsGF2VectorRep, GF(2), and an int",
Expand Down

0 comments on commit 4a96db5

Please sign in to comment.