Changeset 6fa72f7 in git


Ignore:
Timestamp:
Jun 12, 1998, 11:33:33 AM (26 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
0bf0ad404be0052347f95a8372099f264df3172a
Parents:
1d7c4b47b26fed52a770d79387350be523837831
Message:
* groebner: one parameter is like no parameter


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/standard.lib

    r1d7c4b r6fa72f7  
    1 // $Id: standard.lib,v 1.18 1998-06-03 10:04:26 obachman Exp $
     1// $Id: standard.lib,v 1.19 1998-06-12 09:33:33 obachman Exp $
    22//////////////////////////////////////////////////////////////////////////////
    33
    4 version="$Id: standard.lib,v 1.18 1998-06-03 10:04:26 obachman Exp $";
     4version="$Id: standard.lib,v 1.19 1998-06-12 09:33:33 obachman Exp $";
    55info="
    66LIBRARY: standard.lib   PROCEDURES WHICH ARE ALWAYS LOADED AT START-UP
     
    215215    else
    216216    {
    217       "// ** groebner with two args not supported in this configuration";
     217      "// ** groebner with two args is not supported in this configuration";
    218218    }
    219219  }
     
    238238
    239239  // return std if no parameters and (dp or wp)
    240   if ((npars_P == 0) && IsSimple_P)
     240  if ((npars_P <= 1) && IsSimple_P)
    241241  {
    242242    if (find(ordstr_P, "d") > 0)
     
    269269  string varstr_P = varstr(P);
    270270  string parstr_P = parstr(P);
    271   int is_homog = (homog(i) && (npars_P == 0));
    272 
    273   string ri = "ring Phelp =" + string(char(P)) + ",(" + varstr_P;
    274   // parameters are converted to ring variables
    275   if (npars_P > 0)
    276   {
    277     ri = ri + "," + parstr_P;
    278   }
     271  int is_homog = (homog(i) && (npars_P <= 1));
     272  int add_vars = 0;
     273  string ri = "ring Phelp =";
     274 
     275  // more than one parameters are converted to ring variables
     276  if (npars_P > 1)
     277  {
     278    ri = ri + string(char(P)) + ",(" + varstr_P + "," + parstr_P;
     279    add_vars = npars_P;
     280  }
     281  else
     282  {
     283    ri = ri + "(" + charstr(P) + "),(" + varstr_P;
     284  }
     285
    279286  // a homogenizing variable is added, if necessary
    280287  if (! is_homog)
    281288  {
    282289    ri = ri + ",@t";
     290    add_vars = add_vars + 1;
    283291  }
    284292  // ordering is set to (dp, C)
     
    307315  intvec hi=hilb(qh1,1);
    308316
    309   if (is_homog && (npars_P == 0))
     317  if (add_vars == 0)
    310318  {
    311319    // no additional variables were introduced
     
    322330    // additional variables were introduced
    323331    // need another intermediate ring
    324     ri = "ring Phelp1 =" + string(char(P))
    325       + ",(" + varstr(Phelp) + "),(" + ordstr_P;
    326 
    327     // for lp without parameters, we do not need a block ordering
    328     if ( ! (IsSimple_P && (npars_P + is_homog < 2) && find(ordstr_P, "l")))
     332    ri = "ring Phelp1 = (" + charstr(Phelp)
     333      + "),(" + varstr(Phelp) + "),(" + ordstr_P;
     334
     335    // for lp wit at most one parameter, we do not need a block ordering
     336    if ( ! (IsSimple_P && (add_vars <2) && find(ordstr_P, "l")))
    329337    {
    330338      // need block ordering
    331       ri = ri + ", dp(" + string(npars_P + is_homog) + ")";
     339      ri = ri + ", dp(" + string(add_vars) + ")";
    332340    }
    333341    ri = ri + ");";
Note: See TracChangeset for help on using the changeset viewer.