Top
Back: D.2.5.7 sparsepoly
Forward: D.2.5.9 triagmatrix
FastBack: D. SINGULAR libraries
FastForward: E. Release Notes
Up: D.2.5 random_lib
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. Index
About: About This Document

D.2.5.8 sparsetriag

Procedure from library random.lib (see random_lib).

Usage:

sparsetriag(n,m[,p,b]); n,m,p,b integers

Return:

nxm lower triagonal integer matrix, diagonal entries equal to 1, about p percent of lower diagonal entries are 0, the remaining are random integers >=1 and <= b; [defaults: (p,b) = (75,1)]

Example:

 
LIB "random.lib";
sparsetriag(5,7);"";
→ 1,0,0,0,0,0,0,
→ 0,1,0,0,0,0,0,
→ 0,1,1,0,0,0,0,
→ 0,0,0,1,0,0,0,
→ 1,1,0,0,1,0,0 
→ 
sparsetriag(7,5,90);"";
→ 1,0,0,0,0,
→ 0,1,0,0,0,
→ 0,1,1,0,0,
→ 0,0,0,1,0,
→ 0,0,0,0,1,
→ 0,0,0,1,0,
→ 0,1,0,0,0 
→ 
sparsetriag(5,5,0);"";
→ 1,0,0,0,0,
→ 1,1,0,0,0,
→ 1,1,1,0,0,
→ 1,1,1,1,0,
→ 1,1,1,1,1 
→ 
sparsetriag(5,5,50,100);
→ 1,0,0,0,0,
→ 73,1,0,0,0,
→ 0,79,1,0,0,
→ 14,0,0,1,0,
→ 0,48,23,0,1 

Top Back: D.2.5.7 sparsepoly Forward: D.2.5.9 triagmatrix FastBack: D. SINGULAR libraries FastForward: E. Release Notes Up: D.2.5 random_lib Top: Singular 2-0-4 Manual Contents: Table of Contents Index: F. Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.