| intmat m[2][4] = 1,0,2,4,0,1,-1,0,3,2,1,-2;
m;
→ 1,0,2,4,
→ 0,1,-1,0
m[2,3]; // entry at row 2, col 3
→ -1
size(m); // number of entries
→ 8
intvec v = 1,0,-1,2;
m * v;
→ 7,1
typeof(_);
→ intvec
intmat m1[4][3] = 0,1,2,3,v,1;
intmat m2 = m * m1;
m2; // 2 x 3 intmat
→ -2,5,4,
→ 4,-1,-1
m2*10; // multiply each entry of m with 10;
→ -20,50,40,
→ 40,-10,-10
-m2;
→ 2,-5,-4,
→ -4,1,1
m2 % 2;
→ 0,1,0,
→ 0,1,1
m2 div 2;
→ -1,2,2,
→ 2,-1,-1
m2[2,1]; // entry at row 2, col 1
→ 4
m1[2..3,2..3]; // submatrix
→ 1 0 2 1
m2[nrows(m2),ncols(m2)]; // the last entry of intmat m2
→ -1
|