Changeset 908d5a0 in git for Singular/LIB/poly.lib


Ignore:
Timestamp:
May 19, 1998, 8:08:26 PM (26 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
b07a7309c9ce4af1097f209fcbe4f0bccbd68616
Parents:
652cd158cf9057ab18e652dbde7b6b887c3be7cb
Message:
* improvement of katsura


git-svn-id: file:///usr/local/Singular/svn/trunk@1894 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/poly.lib

    r652cd1 r908d5a0  
    1 // $Id: poly.lib,v 1.13 1998-05-14 18:45:11 Singular Exp $
     1// $Id: poly.lib,v 1.14 1998-05-19 18:08:26 obachman Exp $
    22//system("random",787422842);
    33//(GMG, last modified 22.06.96)
     
    55///////////////////////////////////////////////////////////////////////////////
    66
    7 version="$Id: poly.lib,v 1.13 1998-05-14 18:45:11 Singular Exp $";
     7version="$Id: poly.lib,v 1.14 1998-05-19 18:08:26 obachman Exp $";
    88info="
    99LIBRARY:  poly.lib      PROCEDURES FOR MANIPULATING POLYS, IDEALS, MODULES
     
    5959
    6060proc katsura
    61 "USAGE: katsura([n]); n integer
    62 RETURN: katsura(n) : n-th katsura ideal of newly created and set ring
    63                      (32003, x(0..n), dp)
     61"USAGE: katsura([n]): n integer
     62RETURN: katsura(n) : n-th katsura ideal of
     63                      (1) newly created and set ring (32003, x(0..n), dp), if
     64                          nvars(basering) < n
     65                      (2) basering, if nvars(basering) >= n
    6466        katsura()  : katsura ideal of basering
    6567EXAMPLE: example katsura; shows examples
    6668"
    6769{
     70  int n;
    6871  if ( size(#) == 1 && typeof(#[1]) == "int")
    6972  {
    70     ring katsura_ring = 32003, x(0..#[1]), dp;
    71     keepring katsura_ring;
    72   }
     73    n = #[1] - 1;
     74    while (1)
     75    {
     76      if (defined(basering))
     77      {
     78        if (nvars(basering) >= #[1]) {break;}
     79      }
     80      ring katsura_ring = 32003, x(0..#[1]), dp;
     81      keepring katsura_ring;
     82      break;
     83    }
     84  }
     85  else
     86  {
     87    n = nvars(basering) -1;
     88  }
     89 
    7390  ideal s;
    7491  int i, j;
    75   int n = nvars(basering) -1;
    7692  poly p;
    7793
Note: See TracChangeset for help on using the changeset viewer.