Changeset 728478 in git
- Timestamp:
- Jul 14, 1998, 2:46:26 PM (25 years ago)
- Branches:
- (u'spielwiese', 'ec94ef7a30b928574c0c3daf41f6804dff5f6b69')
- Children:
- 371ea55fb2c0f4d718284e7a3cfd14c3973c8bed
- Parents:
- a23d8e9162ac8e732ebaa9d0df122d9e7f6f64dd
- Location:
- Tst/Short
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
Tst/Short/barei_s.tst
ra23d8e r728478 2 2 // test script for bareiss command 3 3 // 4 LIB "tst.lib"; 5 tst_init(); 6 4 7 pagelength = 10000; 5 8 ring r = 32003,(x,y,z),dp; -
Tst/Short/fetch_s.tst
ra23d8e r728478 1 LIB "tst.lib"; 2 tst_init(); 3 1 4 proc generate_ring_str(int n, string r_name, string ostring) 2 5 { -
Tst/Short/liftstd_s.tst
ra23d8e r728478 7 7 ring r1 = 32003,(x,y,z),(c,ls); 8 8 r1; 9 LIB "lib0"; 9 10 proc pmat (matrix m,list #) 11 { 12 if ( size(#) == 0) 13 { 14 //------------- main case: input is a matrix, no second argument--------------- 15 int @elems; 16 int @mlen; 17 int @slen; 18 int @c; 19 int @r; 20 //-------------- count maximal size of each column, and sum up ---------------- 21 22 for ( @c=1; @c<=ncols(m); @c=@c+1) 23 { int @len(@c); 24 for (@r=1; @r<=nrows(m); @r=@r+1) 25 { 26 @elems = @elems + 1; 27 string @s(@elems) = string(m[@r,@c])+","; 28 @slen = size(@s(@elems)); 29 if (@slen > @len(@c)) 30 { 31 @len(@c) = @slen; 32 } 33 } 34 @mlen = @mlen + @len(@c); 35 } 36 //---------------------- print all - except last - rows ----------------------- 37 38 string @aus; 39 string @sep = " "; 40 if (@mlen >= pagewidth) 41 { 42 @sep = newline; 43 } 44 45 for (@r=1; @r<nrows(m); @r=@r+1) 46 { 47 @elems = @r; 48 @aus = ""; 49 for (@c=1; @c<=ncols(m); @c=@c+1) 50 { 51 @aus = @aus + @s(@elems)[1,@len(@c)] + @sep; 52 @elems = @elems + nrows(m); 53 } 54 @aus; 55 } 56 //--------------- print last row (no comma after last entry) ------------------ 57 58 @aus = ""; 59 @elems = nrows(m); 60 for (@c=1; @c<ncols(m); @c=@c+1) 61 { 62 @aus = @aus + @s(@elems)[1,@len(@c)] + @sep; 63 @elems = @elems + nrows(m); 64 } 65 @aus = @aus + string(m[nrows(m),ncols(m)]); 66 @aus; 67 return(); 68 } 69 //--------- second case: input is a matrix, second argument is given ---------- 70 71 if ( size(#) == 1 ) 72 { 73 if ( typeof(#[1]) == "int" ) 74 { 75 string @aus; 76 string @tmp; 77 int @ll; 78 int @c; 79 int @r; 80 for ( @r=1; @r<=nrows(m); @r=@r+1) 81 { 82 @aus = ""; 83 for (@c=1; @c<=ncols(m); @c=@c+1) 84 { 85 @tmp = string(m[@r,@c]); 86 @aus = @aus + @tmp[1,#[1]] + " "; 87 } 88 @aus; 89 } 90 } 91 } 92 } 93 10 94 "-------------------------------"; 11 95 ideal i1=maxideal(3); … … 13 97 i2; 14 98 matrix m1[3][3]=x,y,z,xz,yx,12zx,0,y2,3xy2; 99 ~; 15 100 pmat(m1); 16 101 liftstd(i2,m1); -
Tst/Short/minor_s.tst
ra23d8e r728478 7 7 ring r1 = 32003,(x,y,z),(c,dp); 8 8 r1; 9 LIB "lib0"; 9 10 proc pmat (matrix m,list #) 11 { 12 if ( size(#) == 0) 13 { 14 //------------- main case: input is a matrix, no second argument--------------- 15 int @elems; 16 int @mlen; 17 int @slen; 18 int @c; 19 int @r; 20 //-------------- count maximal size of each column, and sum up ---------------- 21 22 for ( @c=1; @c<=ncols(m); @c=@c+1) 23 { int @len(@c); 24 for (@r=1; @r<=nrows(m); @r=@r+1) 25 { 26 @elems = @elems + 1; 27 string @s(@elems) = string(m[@r,@c])+","; 28 @slen = size(@s(@elems)); 29 if (@slen > @len(@c)) 30 { 31 @len(@c) = @slen; 32 } 33 } 34 @mlen = @mlen + @len(@c); 35 } 36 //---------------------- print all - except last - rows ----------------------- 37 38 string @aus; 39 string @sep = " "; 40 if (@mlen >= pagewidth) 41 { 42 @sep = newline; 43 } 44 45 for (@r=1; @r<nrows(m); @r=@r+1) 46 { 47 @elems = @r; 48 @aus = ""; 49 for (@c=1; @c<=ncols(m); @c=@c+1) 50 { 51 @aus = @aus + @s(@elems)[1,@len(@c)] + @sep; 52 @elems = @elems + nrows(m); 53 } 54 @aus; 55 } 56 //--------------- print last row (no comma after last entry) ------------------ 57 58 @aus = ""; 59 @elems = nrows(m); 60 for (@c=1; @c<ncols(m); @c=@c+1) 61 { 62 @aus = @aus + @s(@elems)[1,@len(@c)] + @sep; 63 @elems = @elems + nrows(m); 64 } 65 @aus = @aus + string(m[nrows(m),ncols(m)]); 66 @aus; 67 return(); 68 } 69 //--------- second case: input is a matrix, second argument is given ---------- 70 71 if ( size(#) == 1 ) 72 { 73 if ( typeof(#[1]) == "int" ) 74 { 75 string @aus; 76 string @tmp; 77 int @ll; 78 int @c; 79 int @r; 80 for ( @r=1; @r<=nrows(m); @r=@r+1) 81 { 82 @aus = ""; 83 for (@c=1; @c<=ncols(m); @c=@c+1) 84 { 85 @tmp = string(m[@r,@c]); 86 @aus = @aus + @tmp[1,#[1]] + " "; 87 } 88 @aus; 89 } 90 } 91 } 92 } 93 10 94 "-------------------------------"; 11 95 matrix m1[3][3]=maxideal(2); -
Tst/Short/mpsr_s.tst
ra23d8e r728478 175 175 killall("proc"); 176 176 dump(""); 177 tst_status(1);$177 LIB "tst.lib"; tst_status(1);$ 178 178 179 179 -
Tst/Short/polylib_s.tst
ra23d8e r728478 7 7 killall(); 8 8 9 examp e katsura();9 example katsura; 10 10 killall(); 11 11
Note: See TracChangeset
for help on using the changeset viewer.