Top
Back: D.3.1 matrix_lib
Forward: D.3.1.2 concat
FastBack: Appendix D SINGULAR libraries
FastForward: E Release Notes
Up: D.3.1 matrix_lib
Top: 1 Preface
Contents: Table of Contents
Index: F Index
About: About This Document

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

Top Back: D.3.1 matrix_lib Forward: D.3.1.2 concat FastBack: Appendix D SINGULAR libraries FastForward: E Release Notes Up: D.3.1 matrix_lib Top: 1 Preface Contents: Table of Contents Index: F Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.