|
D.3.1.1 compress
Procedure from library matrix.lib (see matrix_lib).
- Usage:
- compress(A); A matrix/ideal/module/intmat/intvec
- Return:
- same type, zero columns/generators from A deleted
(if A=intvec, zero elements are deleted)
Example:
| LIB "matrix.lib";
ring r=0,(x,y,z),ds;
matrix A[3][4]=1,0,3,0,x,0,z,0,x2,0,z2,0;
print(A);
==> 1, 0,3, 0,
==> x, 0,z, 0,
==> x2,0,z2,0
print(compress(A));
==> 1, 3,
==> x, z,
==> x2,z2
module m=module(A); show(m);
==> // module, 4 generator(s)
==> [1,x,x2]
==> [0]
==> [3,z,z2]
==> [0]
show(compress(m));
==> // module, 2 generator(s)
==> [1,x,x2]
==> [3,z,z2]
intmat B[3][4]=1,0,3,0,4,0,5,0,6,0,7,0;
compress(B);
==> 1,3,
==> 4,5,
==> 6,7
intvec C=0,0,1,2,0,3;
compress(C);
==> 1,2,3
|
|