Changeset 728478 in git


Ignore:
Timestamp:
Jul 14, 1998, 2:46:26 PM (25 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'spielwiese', 'ec94ef7a30b928574c0c3daf41f6804dff5f6b69')
Children:
371ea55fb2c0f4d718284e7a3cfd14c3973c8bed
Parents:
a23d8e9162ac8e732ebaa9d0df122d9e7f6f64dd
Message:
* minor bug fixes


git-svn-id: file:///usr/local/Singular/svn/trunk@2334 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Tst/Short
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Tst/Short/barei_s.tst

    ra23d8e r728478  
    22// test script for bareiss command
    33//
     4LIB "tst.lib";
     5tst_init();
     6
    47pagelength = 10000;
    58ring r = 32003,(x,y,z),dp;
  • Tst/Short/fetch_s.tst

    ra23d8e r728478  
     1LIB "tst.lib";
     2tst_init();
     3
    14proc generate_ring_str(int n, string r_name, string ostring)
    25{
  • Tst/Short/liftstd_s.tst

    ra23d8e r728478  
    77ring r1 = 32003,(x,y,z),(c,ls);
    88r1;
    9 LIB "lib0";
     9
     10proc 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
    1094"-------------------------------";
    1195ideal i1=maxideal(3);
     
    1397i2;
    1498matrix m1[3][3]=x,y,z,xz,yx,12zx,0,y2,3xy2;
     99~;
    15100pmat(m1);
    16101liftstd(i2,m1);
  • Tst/Short/minor_s.tst

    ra23d8e r728478  
    77ring r1 = 32003,(x,y,z),(c,dp);
    88r1;
    9 LIB "lib0";
     9
     10proc 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
    1094"-------------------------------";
    1195matrix m1[3][3]=maxideal(2);
  • Tst/Short/mpsr_s.tst

    ra23d8e r728478  
    175175killall("proc");
    176176dump("");
    177 tst_status(1);$
     177LIB "tst.lib"; tst_status(1);$
    178178
    179179
  • Tst/Short/polylib_s.tst

    ra23d8e r728478  
    77killall();
    88
    9 exampe katsura();
     9example katsura;
    1010killall();
    1111
Note: See TracChangeset for help on using the changeset viewer.