Changeset ef2729 in git for kernel/GBEngine/kutil.cc


Ignore:
Timestamp:
Jul 26, 2016, 2:59:40 PM (8 years ago)
Author:
Adi Popescu <adi_popescum@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
e40da9f8133273ff0b3617f2e95f7bedfa0266bc
Parents:
d249822f7b7eb06239bfc2809c5847e0265ceb97
Message:
rep: #if ADIDEBUG with #ifdef ADIDEBUG
rem: wait in extra.cc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/kutil.cc

    rd249822 ref2729  
    1212#define MYTEST 0
    1313
    14 #define ADIDEBUG 0
     14//#define ADIDEBUG 0
    1515//All vs Just strategy over rings:
    1616// 1 - Just
     
    344344  if (rField_is_Ring(r) /*&& (rHasLocalOrMixedOrdering(r))*/)
    345345    lc = pGetCoeff(p);
    346   #if ADIDEBUG
     346  #ifdef ADIDEBUG
    347347  printf("\n        cancelunit\n");
    348348  pWrite(p);
     
    407407      // Note: As long as qring j forbidden if j contains integer (i.e. ground rings are
    408408      //       domains), no zerodivisor test needed  CAUTION
    409       #if ADIDEBUG
     409      #ifdef ADIDEBUG
    410410      pWrite(h);
    411411      #endif
    412412      if (!n_DivBy(pGetCoeff(h),lc,r->cf))
    413413      {
    414         #if ADIDEBUG
     414        #ifdef ADIDEBUG
    415415        printf("\nDoes not divide\n");
    416416        #endif
    417417        return;
    418418      }
    419       #if ADIDEBUG
     419      #ifdef ADIDEBUG
    420420      printf("\nDivides. Go On\n");
    421421      #endif
     
    12761276    compare=pDivCompRing(strat->B[j].lcm,h.lcm);
    12771277    compareCoeff = n_DivComp(pGetCoeff(strat->B[j].lcm), pGetCoeff(h.lcm), currRing->cf);
    1278     #if ADIDEBUG
     1278    #ifdef ADIDEBUG
    12791279    printf("\nChainCrit in enteronepairring\n");
    12801280    printf("\nB[j]\n");
     
    12971297        if ((strat->fromQ==NULL) || (isFromQ==0) || (strat->fromQ[i]==0))
    12981298        {
    1299           #if ADIDEBUG
     1299          #ifdef ADIDEBUG
    13001300          printf("\nGelöscht h\n");
    13011301          #endif
     
    13081308      if(compareCoeff == pDivComp_GREATER)
    13091309      {
    1310         #if ADIDEBUG
     1310        #ifdef ADIDEBUG
    13111311        printf("\nGelöscht: B[j]\n");
    13121312        #endif
     
    13181318        if ((strat->fromQ==NULL) || (isFromQ==0) || (strat->fromQ[i]==0))
    13191319        {
    1320           #if ADIDEBUG
     1320          #ifdef ADIDEBUG
    13211321          printf("\nGelöscht h\n");
    13221322          #endif
     
    13341334        if ((strat->fromQ==NULL) || (isFromQ==0) || (strat->fromQ[i]==0))
    13351335        {
    1336           #if ADIDEBUG
     1336          #ifdef ADIDEBUG
    13371337          printf("\nGelöscht h\n");
    13381338          #endif
     
    13451345      if(compare == pDivComp_GREATER)
    13461346      {
    1347         #if ADIDEBUG
     1347        #ifdef ADIDEBUG
    13481348        printf("\nGelöscht: B[j]\n");
    13491349        #endif
     
    13551355  number s, t;
    13561356  poly m1, m2, gcd = NULL;
    1357   #if ADIDEBUG
     1357  #ifdef ADIDEBUG
    13581358  printf("\nTrying to add spair S[%i] und p\n",i);pWrite(strat->S[i]);pWrite(p);
    13591359  #endif
     
    14241424  //h.pCleardenom();
    14251425  //pSetm(h.p);
    1426   #if ADIDEBUG
     1426  #ifdef ADIDEBUG
    14271427  printf("\nThis is afterwards:\n");
    14281428  pWrite(h.p);
     
    14481448  if (currRing!=strat->tailRing)
    14491449    h.t_p = k_LmInit_currRing_2_tailRing(h.p, strat->tailRing);
    1450   #if ADIDEBUG
     1450  #ifdef ADIDEBUG
    14511451  printf("\nThis s-poly was added to B:\n");pWrite(h.p);pWrite(h.p1);pWrite(h.p2);printf("\ni_r1 = %i, i_r2 = %i\n",h.i_r1, h.i_r2);pWrite(strat->T[h.i_r1].p);pWrite(strat->T[h.i_r2].p);
    14521452  #endif
     
    15861586  }
    15871587  //#if 1
    1588   #if ADIDEBUG
     1588  #ifdef ADIDEBUG
    15891589  printf("\nThis strong poly was added to L:\n");pWrite(h.p);pWrite(h.p1);pWrite(h.p2);
    15901590  #endif
     
    16241624      if(pairsig!= NULL && pLtCmp(pairsig,h->sig) == 0)
    16251625      {
    1626         #if ADIDEBUG
     1626        #ifdef ADIDEBUG
    16271627        printf("\nCan replace * (sig = *) with * (sig = *) since of * with sig *\n");
    16281628        pWrite(h->p);pWrite(h->sig);pWrite(gcd);pWrite(pairsig);pWrite(strat->S[i]);pWrite(strat->sig[i]);
     
    17681768  if(h.sig == NULL)
    17691769    {
    1770       #if ADIDEBUG
     1770      #ifdef ADIDEBUG
    17711771      printf("\nPossible sigdrop in enterpairstrongSig (due to lost of sig)\n");
    17721772      #endif
     
    17751775      //Try to reduce it as far as we can via redRing
    17761776      int red_result = redRing(&h,strat);
    1777       #if ADIDEBUG
     1777      #ifdef ADIDEBUG
    17781778      printf("\nAfter redRing reduce:\n");pWrite(h.p);
    17791779      #endif
     
    17811781      {
    17821782        // Cancel the sigdrop
    1783         #if ADIDEBUG
     1783        #ifdef ADIDEBUG
    17841784        printf("\nCancel the sigdrop. It reduced to 0\n");
    17851785        #endif
     
    17901790      else
    17911791      {
    1792         #if ADIDEBUG
     1792        #ifdef ADIDEBUG
    17931793        printf("\nSigdrop. end\n");
    17941794        #endif
     
    18081808    if(rField_is_Ring(currRing) &&  pLtCmp(h.sig,sig) == -1)
    18091809    {
    1810       #if ADIDEBUG
     1810      #ifdef ADIDEBUG
    18111811      printf("\nSigDrop in enteronestrongpolySig\n");
    18121812      pWrite(h.sig);
     
    18201820      {
    18211821        // Reduced to 0
    1822         #if ADIDEBUG
     1822        #ifdef ADIDEBUG
    18231823        printf("\nCancel the sigdrop after redRing (=0)\n");
    18241824        #endif
     
    18291829      else
    18301830      {
    1831         #if ADIDEBUG
     1831        #ifdef ADIDEBUG
    18321832        printf("\nAfter redRing still sigdrop:\n");pWrite(h.p);
    18331833        #endif
     
    18401840      }
    18411841    }
    1842   #if ADIDEBUG
     1842  #ifdef ADIDEBUG
    18431843  printf("\nThis strong poly was added to L:\n");pWrite(h.p);pWrite(h.p1);pWrite(h.p2);pWrite(h.sig);
    18441844  #endif
     
    18461846  if(gcd != NULL && pLtCmp(sig,pairsig) > 0 && pLtCmp(strat->sig[i],pairsig) > 0)
    18471847  {
    1848     #if ADIDEBUG
     1848    #ifdef ADIDEBUG
    18491849    printf("\nSigDrop in strongpair\noriginals: ");pWrite(sig);pWrite(strat->sig[i]);
    18501850    printf("\nnow: ");pWrite(pairsig);
     
    23832383#endif
    23842384{
    2385   #if ADIDEBUG
     2385  #ifdef ADIDEBUG
    23862386  printf("\nTrying to add p and S[%i]\n",i);
    23872387  pWrite(p);pWrite(pSig);
     
    24402440    pSetCoeff0(m1,s);
    24412441    pSetCoeff0(m2,t);
    2442     #if ADIDEBUG
     2442    #ifdef ADIDEBUG
    24432443    printf("\nIn Spoly: m1, m2 :\n");pWrite(m1);pWrite(m2);
    24442444    #endif
     
    25062506    if(sigCmp == 0)
    25072507    {
    2508       #if ADIDEBUG
     2508      #ifdef ADIDEBUG
    25092509      printf("\nPossible sigdrop in enterpairSig (due to lost of sig)\n");
    25102510      #endif
     
    25232523      }
    25242524      int red_result = redRing(&Lp,strat);
    2525       #if ADIDEBUG
     2525      #ifdef ADIDEBUG
    25262526      printf("\nAfter redRing reduce:\n");pWrite(Lp.p);
    25272527      #endif
     
    25292529      {
    25302530        // Cancel the sigdrop
    2531         #if ADIDEBUG
     2531        #ifdef ADIDEBUG
    25322532        printf("\nCancel the sigdrop. It reduced to 0\n");
    25332533        #endif
     
    25382538      else
    25392539      {
    2540         #if ADIDEBUG
     2540        #ifdef ADIDEBUG
    25412541        printf("\nSigdrop. end\n");
    25422542        #endif
     
    25932593      )
    25942594  {
    2595     #if ADIDEBUG
     2595    #ifdef ADIDEBUG
    25962596    printf("\nDELETED!\n");
    25972597    #endif
     
    27072707    {
    27082708      pLmFree(Lp.lcm);
    2709       #if ADIDEBUG
     2709      #ifdef ADIDEBUG
    27102710      printf("\nrewCrit3 deletes it!\n");
    27112711      #endif
     
    27792779    if(rField_is_Ring(currRing) && pLtCmp(Lp.sig,pSig) == -1)
    27802780    {
    2781       #if ADIDEBUG
     2781      #ifdef ADIDEBUG
    27822782      printf("\nSigDrop in enteronepairSig\n");pWrite(Lp.sig);
    27832783      pWrite(p);pWrite(pSig);
     
    27902790      {
    27912791        // Reduced to 0
    2792         #if ADIDEBUG
     2792        #ifdef ADIDEBUG
    27932793        printf("\nCancel the sigdrop after redRing (=0)\n");
    27942794        #endif
     
    27992799      else
    28002800      {
    2801         #if ADIDEBUG
     2801        #ifdef ADIDEBUG
    28022802        printf("\nAfter redRing still sigdrop:\n");pWrite(Lp.p);
    28032803        #endif
     
    28102810      }
    28112811    }
    2812     #if ADIDEBUG
     2812    #ifdef ADIDEBUG
    28132813    printf("\nThis spair was added to B:\n");
    28142814    pWrite(Lp.p);
     
    35463546        for (j=0; j<=k; j++)
    35473547        {
    3548           #if ADIDEBUG
     3548          #ifdef ADIDEBUG
    35493549          PrintS("\n Trying to add spoly : \n");
    35503550          PrintS("                ");p_Write(h, strat->tailRing);
     
    36883688              }
    36893689#endif
    3690               #if ADIDEBUG
     3690              #ifdef ADIDEBUG
    36913691              printf("\nChainCrit1\n");
    36923692              pWrite(strat->B[i].p);
     
    37133713        if ((pNext(strat->L[j].p) == strat->tail) || (rHasGlobalOrdering(currRing)))
    37143714        {
    3715           #if ADIDEBUG
     3715          #ifdef ADIDEBUG
    37163716          printf("\nChainCrit2\n");
    37173717          pWrite(strat->L[j].p);
     
    37823782          }
    37833783#endif
    3784           #if ADIDEBUG
     3784          #ifdef ADIDEBUG
    37853785          printf("\nChainCrit3\n");
    37863786          pWrite(strat->L[j].p);
     
    44314431      if(Lp.sig == NULL || nIsZero(pGetCoeff(Lp.sig)))
    44324432      {
    4433         #if ADIDEBUG
     4433        #ifdef ADIDEBUG
    44344434        printf("\nSigdrop in enterextended spoly\n");pWrite(h);pWrite(hSig);
    44354435        #endif
     
    44374437        //Try to reduce it as far as we can via redRing
    44384438        int red_result = redRing(&Lp,strat);
    4439         #if ADIDEBUG
     4439        #ifdef ADIDEBUG
    44404440        printf("\nAfter redRing reduce:\n");pWrite(Lp.p);
    44414441        #endif
     
    44434443        {
    44444444          // Cancel the sigdrop
    4445           #if ADIDEBUG
     4445          #ifdef ADIDEBUG
    44464446          printf("\nCancel the sigdrop. It reduced to 0\n");
    44474447          #endif
     
    44524452        else
    44534453        {
    4454           #if ADIDEBUG
     4454          #ifdef ADIDEBUG
    44554455          printf("\nSigdrop. end\n");
    44564456          #endif
     
    45424542  assume (rField_is_Ring(currRing));
    45434543  // enter also zero divisor * poly, if this is non zero and of smaller degree
    4544   #if ADIDEBUG
     4544  #ifdef ADIDEBUG
    45454545  printf("\n      Trying to add extended spolys\n");
    45464546  #endif
    45474547  if (!(rField_is_Domain(currRing))) enterExtendedSpolySig(h, hSig, strat);
    45484548  if(strat->sigdrop) return;
    4549   #if ADIDEBUG
     4549  #ifdef ADIDEBUG
    45504550  printf("\n      Trying to add spolys\n");
    45514551  #endif
    45524552  initenterpairsSig(h, hSig, hFrom, k, ecart, 0, strat, atR);
    45534553  if(strat->sigdrop) return;
    4554   #if ADIDEBUG
     4554  #ifdef ADIDEBUG
    45554555  printf("\n      Trying to add gcd-polys\n");
    45564556  #endif
     
    67756775      PrintS("DELETE!\n");
    67766776#endif
    6777       #if ADIDEBUG
     6777      #ifdef ADIDEBUG
    67786778      printf("\nsyzCrit:\n");pWrite(strat->syz[k]);pWrite(sig);
    67796779      #endif
     
    68286828      (n_DivBy(pGetCoeff(sig), pGetCoeff(strat->syz[k]),currRing) && pLtCmp(sig,strat->syz[k]) == 1)))
    68296829      {
    6830         #if ADIDEBUG
     6830        #ifdef ADIDEBUG
    68316831        printf("\nsyzCrit:\n");pWrite(strat->syz[k]);pWrite(sig);
    68326832        #endif
     
    68676867      PrintS("DELETE!\n");
    68686868#endif
    6869       #if ADIDEBUG
     6869      #ifdef ADIDEBUG
    68706870      printf("\nFaugere RewCrit: * divisible by *\n");pWrite(sig);pWrite(strat->sig[k]);
    68716871      #endif
     
    69246924      #endif
    69256925      {
    6926         #if ADIDEBUG
     6926        #ifdef ADIDEBUG
    69276927        printf("\narriRewCrit deleted: sig, P.sig\n");
    69286928       
     
    90499049  }
    90509050  strat->T[atT] = (TObject) p;
    9051   #if ADIDEBUG
     9051  #ifdef ADIDEBUG
    90529052  printf("\nenterT: add in position %i\n",atT);
    90539053  pWrite(p.p);pWrite(p.sig);
     
    91359135  }
    91369136  strat->T[atT] = (TObject) p;
    9137   #if ADIDEBUG
     9137  #ifdef ADIDEBUG
    91389138  printf("\nenterT_strong: add in position %i\n",atT);
    91399139  pWrite(p.p);
     
    91559155  && !n_IsUnit(p.p->coef, currRing->cf))
    91569156  {
    9157     #if ADIDEBUG
     9157    #ifdef ADIDEBUG
    91589158    printf("\nDas ist p:\n");pWrite(p.p);
    91599159    #endif
     
    91629162      if(strat->T[i].ecart <= p.ecart && pLmDivisibleBy(strat->T[i].p,p.p))
    91639163      {
    9164         #if ADIDEBUG
     9164        #ifdef ADIDEBUG
    91659165        printf("\nFound one: %i\n",i);pWrite(strat->T[i].p);
    91669166        #endif
     
    91869186void enterSyz(LObject &p, kStrategy strat, int atT)
    91879187{
    9188   #if ADIDEBUG
     9188  #ifdef ADIDEBUG
    91899189  printf("\n  Entersyz:\n");pWrite(p.sig);
    91909190  #endif
     
    92459245    {
    92469246      //printf("\nYES!\n");
    9247       #if ADIDEBUG
     9247      #ifdef ADIDEBUG
    92489248      printf("\n syzCrit deleted!\n");pWrite(strat->L[cc].p);pWrite(strat->L[cc].sig);
    92499249      #endif
Note: See TracChangeset for help on using the changeset viewer.