File: 13.13.txt

package info (click to toggle)
gap-hap 1.70%2Bds-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 56,612 kB
  • sloc: xml: 16,139; sh: 216; javascript: 155; makefile: 126; ansic: 47; perl: 36
file content (11 lines) | stat: -rw-r--r-- 321 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
gap> A:=[[0,2,0],[-3,0,0],[0,0,4]];;
gap> S:=SparseMat(A);
Sparse matrix with 3 rows and 3 columns in characteristic 0

gap> NamesOfComponents(S);
[ "mat", "characteristic", "rows", "cols" ]
gap> S!.mat;
[ [ [ 2, 2 ] ], [ [ 1, -3 ] ], [ [ 3, 4 ] ] ]

gap> B:=SparseMattoMat(S);
[ [ 0, 2, 0 ], [ -3, 0, 0 ], [ 0, 0, 4 ] ]