[GAP Forum] [ gauss ] Displaying a sparse matrix

Anvita anvita21 at gmail.com
Sun Mar 18 13:58:46 GMT 2018


Dear Forum,

With the "gauss" package loaded, I noticed that "Display" behaves strangely
when the indices in a sparse matrix are not strictly increasing. I am
assuming it is allowed to have non-increasing indices because the manual
does not require otherwise and also because the conversion to an ordinary
matrix works as expected. The whole concept of a sparse matrix suggests, in
my opinion, that we should not worry about the linear ordering of matrix
entries any more.

Anvita

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/
───────────────────────────────────────────────────────────────
true

gap> SN := SparseMatrix( 2, 3,
>                   [ [ 2 ], [ 3, 1 ] ],
>                   [ [ 1 ], [ 3, 2 ] ] * One( GF(5) ) );
<a 2 x 3 sparse matrix over GF(5)>

gap> Display( ConvertSparseMatrixToMatrix ( SN ) );  # expected output
 . 1 .
 2 . 3

gap> Display(SN);   # corrupted output
 . 1 .
 . . 3 2 . .


More information about the Forum mailing list