Changeset ef2729 in git for kernel/GBEngine/kutil.cc
- Timestamp:
- Jul 26, 2016, 2:59:40 PM (8 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
- Children:
- e40da9f8133273ff0b3617f2e95f7bedfa0266bc
- Parents:
- d249822f7b7eb06239bfc2809c5847e0265ceb97
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kutil.cc
rd249822 ref2729 12 12 #define MYTEST 0 13 13 14 #define ADIDEBUG 014 //#define ADIDEBUG 0 15 15 //All vs Just strategy over rings: 16 16 // 1 - Just … … 344 344 if (rField_is_Ring(r) /*&& (rHasLocalOrMixedOrdering(r))*/) 345 345 lc = pGetCoeff(p); 346 #if ADIDEBUG346 #ifdef ADIDEBUG 347 347 printf("\n cancelunit\n"); 348 348 pWrite(p); … … 407 407 // Note: As long as qring j forbidden if j contains integer (i.e. ground rings are 408 408 // domains), no zerodivisor test needed CAUTION 409 #if ADIDEBUG409 #ifdef ADIDEBUG 410 410 pWrite(h); 411 411 #endif 412 412 if (!n_DivBy(pGetCoeff(h),lc,r->cf)) 413 413 { 414 #if ADIDEBUG414 #ifdef ADIDEBUG 415 415 printf("\nDoes not divide\n"); 416 416 #endif 417 417 return; 418 418 } 419 #if ADIDEBUG419 #ifdef ADIDEBUG 420 420 printf("\nDivides. Go On\n"); 421 421 #endif … … 1276 1276 compare=pDivCompRing(strat->B[j].lcm,h.lcm); 1277 1277 compareCoeff = n_DivComp(pGetCoeff(strat->B[j].lcm), pGetCoeff(h.lcm), currRing->cf); 1278 #if ADIDEBUG1278 #ifdef ADIDEBUG 1279 1279 printf("\nChainCrit in enteronepairring\n"); 1280 1280 printf("\nB[j]\n"); … … 1297 1297 if ((strat->fromQ==NULL) || (isFromQ==0) || (strat->fromQ[i]==0)) 1298 1298 { 1299 #if ADIDEBUG1299 #ifdef ADIDEBUG 1300 1300 printf("\nGelöscht h\n"); 1301 1301 #endif … … 1308 1308 if(compareCoeff == pDivComp_GREATER) 1309 1309 { 1310 #if ADIDEBUG1310 #ifdef ADIDEBUG 1311 1311 printf("\nGelöscht: B[j]\n"); 1312 1312 #endif … … 1318 1318 if ((strat->fromQ==NULL) || (isFromQ==0) || (strat->fromQ[i]==0)) 1319 1319 { 1320 #if ADIDEBUG1320 #ifdef ADIDEBUG 1321 1321 printf("\nGelöscht h\n"); 1322 1322 #endif … … 1334 1334 if ((strat->fromQ==NULL) || (isFromQ==0) || (strat->fromQ[i]==0)) 1335 1335 { 1336 #if ADIDEBUG1336 #ifdef ADIDEBUG 1337 1337 printf("\nGelöscht h\n"); 1338 1338 #endif … … 1345 1345 if(compare == pDivComp_GREATER) 1346 1346 { 1347 #if ADIDEBUG1347 #ifdef ADIDEBUG 1348 1348 printf("\nGelöscht: B[j]\n"); 1349 1349 #endif … … 1355 1355 number s, t; 1356 1356 poly m1, m2, gcd = NULL; 1357 #if ADIDEBUG1357 #ifdef ADIDEBUG 1358 1358 printf("\nTrying to add spair S[%i] und p\n",i);pWrite(strat->S[i]);pWrite(p); 1359 1359 #endif … … 1424 1424 //h.pCleardenom(); 1425 1425 //pSetm(h.p); 1426 #if ADIDEBUG1426 #ifdef ADIDEBUG 1427 1427 printf("\nThis is afterwards:\n"); 1428 1428 pWrite(h.p); … … 1448 1448 if (currRing!=strat->tailRing) 1449 1449 h.t_p = k_LmInit_currRing_2_tailRing(h.p, strat->tailRing); 1450 #if ADIDEBUG1450 #ifdef ADIDEBUG 1451 1451 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); 1452 1452 #endif … … 1586 1586 } 1587 1587 //#if 1 1588 #if ADIDEBUG1588 #ifdef ADIDEBUG 1589 1589 printf("\nThis strong poly was added to L:\n");pWrite(h.p);pWrite(h.p1);pWrite(h.p2); 1590 1590 #endif … … 1624 1624 if(pairsig!= NULL && pLtCmp(pairsig,h->sig) == 0) 1625 1625 { 1626 #if ADIDEBUG1626 #ifdef ADIDEBUG 1627 1627 printf("\nCan replace * (sig = *) with * (sig = *) since of * with sig *\n"); 1628 1628 pWrite(h->p);pWrite(h->sig);pWrite(gcd);pWrite(pairsig);pWrite(strat->S[i]);pWrite(strat->sig[i]); … … 1768 1768 if(h.sig == NULL) 1769 1769 { 1770 #if ADIDEBUG1770 #ifdef ADIDEBUG 1771 1771 printf("\nPossible sigdrop in enterpairstrongSig (due to lost of sig)\n"); 1772 1772 #endif … … 1775 1775 //Try to reduce it as far as we can via redRing 1776 1776 int red_result = redRing(&h,strat); 1777 #if ADIDEBUG1777 #ifdef ADIDEBUG 1778 1778 printf("\nAfter redRing reduce:\n");pWrite(h.p); 1779 1779 #endif … … 1781 1781 { 1782 1782 // Cancel the sigdrop 1783 #if ADIDEBUG1783 #ifdef ADIDEBUG 1784 1784 printf("\nCancel the sigdrop. It reduced to 0\n"); 1785 1785 #endif … … 1790 1790 else 1791 1791 { 1792 #if ADIDEBUG1792 #ifdef ADIDEBUG 1793 1793 printf("\nSigdrop. end\n"); 1794 1794 #endif … … 1808 1808 if(rField_is_Ring(currRing) && pLtCmp(h.sig,sig) == -1) 1809 1809 { 1810 #if ADIDEBUG1810 #ifdef ADIDEBUG 1811 1811 printf("\nSigDrop in enteronestrongpolySig\n"); 1812 1812 pWrite(h.sig); … … 1820 1820 { 1821 1821 // Reduced to 0 1822 #if ADIDEBUG1822 #ifdef ADIDEBUG 1823 1823 printf("\nCancel the sigdrop after redRing (=0)\n"); 1824 1824 #endif … … 1829 1829 else 1830 1830 { 1831 #if ADIDEBUG1831 #ifdef ADIDEBUG 1832 1832 printf("\nAfter redRing still sigdrop:\n");pWrite(h.p); 1833 1833 #endif … … 1840 1840 } 1841 1841 } 1842 #if ADIDEBUG1842 #ifdef ADIDEBUG 1843 1843 printf("\nThis strong poly was added to L:\n");pWrite(h.p);pWrite(h.p1);pWrite(h.p2);pWrite(h.sig); 1844 1844 #endif … … 1846 1846 if(gcd != NULL && pLtCmp(sig,pairsig) > 0 && pLtCmp(strat->sig[i],pairsig) > 0) 1847 1847 { 1848 #if ADIDEBUG1848 #ifdef ADIDEBUG 1849 1849 printf("\nSigDrop in strongpair\noriginals: ");pWrite(sig);pWrite(strat->sig[i]); 1850 1850 printf("\nnow: ");pWrite(pairsig); … … 2383 2383 #endif 2384 2384 { 2385 #if ADIDEBUG2385 #ifdef ADIDEBUG 2386 2386 printf("\nTrying to add p and S[%i]\n",i); 2387 2387 pWrite(p);pWrite(pSig); … … 2440 2440 pSetCoeff0(m1,s); 2441 2441 pSetCoeff0(m2,t); 2442 #if ADIDEBUG2442 #ifdef ADIDEBUG 2443 2443 printf("\nIn Spoly: m1, m2 :\n");pWrite(m1);pWrite(m2); 2444 2444 #endif … … 2506 2506 if(sigCmp == 0) 2507 2507 { 2508 #if ADIDEBUG2508 #ifdef ADIDEBUG 2509 2509 printf("\nPossible sigdrop in enterpairSig (due to lost of sig)\n"); 2510 2510 #endif … … 2523 2523 } 2524 2524 int red_result = redRing(&Lp,strat); 2525 #if ADIDEBUG2525 #ifdef ADIDEBUG 2526 2526 printf("\nAfter redRing reduce:\n");pWrite(Lp.p); 2527 2527 #endif … … 2529 2529 { 2530 2530 // Cancel the sigdrop 2531 #if ADIDEBUG2531 #ifdef ADIDEBUG 2532 2532 printf("\nCancel the sigdrop. It reduced to 0\n"); 2533 2533 #endif … … 2538 2538 else 2539 2539 { 2540 #if ADIDEBUG2540 #ifdef ADIDEBUG 2541 2541 printf("\nSigdrop. end\n"); 2542 2542 #endif … … 2593 2593 ) 2594 2594 { 2595 #if ADIDEBUG2595 #ifdef ADIDEBUG 2596 2596 printf("\nDELETED!\n"); 2597 2597 #endif … … 2707 2707 { 2708 2708 pLmFree(Lp.lcm); 2709 #if ADIDEBUG2709 #ifdef ADIDEBUG 2710 2710 printf("\nrewCrit3 deletes it!\n"); 2711 2711 #endif … … 2779 2779 if(rField_is_Ring(currRing) && pLtCmp(Lp.sig,pSig) == -1) 2780 2780 { 2781 #if ADIDEBUG2781 #ifdef ADIDEBUG 2782 2782 printf("\nSigDrop in enteronepairSig\n");pWrite(Lp.sig); 2783 2783 pWrite(p);pWrite(pSig); … … 2790 2790 { 2791 2791 // Reduced to 0 2792 #if ADIDEBUG2792 #ifdef ADIDEBUG 2793 2793 printf("\nCancel the sigdrop after redRing (=0)\n"); 2794 2794 #endif … … 2799 2799 else 2800 2800 { 2801 #if ADIDEBUG2801 #ifdef ADIDEBUG 2802 2802 printf("\nAfter redRing still sigdrop:\n");pWrite(Lp.p); 2803 2803 #endif … … 2810 2810 } 2811 2811 } 2812 #if ADIDEBUG2812 #ifdef ADIDEBUG 2813 2813 printf("\nThis spair was added to B:\n"); 2814 2814 pWrite(Lp.p); … … 3546 3546 for (j=0; j<=k; j++) 3547 3547 { 3548 #if ADIDEBUG3548 #ifdef ADIDEBUG 3549 3549 PrintS("\n Trying to add spoly : \n"); 3550 3550 PrintS(" ");p_Write(h, strat->tailRing); … … 3688 3688 } 3689 3689 #endif 3690 #if ADIDEBUG3690 #ifdef ADIDEBUG 3691 3691 printf("\nChainCrit1\n"); 3692 3692 pWrite(strat->B[i].p); … … 3713 3713 if ((pNext(strat->L[j].p) == strat->tail) || (rHasGlobalOrdering(currRing))) 3714 3714 { 3715 #if ADIDEBUG3715 #ifdef ADIDEBUG 3716 3716 printf("\nChainCrit2\n"); 3717 3717 pWrite(strat->L[j].p); … … 3782 3782 } 3783 3783 #endif 3784 #if ADIDEBUG3784 #ifdef ADIDEBUG 3785 3785 printf("\nChainCrit3\n"); 3786 3786 pWrite(strat->L[j].p); … … 4431 4431 if(Lp.sig == NULL || nIsZero(pGetCoeff(Lp.sig))) 4432 4432 { 4433 #if ADIDEBUG4433 #ifdef ADIDEBUG 4434 4434 printf("\nSigdrop in enterextended spoly\n");pWrite(h);pWrite(hSig); 4435 4435 #endif … … 4437 4437 //Try to reduce it as far as we can via redRing 4438 4438 int red_result = redRing(&Lp,strat); 4439 #if ADIDEBUG4439 #ifdef ADIDEBUG 4440 4440 printf("\nAfter redRing reduce:\n");pWrite(Lp.p); 4441 4441 #endif … … 4443 4443 { 4444 4444 // Cancel the sigdrop 4445 #if ADIDEBUG4445 #ifdef ADIDEBUG 4446 4446 printf("\nCancel the sigdrop. It reduced to 0\n"); 4447 4447 #endif … … 4452 4452 else 4453 4453 { 4454 #if ADIDEBUG4454 #ifdef ADIDEBUG 4455 4455 printf("\nSigdrop. end\n"); 4456 4456 #endif … … 4542 4542 assume (rField_is_Ring(currRing)); 4543 4543 // enter also zero divisor * poly, if this is non zero and of smaller degree 4544 #if ADIDEBUG4544 #ifdef ADIDEBUG 4545 4545 printf("\n Trying to add extended spolys\n"); 4546 4546 #endif 4547 4547 if (!(rField_is_Domain(currRing))) enterExtendedSpolySig(h, hSig, strat); 4548 4548 if(strat->sigdrop) return; 4549 #if ADIDEBUG4549 #ifdef ADIDEBUG 4550 4550 printf("\n Trying to add spolys\n"); 4551 4551 #endif 4552 4552 initenterpairsSig(h, hSig, hFrom, k, ecart, 0, strat, atR); 4553 4553 if(strat->sigdrop) return; 4554 #if ADIDEBUG4554 #ifdef ADIDEBUG 4555 4555 printf("\n Trying to add gcd-polys\n"); 4556 4556 #endif … … 6775 6775 PrintS("DELETE!\n"); 6776 6776 #endif 6777 #if ADIDEBUG6777 #ifdef ADIDEBUG 6778 6778 printf("\nsyzCrit:\n");pWrite(strat->syz[k]);pWrite(sig); 6779 6779 #endif … … 6828 6828 (n_DivBy(pGetCoeff(sig), pGetCoeff(strat->syz[k]),currRing) && pLtCmp(sig,strat->syz[k]) == 1))) 6829 6829 { 6830 #if ADIDEBUG6830 #ifdef ADIDEBUG 6831 6831 printf("\nsyzCrit:\n");pWrite(strat->syz[k]);pWrite(sig); 6832 6832 #endif … … 6867 6867 PrintS("DELETE!\n"); 6868 6868 #endif 6869 #if ADIDEBUG6869 #ifdef ADIDEBUG 6870 6870 printf("\nFaugere RewCrit: * divisible by *\n");pWrite(sig);pWrite(strat->sig[k]); 6871 6871 #endif … … 6924 6924 #endif 6925 6925 { 6926 #if ADIDEBUG6926 #ifdef ADIDEBUG 6927 6927 printf("\narriRewCrit deleted: sig, P.sig\n"); 6928 6928 … … 9049 9049 } 9050 9050 strat->T[atT] = (TObject) p; 9051 #if ADIDEBUG9051 #ifdef ADIDEBUG 9052 9052 printf("\nenterT: add in position %i\n",atT); 9053 9053 pWrite(p.p);pWrite(p.sig); … … 9135 9135 } 9136 9136 strat->T[atT] = (TObject) p; 9137 #if ADIDEBUG9137 #ifdef ADIDEBUG 9138 9138 printf("\nenterT_strong: add in position %i\n",atT); 9139 9139 pWrite(p.p); … … 9155 9155 && !n_IsUnit(p.p->coef, currRing->cf)) 9156 9156 { 9157 #if ADIDEBUG9157 #ifdef ADIDEBUG 9158 9158 printf("\nDas ist p:\n");pWrite(p.p); 9159 9159 #endif … … 9162 9162 if(strat->T[i].ecart <= p.ecart && pLmDivisibleBy(strat->T[i].p,p.p)) 9163 9163 { 9164 #if ADIDEBUG9164 #ifdef ADIDEBUG 9165 9165 printf("\nFound one: %i\n",i);pWrite(strat->T[i].p); 9166 9166 #endif … … 9186 9186 void enterSyz(LObject &p, kStrategy strat, int atT) 9187 9187 { 9188 #if ADIDEBUG9188 #ifdef ADIDEBUG 9189 9189 printf("\n Entersyz:\n");pWrite(p.sig); 9190 9190 #endif … … 9245 9245 { 9246 9246 //printf("\nYES!\n"); 9247 #if ADIDEBUG9247 #ifdef ADIDEBUG 9248 9248 printf("\n syzCrit deleted!\n");pWrite(strat->L[cc].p);pWrite(strat->L[cc].sig); 9249 9249 #endif
Note: See TracChangeset
for help on using the changeset viewer.