Changeset c25bc58 in git


Ignore:
Timestamp:
Aug 9, 2016, 3:24:34 PM (8 years ago)
Author:
Yue <ren@…>
Branches:
(u'spielwiese', '52dcfddee5ec87d404d5e0fb44f2d627608208f1')
Children:
9a0f21549aaff59eeb1077af356c1ec510c059e4
Parents:
7436e955ac75fa53219a330142e7392eaaf7ad72
Message:
chg: new tropical.lib from Thomas
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/tropical.lib

    r7436e9 rc25bc58  
    5353  Note, that this in particular forbids rational exponents for the t's.
    5454
    55   Moreover, in Singular no negative exponents of monomials are allowed, so
     55  Moreover, in @sc{Singular} no negative exponents of monomials are allowed, so
    5656  that the integer vectors vi will have to have non-negative entries.
    5757  Shifting all exponents by a fixed integer vector does not change the
     
    292292           computer; if you have GFAN version less than 0.3.0 then you must
    293293           use the optional parameter 'oldGfan'
    294 @*       - the procedure requires the Singular procedure absPrimdecGTZ to be
     294@*       - the procedure requires the @sc{Singular} procedure absPrimdecGTZ to be
    295295           present in the package primdec.lib, unless the option 'noAbs' is set;
    296296           but even if absPrimdecGTZ is present it might be necessary to set
     
    311311             and you are unlucky
    312312@*         + the option 'noAbs' has to be used since absolute primary
    313              decomposition in Singular only works in characteristic zero
     313             decomposition in @sc{Singular} only works in characteristic zero
    314314@*       - the basefield should either be Q or Z/pZ for some prime p;
    315315           field extensions will be computed if necessary; if you need
     
    597597        // note: it may happen, that when resubstituting PARA into
    598598        //       the replacement rules
    599         //       there occurred some unexpected cancellation;
     599        //       there occured some unexpected cancellation;
    600600        //       we only know that for SOME
    601601        //       solution of the zero-dimensional reduction NO
     
    991991REMARK:  - it is best to use the procedure displayPuiseuxExpansion to
    992992           display the result
    993 @*       - the procedure requires the Singular procedure absPrimdecGTZ to be
     993@*       - the procedure requires the @sc{Singular} procedure absPrimdecGTZ to be
    994994           present in the package primdec.lib
    995995@*       - if f is not squarefree it will be replaced by its squarefree part
     
    24912491             computed linear forms, the former that we consider their minimum
    24922492EXAMPLE:     example tropicalise;   shows an example"
    2493 {
     2493{
     2494  if (npars(basering)==0)
     2495  {
     2496    ERROR("The basering has no paramter t.");
     2497  }
    24942498  int order,j;
    24952499  list tropicalf;
     
    41094113                                       // --- first we try small numbers
    41104114        }
    4111         if ((j3==2) and ((char(basering)==0) or (char(basering)>100)))
    4112         {
    4113           randomp1=random(1,100);
    4114           randomp=t^(A[1,j2])*randomp1;// make a random constant
    4115                                        // --- next we try bigger numbers
    4116         }
    41174115        else
    41184116        {
    4119           randomp1=random(1,char(basering)-1);
    4120           randomp=t^(A[1,j2])*randomp1;//make a random constant
     4117          if ((j3==2) and ((char(basering)==0) or (char(basering)>100)))
     4118          {
     4119            randomp1=random(1,100);
     4120            randomp=t^(A[1,j2])*randomp1;// make a random constant
     4121                                         // --- next we try bigger numbers
     4122          }
     4123          else
     4124          {
     4125            randomp1=random(1,char(basering)-1);
     4126            randomp=t^(A[1,j2])*randomp1;//make a random constant
     4127          }
    41214128        }
    41224129        ergl[A[2,j2]]=randomp;//and save the constant in a list
     
    47094716        // which in a later version
    47104717        // should be interpreded by Singular
    4711         intvec wneu=choosegfanvector(read("/tmp/gfanoutput"),0)[1];
     4718        intvec wneu=choosegfanvector(read("/tmp/gfanoutput"),0,anzahlvariablen)[1];
    47124719        setring PREGFANRING;
    47134720      }
     
    54325439/////////////////////////////////////////////////////////////////////////
    54335440
    5434 static proc choosegfanvector (string s,int findall)
     5441static proc choosegfanvector (string s,int findall,int anzahlvariablen)
    54355442"USAGE:   choosegfanvector(s); s string
    54365443RETURN:   list, the jth entry is the jth integer vector contained in s
     
    54475454    }
    54485455    execute("intvec ww="+w+";");
    5449     ww=ww[1..size(ww)-1];
     5456    // the last entry in ww should correspond to the homogenisation variable
     5457    // (and can be omitted), unless the input to gfan was already homogeneous
     5458    if (anzahlvariablen==size(ww)-1)
     5459    {
     5460      ww=ww[1..size(ww)-1];
     5461    }
    54505462    return(list(ww));
    54515463  }
     
    54745486      {
    54755487        execute("www=intvec("+w+");");
    5476         ww[i]=intvec(www[1..size(www)-1]);
     5488        if (anzahlvariablen==size(ww)-1)
     5489        {
     5490          ww[i]=intvec(www[1..size(www)-1]);
     5491        }
     5492        else
     5493        {
     5494          ww[i]=www;
     5495        }
    54775496        w="";
    54785497        i++;
     
    55975616  int recursively; // is set 1 if the procedure is called recursively by itself
    55985617  int ii,jj,kk,ll,jjj,kkk,lll;
    5599   if (typeof(#[1])=="int") // this means the precedure has been
     5618  if (typeof(#[1])=="int") // this means the procedure has been
    56005619  { // called recursively
    56015620    // how many variables are true variables, and how many come
     
    57555774            // which in a later version
    57565775            // should be interpreded by Singular
    5757             wneulist=choosegfanvector(read("/tmp/gfanoutput"),findall);
     5776            wneulist=choosegfanvector(read("/tmp/gfanoutput"),findall,anzahlvariablen);
    57585777            setring PREGFANRING;
    57595778          }
Note: See TracChangeset for help on using the changeset viewer.