Changeset e6f1e6 in git


Ignore:
Timestamp:
May 17, 2016, 5:26:29 PM (7 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'd1ba061a762c62d3a25159d8da8b6e17332291fa')
Children:
6f203b6a99801e807e56ef784f79d4951204b9e5
Parents:
f8fb93d1bc922d1e97207d1d5b347fe1db1eedcf
Message:
code cleanup: HAVE_RINGS is mostly not needed
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    rf8fb93d re6f1e6  
    39083908{
    39093909  SPrintStart();
    3910 #ifdef HAVE_RINGS
    39113910  if (rField_is_Ring_Z(currRing))
    39123911  {
     
    39333932    rDelete(tempR);
    39343933  }
    3935 #endif
    39363934  assumeStdFlag(v);
    39373935  intvec *module_w=(intvec*)atGet(v,"isHomog",INTVEC_CMD);
     
    40544052{
    40554053  assumeStdFlag(v);
    4056 #ifdef HAVE_RINGS
    40574054  if (rField_is_Ring(currRing))
    40584055  {
     
    41174114    return FALSE;
    41184115  }
    4119 #endif
    41204116  res->data = (char *)(long)scDimInt((ideal)(v->Data()),currRing->qideal);
    41214117  return FALSE;
     
    42824278static BOOLEAN jjHILBERT(leftv, leftv v)
    42834279{
    4284 #ifdef HAVE_RINGS
    42854280  if (rField_is_Ring_Z(currRing))
    42864281  {
     
    43094304    return FALSE;
    43104305  }
    4311 #endif
    43124306  assumeStdFlag(v);
    43134307  intvec *module_w=(intvec*)atGet(v,"isHomog",INTVEC_CMD);
     
    43184312static BOOLEAN jjHILBERT_IV(leftv res, leftv v)
    43194313{
    4320 #ifdef HAVE_RINGS
    43214314  if (rField_is_Ring_Z(currRing))
    43224315  {
     
    43244317    Print("//       performed for generic fibre, that is, over Q\n");
    43254318  }
    4326 #endif
    43274319  res->data=(void *)hSecondSeries((intvec *)v->Data());
    43284320  return FALSE;
     
    44334425{
    44344426  ideal result=kInterRed((ideal)(v->Data()), currRing->qideal);
    4435   #ifdef HAVE_RINGS
    44364427  if(rField_is_Ring(currRing))
    44374428    Warn("interred: this command is experimental over the integers");
    4438   #endif
    44394429  if (TEST_OPT_PROT) { PrintLn(); mflush(); }
    44404430  res->data = result;
     
    59245914    return TRUE;
    59255915  }
    5926 #ifdef HAVE_RINGS
    59275916  if (rField_is_Ring_Z(currRing))
    59285917  {
     
    59665955    if (returnWithTrue) return TRUE; else return FALSE;
    59675956  }
    5968 #endif
    59695957  assumeStdFlag(u);
    59705958  intvec *module_w=(intvec *)atGet(u,"isHomog",INTVEC_CMD);
     
    92459233  }
    92469234  #endif
    9247   #ifdef HAVE_RINGS
    92489235  if (rField_is_Ring(currRing))
    92499236  {
     
    92669253    }
    92679254  }
    9268   #endif
    9269   return FALSE;
    9270 }
     9255  return FALSE;
     9256}
  • Singular/ipassign.cc

    rf8fb93d re6f1e6  
    947947  ideal qid;
    948948
    949 #ifdef HAVE_RINGS
    950949  if((rField_is_Ring(currRing)) && (cpos != -1))
    951     {
    952       int i, j;
    953       int *perm = (int *)omAlloc0((qr->N+1)*sizeof(int));
    954 
    955       for(i=qr->N;i>0;i--)
    956         perm[i]=i;
    957 
    958       nMapFunc nMap = n_SetMap(currRing->cf, newcf);
    959       qid = idInit(IDELEMS(id)-1,1);
    960       for(i = 0, j = 0; i<IDELEMS(id); i++)
    961         if( i != cpos )
    962           qid->m[j++] = p_PermPoly(id->m[i], perm, currRing, qr, nMap, NULL, 0);
    963     }
    964     else
    965 #endif
    966       qid = idrCopyR(id,currRing,qr);
     950  {
     951    int i, j;
     952    int *perm = (int *)omAlloc0((qr->N+1)*sizeof(int));
     953
     954    for(i=qr->N;i>0;i--)
     955      perm[i]=i;
     956
     957    nMapFunc nMap = n_SetMap(currRing->cf, newcf);
     958    qid = idInit(IDELEMS(id)-1,1);
     959    for(i = 0, j = 0; i<IDELEMS(id); i++)
     960      if( i != cpos )
     961        qid->m[j++] = p_PermPoly(id->m[i], perm, currRing, qr, nMap, NULL, 0);
     962  }
     963  else
     964    qid = idrCopyR(id,currRing,qr);
    967965
    968966  idSkipZeroes(qid);
  • Singular/ipshell.cc

    rf8fb93d re6f1e6  
    17981798#endif
    17991799
    1800 #ifdef HAVE_RINGS
    18011800void rDecomposeRing(leftv h,const ring R)
    18021801/* field is R or C */
    18031802{
     1803#ifdef HAVE_RINGS
    18041804  lists L=(lists)omAlloc0Bin(slists_bin);
    18051805  if (rField_is_Ring_Z(R)) L->Init(1);
     
    18241824  L->m[1].rtyp=LIST_CMD;
    18251825  L->m[1].data=(void *)LL;
    1826 }
     1826#else
     1827  WerrorS("rDecomposeRing");
    18271828#endif
     1829}
    18281830
    18291831
     
    20722074    rDecomposeC(&(L->m[0]),r);
    20732075  }
    2074 #ifdef HAVE_RINGS
    20752076  else if (rField_is_Ring(r))
    20762077  {
    20772078    rDecomposeRing(&(L->m[0]),r);
    20782079  }
    2079 #endif
    20802080  else if ( r->cf->extRing!=NULL )// nCoeff_is_algExt(r->cf))
    20812081  {
  • Singular/misc_ip.cc

    rf8fb93d re6f1e6  
    621621        if (TEST_OPT_INTSTRATEGY && (currRing!=NULL)
    622622        && rField_has_simple_inverse()
    623 #ifdef HAVE_RINGS
    624623        && !rField_is_Ring(currRing)
    625 #endif
    626624        ) {
    627625          si_opt_1 &=~Sy_bit(OPT_INTSTRATEGY);
     
    653651        if (TEST_OPT_INTSTRATEGY && (currRing!=NULL)
    654652        && rField_has_simple_inverse()
    655 #ifdef HAVE_RINGS
    656653        && !rField_is_Ring(currRing)
    657 #endif
    658654        ) {
    659655          test &=~Sy_bit(OPT_INTSTRATEGY);
  • kernel/GBEngine/kInline.h

    rf8fb93d re6f1e6  
    11441144  assume(p_sev == pGetShortExpVector(p));
    11451145  if (strat->noClearS) return;
    1146   #if HAVE_RINGS
    1147     if(rField_is_Ring(currRing))
    1148     {
    1149         if (!pLmShortDivisibleBy(p,p_sev, strat->S[*at], ~ strat->sevS[*at]))
    1150             return;
    1151         if(!n_DivBy(pGetCoeff(strat->S[*at]), pGetCoeff(p), currRing))
    1152             return;
    1153     }
    1154     else
    1155     {
    1156         if (!pLmShortDivisibleBy(p,p_sev, strat->S[*at], ~ strat->sevS[*at])) return;
    1157     }
    1158   #else
     1146  if(rField_is_Ring(currRing))
     1147  {
     1148    if (!pLmShortDivisibleBy(p,p_sev, strat->S[*at], ~ strat->sevS[*at]))
     1149      return;
     1150    if(!n_DivBy(pGetCoeff(strat->S[*at]), pGetCoeff(p), currRing))
     1151      return;
     1152  }
     1153  else
     1154  {
    11591155    if (!pLmShortDivisibleBy(p,p_sev, strat->S[*at], ~ strat->sevS[*at])) return;
    1160   #endif
     1156  }
    11611157  deleteInS((*at),strat);
    11621158  (*at)--;
  • kernel/GBEngine/kstd1.cc

    rf8fb93d re6f1e6  
    999999  {
    10001000    i = p_IsPurePower(p, currRing);
     1001    if (rField_is_Ring(currRing) && (!n_IsUnit(pGetCoeff(p), currRing->cf))) i=0;
    10011002    if (i == last)
    10021003    {
     
    10091010    {
    10101011      i = p_IsPurePower(h, strat->tailRing);
     1012      if (rField_is_Ring(currRing) && (!n_IsUnit(pGetCoeff(h), currRing->cf))) i=0;
    10111013      if (i==last) return TRUE;
    10121014      (*length)++;
     
    18891891//    }
    18901892//  }
    1891 #ifdef HAVE_RINGS
    18921893  if(nCoeff_is_Ring_Z(currRing->cf))
    18931894    finalReduceByMon(strat);
    1894 #endif
    18951895  if (Q!=NULL) updateResult(strat->Shdl,Q,strat);
    18961896  SI_RESTORE_OPT1(save1);
     
    21252125          h.sev = strat->sevS[j];
    21262126          h.SetpFDeg();
    2127           #ifdef HAVE_RINGS
    21282127          if(rField_is_Ring(currRing) && rHasLocalOrMixedOrdering(currRing))
    21292128            enterT_strong(h,strat);
    21302129          else
    2131           #endif
    2132           enterT(h,strat);
     2130            enterT(h,strat);
    21332131        }
    21342132        if (TEST_OPT_PROT) { PrintS("r"); mflush(); }
     
    22202218    strat->syzComp = syzComp;
    22212219  if (TEST_OPT_SB_1
    2222     #ifdef HAVE_RINGS
    22232220    &&(!rField_is_Ring(currRing))
    2224     #endif
    22252221    )
    22262222    strat->newIdeal = newIdeal;
     
    22882284  else
    22892285#endif
    2290 #ifdef HAVE_RINGS
    22912286  if (rField_is_Ring(currRing))
    22922287  {
     
    23602355  }
    23612356  else
    2362 #endif
    23632357  {
    23642358    if (rHasLocalOrMixedOrdering(currRing))
     
    24202414    strat->syzComp = syzComp;
    24212415  if (TEST_OPT_SB_1)
    2422     #ifdef HAVE_RINGS
    24232416    if(!rField_is_Ring(currRing))
    2424     #endif
    2425     strat->newIdeal = newIdeal;
     2417      strat->newIdeal = newIdeal;
    24262418  if (rField_has_simple_inverse(currRing))
    24272419    strat->LazyPass=20;
     
    24902482  else
    24912483#endif
    2492 #ifdef HAVE_RINGS
    24932484  if (rField_is_Ring(currRing))
    24942485    r=bba(F,Q,NULL,hilb,strat);
    24952486  else
    2496 #endif
    24972487  {
    24982488    if (rHasLocalOrMixedOrdering(currRing))
     
    25392529    strat->syzComp = syzComp;
    25402530  if (TEST_OPT_SB_1)
    2541     #ifdef HAVE_RINGS
    25422531    if(!rField_is_Ring(currRing))
    2543     #endif
    2544     strat->newIdeal = newIdeal;
     2532      strat->newIdeal = newIdeal;
    25452533  if (rField_has_simple_inverse(currRing))
    25462534    strat->LazyPass=20;
     
    26382626    return idInit(1,F->rank);
    26392627  }
    2640   #ifdef HAVE_RINGS
    26412628  if(rField_is_Ring(currRing))
    26422629  {
     
    26572644    }
    26582645  }
    2659   #endif
    26602646  ideal r=NULL;
    26612647  int Kstd1_OldDeg = Kstd1_deg,i;
     
    32493235#endif
    32503236  if ((rHasLocalOrMixedOrdering(currRing))|| (rField_is_numeric(currRing))
    3251   #ifdef HAVE_RINGS
    32523237  ||(rField_is_Ring(currRing))
    3253   #endif
    32543238  )
    32553239    return kInterRedOld(F,Q);
  • kernel/GBEngine/kstd2.cc

    rf8fb93d re6f1e6  
    109109#if defined(PDEBUG) || defined(PDIV_DEBUG)
    110110      if (p_LmShortDivisibleBy(T[j].p, sevT[j],p, not_sev, r))
    111         {
    112 #ifdef HAVE_RINGS
    113             if(rField_is_Ring(r))
    114                 {if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].p), r))
    115                     return j;}
    116             else {
    117                 return j;
    118                 }
    119 #else
     111      {
     112        if(rField_is_Ring(r))
     113        {
     114          if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].p), r))
     115            return j;}
     116          else
     117          {
    120118            return j;
    121 #endif
    122 
     119          }
    123120        }
    124121#else
     
    126123          p_LmDivisibleBy(T[j].p, p, r))
    127124        {
    128 #ifdef HAVE_RINGS
    129             if(rField_is_Ring(r))
    130                 {if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].p), r))
    131                     return j;}
    132             else {
    133                 return j;
    134                 }
    135 #else
     125          if(rField_is_Ring(r))
     126          {
     127            if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].p), r))
     128              return j;
     129          }
     130          else
     131          {
    136132            return j;
    137 #endif
    138 
     133          }
    139134        }
    140135#endif
     
    153148                               p, not_sev, r))
    154149        {
    155 #ifdef HAVE_RINGS
    156             if(rField_is_Ring(r))
    157                 {if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].t_p), r))
    158                     return j;}
    159             else {
    160                 return j;
    161             }
    162 #else
     150          if(rField_is_Ring(r))
     151          {
     152            if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].t_p), r))
     153              return j;
     154          }
     155          else
     156          {
    163157            return j;
    164 #endif
    165 
     158          }
    166159        }
    167160#else
     
    169162          p_LmDivisibleBy(T[j].t_p, p, r))
    170163        {
    171 #ifdef HAVE_RINGS
    172             if(rField_is_Ring(r))
    173                 {if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].t_p), r))
    174                     return j;}
    175             else {
    176                 return j;
    177             }
    178 #else
     164          if(rField_is_Ring(r))
     165          {
     166            if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].t_p), r))
     167              return j;
     168          }
     169          else
     170          {
    179171            return j;
    180 #endif
    181 
     172          }
    182173        }
    183174#endif
     
    211202                             p, not_sev, currRing))
    212203        {
    213 #ifdef HAVE_RINGS
    214204            if(rField_is_Ring(currRing))
    215205                {if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing))
    216206                    return j;}
    217207            else
    218 #endif
    219208            return j;
    220209        }
     
    223212         p_LmDivisibleBy(strat->S[j], p, currRing))
    224213        {
    225 #ifdef HAVE_RINGS
    226214            if(rField_is_Ring(currRing))
    227215                {if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing))
    228216                    return j;}
    229217            else
    230 #endif
    231218            return j;
    232219        }
     
    255242                             p, not_sev, currRing))
    256243        {
    257 #ifdef HAVE_RINGS
    258244            if(rField_is_Ring(currRing))
    259245                {if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing))
    260246                    return j;}
    261247            else
    262 #endif
    263248            return j;
    264249        }
     
    267252         p_LmDivisibleBy(strat->S[j], p, currRing))
    268253        {
    269 #ifdef HAVE_RINGS
    270254            if(rField_is_Ring(currRing))
    271255                {if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing))
    272256                    return j;}
    273257            else
    274 #endif
    275258            return j;
    276259        }
     
    15221505    {
    15231506      // deletes the short spoly
    1524 #ifdef HAVE_RINGS
    15251507      if (rField_is_Ring(currRing))
    15261508        pLmDelete(strat->P.p);
    15271509      else
    1528 #endif
    15291510        pLmFree(strat->P.p);
    15301511      strat->P.p = NULL;
     
    16391620      {
    16401621        enterT(strat->P, strat);
    1641 #ifdef HAVE_RINGS
    16421622        if (rField_is_Ring(currRing))
    16431623          superenterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
    16441624        else
    1645 #endif
    16461625          enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
    16471626        // posInS only depends on the leading term
     
    16701649          int pos=posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
    16711650          enterT(strat->P, strat);
    1672           #ifdef HAVE_RINGS
    16731651          if (rField_is_Ring(currRing))
    16741652            superenterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
    16751653          else
    1676           #endif
    16771654            enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
    16781655          strat->enterS(strat->P, pos, strat, strat->tl);
     
    16841661      if (strat->P.lcm!=NULL)
    16851662      {
    1686 #ifdef HAVE_RINGS
    16871663        if (rField_is_Ring(currRing)) pLmDelete(strat->P.lcm);
    1688         else
    1689 #else
    1690           pLmFree(strat->P.lcm);
    1691 #endif
     1664        else                          pLmFree(strat->P.lcm);
    16921665        strat->P.lcm=NULL;
    16931666      }
     
    17091682  if (TEST_OPT_SB_1)
    17101683  {
    1711     #ifdef HAVE_RINGS
    17121684    if(!rField_is_Ring(currRing))
    1713     #endif
    17141685    {
    17151686      int k=1;
     
    17461717  }
    17471718  else if (TEST_OPT_PROT) PrintLn();
    1748   #ifdef HAVE_RINGS
    17491719  if(nCoeff_is_Ring_Z(currRing->cf))
    17501720    finalReduceByMon(strat);
     
    17591729    }
    17601730  }
    1761   #endif
    17621731  /* release temp data-------------------------------- */
    17631732  exitBuchMora(strat);
     
    19471916        // deletes the short spoly
    19481917        /*
    1949 #ifdef HAVE_RINGS
    19501918        if (rField_is_Ring(currRing))
    19511919          pLmDelete(strat->P.p);
    19521920        else
    1953 #endif
    19541921          pLmFree(strat->P.p);
    19551922*/
     
    21372104      pWrite(strat->P.sig);
    21382105      */
    2139 #ifdef HAVE_RINGS
    21402106      if (rField_is_Ring(currRing))
    21412107        superenterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
    21422108      else
    2143 #endif
    21442109        enterpairsSig(strat->P.p,strat->P.sig,strat->sl+1,strat->sl,strat->P.ecart,pos,strat, strat->tl);
    21452110      // posInS only depends on the leading term
     
    23382303  if (TEST_OPT_SB_1)
    23392304  {
    2340     #ifdef HAVE_RINGS
    23412305    if(!rField_is_Ring(currRing))
    2342     #endif
    2343     {
    2344         int k=1;
    2345         int j;
    2346         while(k<=strat->sl)
    2347         {
    2348           j=0;
    2349           loop
    2350           {
    2351             if (j>=k) break;
    2352             clearS(strat->S[j],strat->sevS[j],&k,&j,strat);
    2353             j++;
    2354           }
    2355           k++;
    2356         }
     2306    {
     2307      int k=1;
     2308      int j;
     2309      while(k<=strat->sl)
     2310      {
     2311        j=0;
     2312        loop
     2313        {
     2314          if (j>=k) break;
     2315          clearS(strat->S[j],strat->sevS[j],&k,&j,strat);
     2316          j++;
     2317        }
     2318        k++;
     2319      }
    23572320    }
    23582321  }
     
    25122475  {
    25132476    if (TEST_OPT_PROT) { PrintS("t"); mflush(); }
    2514     #ifdef HAVE_RINGS
    25152477    if (rField_is_Ring(currRing))
    25162478    {
     
    25182480    }
    25192481    else
    2520     #endif
    25212482    {
    25222483      si_opt_1 &= ~Sy_bit(OPT_INTSTRATEGY);
     
    25852546      {
    25862547        if (TEST_OPT_PROT) { PrintS("t"); mflush(); }
    2587         #ifdef HAVE_RINGS
    25882548        if (rField_is_Ring(currRing))
    25892549        {
     
    25912551        }
    25922552        else
    2593         #endif
    25942553        {
    25952554          p = redtailBba(p,max_ind,strat,(lazyReduce & KSTD_NF_NONORM)==0);
     
    27012660    {
    27022661      // deletes the short spoly
    2703 #ifdef HAVE_RINGS
    27042662      if (rField_is_Ring(currRing))
    27052663        pLmDelete(strat->P.p);
    27062664      else
    2707 #endif
    27082665        pLmFree(strat->P.p);
    27092666
  • kernel/GBEngine/kutil.cc

    rf8fb93d re6f1e6  
    334334  poly p = L->GetLmTailRing();
    335335
    336 #ifdef HAVE_RINGS
    337336    if (rField_is_Ring(r) /*&& (rHasLocalOrMixedOrdering(r))*/)
    338337      lc = pGetCoeff(p);
    339 #endif
    340338    #if ADIDEBUG
    341339    printf("\n        cancelunit\n");
     
    365363      {
    366364        number eins;
    367 #ifdef HAVE_RINGS
    368365        if (rField_is_Ring(r) /*&& (rHasLocalOrMixedOrdering(r))*/)
    369366          eins = nCopy(lc);
    370367        else
    371 #endif
    372368          eins=nInit(1);
    373369        if (L->p != NULL)
     
    453449  // k = 0;
    454450  p=pIsPurePower(pp);
     451  if (rField_is_Ring(currRing) && (!n_IsUnit(pGetCoeff(pp),currRing->cf))) return;
    455452  if (p!=0) strat->NotUsedAxis[p] = FALSE;
    456453  /*- the leading term of pp is a power of the p-th variable -*/
     
    21202117    pDelete(&pSigMult);
    21212118    pDelete(&sSigMult);
    2122     #ifdef HAVE_RINGS
    21232119    if (rField_is_Ring(currRing))
    21242120      pLmDelete(Lp.lcm);
    21252121    else
    2126     #endif
    21272122      pLmFree(Lp.lcm);
    21282123    Lp.lcm=NULL;
     
    21412136    pDelete(&pSigMult);
    21422137    pDelete(&sSigMult);
    2143     #ifdef HAVE_RINGS
    21442138    if (rField_is_Ring(currRing))
    21452139      pLmDelete(Lp.lcm);
    21462140    else
    2147     #endif
    21482141      pLmFree(Lp.lcm);
    21492142    Lp.lcm=NULL;
     
    39863979  int j=pos;
    39873980
    3988 #ifdef HAVE_RINGS
    39893981  assume (!rField_is_Ring(currRing));
    3990 #endif
    39913982  //#if ADIDEBUG
    39923983  #if 0
     
    40424033int j=pos;
    40434034
    4044 #ifdef HAVE_RINGS
    40454035assume (!rField_is_Ring(currRing));
    4046 #endif
    40474036
    40484037initenterpairsSig(h,hSig,hFrom,k,ecart,0,strat, atR);
     
    40734062  const int iCompH = pGetComp(h);
    40744063
    4075 #ifdef HAVE_RINGS
    40764064  if (rField_is_Ring(currRing))
    40774065  {
     
    40894077  }
    40904078  else
    4091 #endif
    40924079  for (j=0; j<=k; j++)
    40934080  {
     
    42374224  else
    42384225  {
    4239 #ifdef HAVE_RINGS
    42404226    if (rField_is_Ring(currRing))
    42414227    {
     
    42654251    }
    42664252    else
    4267 #endif
    42684253    if (pLmCmp(set[length],p)== -cmp_int)
    42694254      return length+1;
     
    58875872          (ecart== LONG_MAX || ecart>= strat->ecartS[j]))
    58885873        {
    5889 #ifdef HAVE_RINGS
    58905874            if(rField_is_Ring(r))
    58915875                {if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), r))
    58925876                     break;}
    58935877            else
    5894 #endif
    58955878            break;
    58965879        }
     
    59005883          p_LmDivisibleBy(strat->S[j], p, r))
    59015884        {
    5902 #ifdef HAVE_RINGS
    59035885            if(rField_is_Ring(r))
    59045886                {if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), r))
    59055887                    break;}
    59065888            else
    5907 #endif
    59085889            break;
    59095890        }
     
    59395920          (ecart== LONG_MAX || ecart>= strat->ecartS[j]))
    59405921        {
    5941 #ifdef HAVE_RINGS
    59425922            if(rField_is_Ring(r))
    59435923                {if(n_DivBy(pGetCoeff(p), pGetCoeff(t->t_p), r))
    59445924                    return t;}
    59455925            else
    5946 #endif
    59475926            return t;
    59485927        }
     
    59545933        if (p_LmDivisibleBy(t->t_p, p, r))
    59555934        {
    5956 #ifdef HAVE_RINGS
    59575935            if(rField_is_Ring(r))
    59585936                {if(n_DivBy(pGetCoeff(p), pGetCoeff(t->t_p), r))
    59595937                    return t;}
    59605938            else
    5961 #endif
    59625939            return t;
    59635940        }
     
    73627339      {
    73637340        change=FALSE;
    7364         #ifdef HAVE_RINGS
    73657341        if(rField_is_Ring(currRing))
    73667342            any_change = FALSE;
    7367         #endif
    73687343        if (((strat->fromQ==NULL) || (strat->fromQ[i]==0)) && (i>0))
    73697344        {
     
    79687943  strat->sevT[atT] = (p.sev == 0 ? pGetShortExpVector(p.p) : p.sev);
    79697944  #if 1
    7970   #ifdef HAVE_RINGS
    79717945  if(rField_is_Ring(currRing) && rHasLocalOrMixedOrdering(currRing) && !n_IsUnit(p.p->coef, currRing->cf))
    79727946  {
     
    79927966  }
    79937967  //getchar();*/
    7994   #endif
    79957968  #endif
    79967969  kTest_T(&(strat->T[atT]));
     
    80728045  //can be used also if the ideal is not homogenous
    80738046  if((rHasLocalOrMixedOrdering(currRing)) && (rHasMixedOrdering(currRing)==FALSE))
    8074   #ifdef HAVE_RINGS
    8075   {
    8076   if(rField_is_Ring(currRing))
     8047  {
     8048    if(rField_is_Ring(currRing))
    80778049          *hilb=NULL;
    8078   else
     8050    else
    80798051           return;
    80808052  }
    8081 #endif
    80828053  if (strat->homog!=isHomog)
    80838054  {
     
    80928063  if (TEST_OPT_SB_1)
    80938064    strat->chainCrit=chainCritOpt_1;
    8094 #ifdef HAVE_RINGS
    80958065  if (rField_is_Ring(currRing))
    80968066  {
     
    80988068    strat->chainCrit=chainCritRing;
    80998069  }
    8100 #endif
    81018070#ifdef HAVE_RATGRING
    81028071  if (rIsRatGRing(currRing))
     
    81358104#endif
    81368105
    8137 #ifdef HAVE_RINGS
    81388106  // Coefficient ring?
    81398107  if (rField_is_Ring(currRing))
     
    81438111    strat->honey = FALSE;
    81448112  }
    8145 #endif
    81468113  #ifdef KDEBUG
    81478114  if (TEST_OPT_DEBUG)
     
    81728139    strat->syzCrit  = syzCriterion;
    81738140  }
    8174 #ifdef HAVE_RINGS
    81758141  if (rField_is_Ring(currRing))
    81768142  {
     
    81788144    strat->chainCrit=chainCritRing;
    81798145  }
    8180 #endif
    81818146#ifdef HAVE_RATGRING
    81828147  if (rIsRatGRing(currRing))
     
    82088173#endif
    82098174
    8210 #ifdef HAVE_RINGS
    82118175  // Coefficient ring?
    82128176  if (rField_is_Ring(currRing))
     
    82168180    strat->honey = FALSE;
    82178181  }
    8218 #endif
    82198182  #ifdef KDEBUG
    82208183  if (TEST_OPT_DEBUG)
     
    83208283  else if (BTEST1(12) || BTEST1(14) || BTEST1(16) || BTEST1(18))
    83218284    strat->posInT = posInT1;
    8322 #ifdef HAVE_RINGS
    83238285  if (rField_is_Ring(currRing))
    83248286  {
     
    83288290    strat->posInT = posInT11;
    83298291  }
    8330 #endif
    83318292  strat->posInLDependsOnLength = kPosInLDependsOnLength(strat->posInL);
    83328293}
     
    83668327    if (strat->kNoether!=NULL) pSetComp(strat->kNoetherTail(), strat->ak);
    83678328  }
    8368   #ifdef HAVE_RINGS
    83698329  if(rField_is_Ring(currRing))
    83708330  {
     
    83728332  }
    83738333  else
    8374   #endif
    83758334  {
    83768335    if(TEST_OPT_SB_1)
     
    84018360  strat->noTailReduction = !TEST_OPT_REDTAIL;
    84028361  if ((!TEST_OPT_SB_1)
    8403   #ifdef HAVE_RINGS
    84048362  || (rField_is_Ring(currRing))
    8405   #endif
    84068363  )
    84078364  {
     
    85138470  else if (BTEST1(12) || BTEST1(14) || BTEST1(16) || BTEST1(18))
    85148471    strat->posInT = posInT1;
    8515 #ifdef HAVE_RINGS
    85168472  if (rField_is_Ring(currRing))
    85178473  {
     
    85218477    strat->posInT = posInT11;
    85228478  }
    8523 #endif
    85248479  strat->posInLDependsOnLength = FALSE;
    85258480  strat->posInLSba  = posInLSig;
     
    85648519    if (strat->kNoether!=NULL) pSetComp(strat->kNoetherTail(), strat->ak);
    85658520  }
    8566   #ifdef HAVE_RINGS
    85678521  if(rField_is_Ring(currRing))
    85688522  {
     
    85708524  }
    85718525  else
    8572   #endif
    85738526  {
    85748527    if(TEST_OPT_SB_1)
     
    85988551  if (!TEST_OPT_SB_1)
    85998552  {
    8600     #ifdef HAVE_RINGS
    8601     if(!rField_is_Ring(currRing))
    8602     #endif
    8603     updateS(TRUE,strat);
     8553    if(!rField_is_Ring(currRing)) updateS(TRUE,strat);
    86048554  }
    86058555  //if (strat->fromQ!=NULL) omFreeSize(strat->fromQ,IDELEMS(strat->Shdl)*sizeof(int));
     
    86688618          &&(pLmDivisibleBy(Q->m[q],r->m[l])))
    86698619          {
    8670             #if HAVE_RINGS
    86718620            if(!rField_is_Ring(currRing) || n_DivBy(r->m[l]->coef, Q->m[q]->coef, currRing))
    8672             #endif
    86738621            {
    86748622                if (TEST_OPT_REDSB)
     
    87658713            && (r->m[q]!=NULL)
    87668714            &&(pLmDivisibleBy(r->m[l],r->m[q]))
    8767             #if HAVE_RINGS
    87688715            && (!rField_is_Ring(currRing) ||
    87698716                n_DivBy(r->m[q]->coef, r->m[l]->coef, currRing))
    8770             #endif
    87718717            )
    87728718            {
    87738719                //If they are equal then take the one with the smallest length
    87748720                if(pLmDivisibleBy(r->m[q],r->m[l])
    8775                 #ifdef HAVE_RINGS
    87768721                && ((rField_is_Ring(currRing)
    87778722                && n_DivBy(r->m[q]->coef, r->m[l]->coef, currRing))
    87788723                || !(rField_is_Ring(currRing)))
    8779                 #endif
    87808724                && (pLength(r->m[q]) < pLength(r->m[l]) ||
    87818725                (pLength(r->m[q]) == pLength(r->m[l]) && nGreaterZero(r->m[q]->coef))))
     
    89338877  scComputeHC(strat->Shdl,NULL,strat->ak,strat->kHEdge, strat->tailRing);
    89348878#endif
     8879  if (strat->kHEdge==NULL) return FALSE;
    89358880  if (strat->t_kHEdge != NULL) p_LmFree(strat->t_kHEdge, strat->tailRing);
    89368881  if (strat->tailRing != currRing)
     
    89748919    return TRUE;
    89758920  }
    8976   #ifdef HAVE_RINGS
    89778921  if (rField_is_Ring(currRing))
    89788922    pLmDelete(newNoether);
    89798923  else
    8980   #endif
    89818924    pLmFree(newNoether);
    89828925  return FALSE;
     
    93669309  // Hmmm .. the condition pFDeg == p_Deg
    93679310  // might be too strong
    9368 #ifdef HAVE_RINGS
    9369   (strat->homog && currRing->pFDeg == p_Deg && !(rField_is_Ring(currRing))), // TODO Oliver
    9370 #else
    9371   (strat->homog && currRing->pFDeg == p_Deg), // omit_degree
    9372 #endif
     9311  (strat->homog && currRing->pFDeg == p_Deg && !(rField_is_Ring(currRing))), // omit degree
    93739312  (strat->ak==0), // omit_comp if the input is an ideal
    93749313  expbound); // exp_limit
     
    1020810147    if (strat->kNoether!=NULL) pSetComp(strat->kNoetherTail(), strat->ak);
    1020910148  }
    10210   #ifdef HAVE_RINGS
    1021110149  if(rField_is_Ring(currRing))
    1021210150  {
    1021310151    /*Shdl=*/initSL(F, Q,strat); /*sets also S, ecartS, fromQ */
    1021410152  }
    10215   #endif
    1021610153  {
    1021710154    if(TEST_OPT_SB_1)
     
    1024210179  {
    1024310180    /* the only change: we do not fill the set T*/
    10244     #ifdef HAVE_RINGS
    10245     if(!rField_is_Ring(currRing))
    10246     #endif
    10247     updateS(FALSE,strat);
     10181    if(!rField_is_Ring(currRing)) updateS(FALSE,strat);
    1024810182  }
    1024910183  if (strat->fromQ!=NULL) omFreeSize(strat->fromQ,IDELEMS(strat->Shdl)*sizeof(int));
     
    1069610630  int j=pos;
    1069710631
    10698 #ifdef HAVE_RINGS
    1069910632  assume (!rField_is_Ring(currRing));
    10700 #endif
    1070110633  initenterpairsShift(h,k,ecart,0,strat, atR,uptodeg,lV);
    1070210634  if ( (!strat->fromT)
  • kernel/GBEngine/syz.cc

    rf8fb93d re6f1e6  
    534534      res[/*syzIndex+*/1] = idSyzygies(res[0/*syzIndex*/],hom,&w,FALSE,setRegularity,&Kstd1_deg);
    535535      if ((!TEST_OPT_NOTREGULARITY) && (Kstd1_deg>0)
    536       #ifdef HAVE_RINGS
    537536      && (!rField_is_Ring(currRing))
    538       #endif
    539537      ) si_opt_1 |= Sy_bit(OPT_DEGBOUND);
    540538    }
  • kernel/combinatorics/hdegree.cc

    rf8fb93d re6f1e6  
    10171017    for(i=0;i<=idElem(S);i++)
    10181018    {
    1019       if(p_IsPurePower(SS->m[i],tailRing)==0)
     1019      if((SS->m[i]!=NULL)
     1020      && ((p_IsPurePower(SS->m[i],tailRing)==0)
     1021        ||(!n_IsUnit(pGetCoeff(SS->m[i]), tailRing->cf))))
    10201022      {
    10211023        p_Delete(&SS->m[i],tailRing);
  • kernel/ideals.cc

    rf8fb93d re6f1e6  
    5858  intvec * wth;
    5959  BOOLEAN homog;
    60   #ifdef HAVE_RINGS
    6160  if(rField_is_Ring(currRing))
    6261  {
     
    6564      return e;
    6665  }
    67   #endif
    6866  homog = idHomModule(h1,currRing->qideal,&wth);
    6967  if (rHasGlobalOrdering(currRing))
     
    656654  && (h==isHomog)
    657655  && (!rIsPluralRing(currRing))
    658   #ifdef HAVE_RINGS
    659656  && (!rField_is_Ring(currRing))
    660   #endif
    661657  )
    662658  {
     
    12931289    }
    12941290    h4->m[IDELEMS(h4)-1] = p;
    1295     #ifdef HAVE_RINGS
    1296     if(!rField_is_Ring(currRing))
    1297     #endif
    1298     si_opt_1 |= Sy_bit(OPT_SB_1);
     1291    if(!rField_is_Ring(currRing)) si_opt_1 |= Sy_bit(OPT_SB_1);
    12991292  }
    13001293  idDelete(&temph1);
  • libpolys/coeffs/coeffs.h

    rf8fb93d re6f1e6  
    744744
    745745// Tests:
     746#ifdef HAVE_RINGS
    746747static FORCE_INLINE BOOLEAN nCoeff_is_Ring_2toM(const coeffs r)
    747748{ assume(r != NULL); return (getCoeffType(r)==n_Z2m); }
     
    758759static FORCE_INLINE BOOLEAN nCoeff_is_Ring(const coeffs r)
    759760{ assume(r != NULL); return (r->is_field==0); }
     761#else
     762#define nCoeff_is_Ring_2toM(A) 0
     763#define nCoeff_is_Ring_ModN(A) 0
     764#define nCoeff_is_Ring_PtoM(A) 0
     765#define nCoeff_is_Ring_Z(A)    0
     766#define nCoeff_is_Ring(A)      0
     767#endif
    760768
    761769/// returns TRUE, if r is a field or r has no zero divisors (i.e is a domain)
  • libpolys/polys/kbuckets.cc

    rf8fb93d re6f1e6  
    588588      if (i<coef_start)
    589589        bucket->buckets[i] = p_Mult_nn(bucket->buckets[i], n, r);
    590 #ifdef HAVE_RINGS
    591590        /* Frank Seelisch on March 11, 2010:
    592591           This looks a bit strange: The following "if" is indented
     
    601600          kBucketAdjust(bucket, i);
    602601        }
    603 #endif
    604602      else
    605603      if (bucket->coef[i]!=NULL)
     
    613611#else
    614612      bucket->buckets[i] = p_Mult_nn(bucket->buckets[i], n, r);
    615 #ifdef HAVE_RINGS
    616613      if (rField_is_Ring(r) && !(rField_is_Domain(r)))
    617614      {
     
    619616        kBucketAdjust(bucket, i);
    620617      }
    621 #endif
    622618#endif
    623619    }
     
    719715  i = pLogLength(l1);
    720716
    721 #if defined(HAVE_RINGS)||defined(HAVE_PLURAL)
     717#if defined(HAVE_PLURAL)
    722718  if ((rField_is_Ring(r) && !(rField_is_Domain(r)))
    723719  ||(rIsPluralRing(r)))
  • libpolys/polys/monomials/p_polys.cc

    rf8fb93d re6f1e6  
    12211221
    12221222/*2
    1223 *test if a monomial /head term is a pure power
     1223*test if a monomial /head term is a pure power,
     1224* i.e. depends on only one variable
    12241225*/
    12251226int p_IsPurePower(const poly p, const ring r)
    12261227{
    1227 #ifdef HAVE_RINGS
    1228   if (rField_is_Ring(r))
    1229           {
    1230           if (p == NULL) return 0;
    1231           if (!n_IsUnit(pGetCoeff(p), r->cf)) return 0;
    1232           }
    1233 #endif
    12341228  int i,k=0;
    12351229
     
    21842178          }
    21852179          if ((pNext(rc) != NULL)
    2186 #ifdef HAVE_RINGS
    21872180             || rField_is_Ring(r)
    2188 #endif
    21892181             )
    21902182            return p_Pow(p,i,r);
     
    22302222
    22312223
    2232 #ifdef HAVE_RINGS
    22332224  if (rField_is_Ring(r))
    22342225  {
     
    22552246    return;
    22562247  }
    2257 #endif
    22582248  number h,d;
    22592249  poly p;
     
    27332723  number d, h;
    27342724
    2735 #ifdef HAVE_RINGS
    27362725  if (rField_is_Ring(r))
    27372726  {
     
    27402729    return p;
    27412730  }
    2742 #endif
    27432731
    27442732  if (rField_is_Zp(r) && TEST_OPT_INTSTRATEGY)
     
    30283016  poly p;
    30293017
    3030 #ifdef HAVE_RINGS
    30313018  if (rField_is_Ring(r))
    30323019  {
     
    30363023    return;
    30373024  }
    3038 #endif
    30393025
    30403026  if (rField_is_Zp(r) && TEST_OPT_INTSTRATEGY)
     
    35773563void p_Norm(poly p1, const ring r)
    35783564{
    3579 #ifdef HAVE_RINGS
    35803565  if (rField_is_Ring(r))
    35813566  {
     
    35833568    // Werror("p_Norm not possible in the case of coefficient rings.");
    35843569  }
    3585   else
    3586 #endif
    3587   if (p1!=NULL)
     3570  else if (p1!=NULL)
    35883571  {
    35893572    if (pNext(p1)==NULL)
     
    43954378  if (pLength(p1) != pLength(p2))
    43964379    return FALSE;
    4397 #ifdef HAVE_RINGS
    43984380  if (rField_is_Ring(r))
    43994381  {
    44004382    if (!n_DivBy(p_GetCoeff(p1, r), p_GetCoeff(p2, r), r)) return FALSE;
    44014383  }
    4402 #endif
    44034384  n=n_Div(p_GetCoeff(p1,r),p_GetCoeff(p2,r),r);
    44044385  while ((p1 != NULL) /*&& (p2 != NULL)*/)
  • libpolys/polys/monomials/p_polys.h

    rf8fb93d re6f1e6  
    18071807{
    18081808  if (p == NULL) return FALSE;
    1809 #ifdef HAVE_RINGS
    18101809  if (rField_is_Ring(r))
    18111810    return (p_LmIsConstant(p, r) && n_IsUnit(pGetCoeff(p),r->cf));
    1812 #endif
    18131811  return p_LmIsConstant(p, r);
    18141812}
  • libpolys/polys/monomials/ring.cc

    rf8fb93d re6f1e6  
    33753375  if ( (r->cf->extRing!=NULL)
    33763376      || rField_is_Q(r)
    3377 #ifdef HAVE_RINGS
    33783377      || rField_is_Ring(r)
    3379 #endif
    33803378  )
    33813379    r->options |= Sy_bit(OPT_INTSTRATEGY);
     
    51185116  if (rField_is_Q_a(r))    return getCoeffType(r->cf);
    51195117  if (rField_is_long_C(r)) return n_long_C;
    5120   #ifdef HAVE_RINGS
    5121    if (rField_is_Ring_Z(r)) return n_Z;
    5122    if (rField_is_Ring_ModN(r)) return n_Zn;
    5123    if (rField_is_Ring_PtoM(r)) return n_Znm;
    5124    if (rField_is_Ring_2toM(r)) return  n_Z2m;
    5125   #endif
     5118  if (rField_is_Ring_Z(r)) return n_Z;
     5119  if (rField_is_Ring_ModN(r)) return n_Zn;
     5120  if (rField_is_Ring_PtoM(r)) return n_Znm;
     5121  if (rField_is_Ring_2toM(r)) return  n_Z2m;
    51265122
    51275123  return n_unknown;
  • libpolys/polys/operations/p_Mult_q.cc

    rf8fb93d re6f1e6  
    7070  assume(p != NULL && pNext(p) != NULL && q != NULL && pNext(q) != NULL);
    7171  pAssume1(! pHaveCommonMonoms(p, q));
    72 #ifdef HAVE_RINGS
    7372  assume(!rField_is_Ring(r) || rField_is_Domain(r));
    74 #endif
    7573  assume(lp >= 1 && lq >= 1);
    7674  p_Test(p, r);
  • libpolys/polys/simpleideals.cc

    rf8fb93d re6f1e6  
    267267        if (id->m[j]!=NULL)
    268268        {
    269 #ifdef HAVE_RINGS
    270269          if (rField_is_Ring(r))
    271270          {
     
    281280            if (p_ComparePolys(id->m[i], id->m[j],r)) p_Delete(&id->m[j],r);
    282281          }
    283 #else
    284           if (p_ComparePolys(id->m[i], id->m[j],r)) p_Delete(&id->m[j],r);
    285 #endif
    286282        }
    287283      }
     
    357353        if (id->m[j]!=NULL)
    358354        {
    359 #ifdef HAVE_RINGS
    360355          if (rField_is_Ring(r))
    361356          {
     
    372367          else
    373368          {
    374 #endif
    375           /* the case of a ground field: */
    376           if (p_DivisibleBy(id->m[i], id->m[j],r))
    377           {
    378             p_Delete(&id->m[j],r);
     369            /* the case of a ground field: */
     370            if (p_DivisibleBy(id->m[i], id->m[j],r))
     371            {
     372              p_Delete(&id->m[j],r);
     373            }
     374            else if (p_DivisibleBy(id->m[j], id->m[i],r))
     375            {
     376              p_Delete(&id->m[i],r);
     377              break;
     378            }
    379379          }
    380           else if (p_DivisibleBy(id->m[j], id->m[i],r))
    381           {
    382             p_Delete(&id->m[i],r);
    383             break;
    384           }
    385 #ifdef HAVE_RINGS
    386           }
    387 #endif
    388380        }
    389381      }
     
    14331425      if (componentIsUsed[j]==0)
    14341426      {
    1435 #ifdef HAVE_RINGS
    14361427        if (p_LmIsConstantComp(p,r) &&
    14371428            (!rField_is_Ring(r) || n_IsUnit(pGetCoeff(p),r->cf)))
    14381429        {
    1439 #else
    1440         if (p_LmIsConstantComp(p,r))
    1441         {
    1442 #endif
    14431430          generator = i;
    14441431          componentIsUsed[j] = 1;
Note: See TracChangeset for help on using the changeset viewer.