[GAP Forum] [ gauss ] Union of matrices over GF(2)

Anvita anvita21 at gmail.com
Sun Mar 18 14:03:07 GMT 2018


Another problem is that uniting two sparse matrices over GF(2) gives an
error,
while the same procedure over GF(3) works fine.

gap> LoadPackage("gauss");;
───────────────────────────────────────────────────────────────
Loading  Gauss 2017.06.14 (Extended Gauss functionality for GAP)
by Simon Goertzen (http://wwwb.math.rwth-aachen.de/goertzen).
Homepage: http://homalg-project.github.io/homalg_project/Gauss/
───────────────────────────────────────────────────────────────

gap> ring:=GF(3);;
gap> a5:=SparseMatrix( 5, 5, [[1]] , [[One(ring)]], ring );;
gap> a3:=SparseZeroMatrix( 3, 5, ring );;

gap> UnionOfRows(a3,a5);
<a 8 x 5 sparse matrix over GF(3)>


gap> ring:=GF(2);;
gap> a5:=SparseMatrix( 5, 5, [[1]] , [[One(ring)]], ring );;
gap> a3:=SparseZeroMatrix( 3, 5, ring );;

gap> UnionOfRows(a3,a5);
Error, Record: '<rec>.entries' must have an assigned value in
  return SparseMatrix( A!.nrows + B!.nrows, A!.ncols,
   Concatenation( A!.indices, B!.indices ),
   Concatenation( A!.entries, B!.entries ), A!.ring )
 ; at /usr/local/lib/gap4r8/pkg/Gauss-2017.06.14/gap/SparseMatrix.gi:558
called from
<function "unknown">( <arguments> )
 called from read-eval loop at line 14 of *stdin*
you can 'return;' after assigning a value
brk>


More information about the Forum mailing list