Changeset 86ff333 in git
- Timestamp:
- Feb 7, 2018, 4:15:27 PM (6 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- b589d885903c0731e6b4e32e8bc16f6db8315b8f
- Parents:
- 2d5de0e852ecfab863aa4029489f8f45a35259f2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/khstd.cc
r2d5de0e r86ff333 21 21 22 22 #include "kernel/polys.h" 23 24 #define ADIDEBUG 025 26 23 27 24 /*2 … … 153 150 newhilb =hHstdSeries(Lm,w,strat->kHomW,Q,currRing); // ,strat->tailRing? 154 151 155 #if ADIDEBUG156 PrintS("\nOriginal\n");157 int i, j, l, k;158 if (hilb == NULL)159 return;160 l = hilb->length()-1;161 k = (*hilb)[l];162 for (i = 0; i < l; i++)163 {164 j = (*hilb)[i];165 if (j != 0)166 {167 Print("// %8d t^%d\n", j, i+k);168 }169 }170 PrintS("\nActual\n");171 if (newhilb == NULL)172 return;173 l = newhilb->length()-1;174 k = (*newhilb)[l];175 for (i = 0; i < l; i++)176 {177 j = (*newhilb)[i];178 if (j != 0)179 {180 Print("// %8d t^%d\n", j, i+k);181 }182 }183 #endif184 185 152 if(newhilb->compare(hilb) == 0) 186 153 { -
kernel/GBEngine/kspoly.cc
r2d5de0e r86ff333 20 20 #include "kernel/polys.h" 21 21 #endif 22 23 //#define ADIDEBUG 024 22 25 23 #ifdef KDEBUG … … 516 514 kStrategy strat) 517 515 { 518 #ifdef ADIDEBUG519 printf("\nksReducePolySig\n");520 pWrite(PR->p);pWrite(PR->sig);521 pWrite(PW->p);pWrite(PW->sig);522 #endif523 516 #ifdef KDEBUG 524 517 red_count++; … … 614 607 if(PR->sig == NULL) 615 608 { 616 #ifdef ADIDEBUG617 printf("\nPossible sigdrop in ksreducepolysig (lost signature)\n");618 #endif619 609 strat->sigdrop=TRUE; 620 610 } … … 633 623 if(pLtCmp(PR->sig,origsig) == -1) 634 624 { 635 #ifdef ADIDEBUG636 printf("\nSigdrop in ksreducepolysig from * to *\n");pWrite(origsig);pWrite(PR->sig);637 #endif638 625 strat->sigdrop=TRUE; 639 626 } -
kernel/GBEngine/kstd1.cc
r2d5de0e r86ff333 12 12 #define MORA_USE_BUCKETS 13 13 14 //#define ADIDEBUG 015 //#define ADIDEBUG_NF 016 14 #define PRE_INTEGER_CHECK 0 17 15 … … 351 349 long d,reddeg; 352 350 353 354 #ifdef ADIDEBUG_NF355 int iii;356 PrintS("\n---------------------------- NEW REDRILOC COMPUTATION ----------------------------\n");357 PrintS(" The pair h :\n");358 PrintS("\n p1 = "); p_Write(h->p1,strat->tailRing);359 PrintS("\n p2 = "); p_Write(h->p2,strat->tailRing);360 PrintS("\n p = "); p_Write(h->p,strat->tailRing);361 PrintS("\n The actual reducer T is: ");362 if(strat->tl<0)363 {PrintS(" Empty.\n");}364 else365 {366 for (iii=0;iii<=strat->tl;iii++)367 {368 Print("\n T[%i] = ",iii);p_Write(strat->T[iii].p,strat->tailRing);369 }370 }371 #endif /* ADIDEBUG_NF */372 373 351 d = h->GetpFDeg()+ h->ecart; 374 352 reddeg = strat->LazyDegree+d; 375 353 h->SetShortExpVector(); 376 #ifdef ADIDEBUG_NF377 Print("\n Searching for a poly in T that divides h (of ecart %i) ...\n",h->ecart);378 #endif379 354 loop 380 355 { 381 356 j = kFindDivisibleByInT(strat, h); 382 #ifdef ADIDEBUG_NF383 if(j != -1)384 {385 ei = strat->T[j].ecart;386 Print("\n Found one: T[%i] of ecart %i: ",j,ei);387 p_Write(strat->T[j].p,strat->tailRing);388 PrintS("\n Try to find another with smaller ecart:\n");389 }390 else391 {392 PrintS("\n No poly in T divides h.\n");393 }394 //getchar();395 #endif396 357 if (j < 0) 397 358 { … … 420 381 ei = strat->T[j].ecart; 421 382 ii = j; 422 #ifdef ADIDEBUG_NF423 iii=ii;424 #endif425 383 if (ei > h->ecart && ii < strat->tl) 426 384 { … … 451 409 { 452 410 // the polynomial to reduce with is now 453 #ifdef ADIDEBUG_NF454 printf("\n Intermidiate one, h.ecart = %i < ecart = %i < ei = %i: ",h->ecart,strat->T[i].ecart, ei);455 pWrite(strat->T[i].p);456 #endif457 411 ii = i; 458 412 ei = strat->T[i].ecart; … … 461 415 } 462 416 } 463 464 #ifdef ADIDEBUG_NF465 if(iii == ii)466 {467 PrintS("\n None was found.\n");468 }469 else470 {471 Print("\n A better one (ecart = %i): T[%i] = ",ei,ii);472 p_Write(strat->T[ii].p,strat->tailRing);473 PrintLn();474 }475 #endif476 417 } 477 418 … … 479 420 if (ei > h->ecart) 480 421 { 481 #ifdef ADIDEBUG_NF482 printf("\nHAD TO REDUCE WITH BIGGER ECART!!!\n");483 #endif484 422 // It is not possible to reduce h with smaller ecart; 485 423 // if possible h goes to the lazy-set L,i.e … … 516 454 if (h->IsNull()) 517 455 { 518 #ifdef ADIDEBUG_NF519 printf("\nReduced to 0. Exit\n");520 #endif521 456 if (h->lcm!=NULL) pLmDelete(h->lcm); 522 457 h->Clear(); … … 537 472 // this has the side effect of setting h->length 538 473 h->ecart = h->pLDeg(strat->LDegLast) - h->GetpFDeg(); 539 #ifdef ADIDEBUG_NF540 printf("\n Partial Reduced (ecart %i) h = ",h->ecart);p_Write(h->p,strat->tailRing);541 PrintLn();542 #endif543 474 /*- try to reduce the s-polynomial -*/ 544 475 pass++; … … 853 784 if (H.p==NULL) return NULL; 854 785 } 855 #ifdef ADIDEBUG_NF856 printf("\nSearching for a reducer...\n");857 #endif858 786 if (p_LmShortDivisibleBy(strat->T[j].GetLmTailRing(), strat->sevT[j], H.GetLmTailRing(), not_sev, strat->tailRing) 859 787 && (n_DivBy(H.p->coef, strat->T[j].p->coef,strat->tailRing->cf)) … … 865 793 int li = strat->T[j].length; 866 794 int ii = j; 867 #ifdef ADIDEBUG_NF868 printf("\nFound: j = %i, ecart = %i\nTrying to find a better one...\n",j,ei);pWrite(strat->T[j].p);869 #endif870 795 /* 871 796 * the polynomial to reduce with (up to the moment) is; … … 893 818 li = strat->T[j].length; 894 819 ii = j; 895 #ifdef ADIDEBUG_NF896 printf("\nFound a better one: j = %i, ecart = %i\nTrying to find a better one...\n",j,ei);897 pWrite(strat->T[j].p);898 #endif899 820 } 900 821 } … … 914 835 * we have to reduce with bad ecart: H has to enter in T 915 836 */ 916 #ifdef ADIDEBUG_NF917 printf("\nHAVE TO REDUCE IT WITH BIGGER ECART\n");918 #endif919 837 doRed(&H,&(strat->T[ii]),TRUE,strat,TRUE); 920 838 if (H.p == NULL) … … 930 848 return NULL; 931 849 } 932 #ifdef ADIDEBUG_NF933 printf("\nAfter the small reduction it looks like this:\n");pWrite(H.p);934 getchar();935 #endif936 850 /*- try to reduce the s-polynomial -*/ 937 851 o = H.SetpFDeg(); … … 1604 1518 ideal mora (ideal F, ideal Q,intvec *w,intvec *hilb,kStrategy strat) 1605 1519 { 1606 #ifdef HAVE_RINGS1607 #ifdef ADIDEBUG1608 int loop_count;1609 loop_count = 1;1610 #endif1611 #endif1612 1520 int olddeg = 0; 1613 1521 int reduc = 0; … … 1672 1580 while (strat->Ll >= 0) 1673 1581 { 1674 #ifdef ADIDEBUG1675 printf("\n ------------------------NEW LOOP\n");1676 printf("\nShdl = \n");1677 for(int iii = 0; iii<= strat->sl; iii++)1678 {1679 printf("S[%i]:",iii);1680 p_Write(strat->S[iii], strat->tailRing);1681 }1682 printf("\n list L has %i\n", strat->Ll);1683 int iii;1684 #ifdef ADIDEBUG1685 for(iii = 0; iii<= strat->Ll; iii++)1686 {1687 printf("L[%i]:",iii);1688 pWrite(strat->L[iii].p);1689 pWrite(strat->L[iii].p1);1690 pWrite(strat->L[iii].p2);1691 }1692 #endif1693 getchar();1694 #endif1695 1582 #ifdef KDEBUG 1696 1583 if (TEST_OPT_DEBUG) messageSets(strat); 1697 1584 #endif 1698 if (TEST_OPT_DEGBOUND 1699 && (strat->L[strat->Ll].ecart+strat->L[strat->Ll].GetpFDeg()> Kstd1_deg)) 1585 if (siCntrlc 1586 || (TEST_OPT_DEGBOUND 1587 && (strat->L[strat->Ll].ecart+strat->L[strat->Ll].GetpFDeg()> Kstd1_deg))) 1700 1588 { 1701 1589 /* … … 1703 1591 * - 24 (degBound) 1704 1592 * && upper degree is bigger than Kstd1_deg 1593 * or siCntrlc 1705 1594 */ 1706 while ((strat->Ll >= 0) 1707 && (strat->L[strat->Ll].p1!=NULL) && (strat->L[strat->Ll].p2!=NULL) 1708 && (strat->L[strat->Ll].ecart+strat->L[strat->Ll].GetpFDeg()> Kstd1_deg) 1595 while ((strat->Ll >= 0) && 1596 siCntrlc 1597 || ((strat->L[strat->Ll].p1!=NULL) && (strat->L[strat->Ll].p2!=NULL) 1598 && (strat->L[strat->Ll].ecart+strat->L[strat->Ll].GetpFDeg()> Kstd1_deg)) 1709 1599 ) 1710 1600 { … … 1759 1649 message(strat->P.ecart+strat->P.GetpFDeg(),&olddeg,&reduc,strat, red_result); 1760 1650 // reduce 1761 #ifdef ADIDEBUG1762 printf("\nThis is P vor red:\n");p_Write(strat->P.p,strat->tailRing);p_Write(strat->P.p1,strat->tailRing);p_Write(strat->P.p2,strat->tailRing);1763 printf("\nBefore Ll = %i\n", strat->Ll);1764 #endif1765 1651 red_result = strat->red(&strat->P,strat); 1766 #ifdef ADIDEBUG1767 printf("\nThis is P nach red:\n");p_Write(strat->P.p,strat->tailRing);p_Write(strat->P.p1,strat->tailRing);p_Write(strat->P.p2,strat->tailRing);1768 printf("\nAfter Ll = %i\n", strat->Ll);1769 #endif1770 1652 } 1771 1653 … … 1805 1687 enterpairs(strat->P.p,strat->sl,strat->P.ecart,0,strat, strat->tl); 1806 1688 // put in S 1807 1808 #ifdef ADIDEBUG1809 Print("\n The new pair list L -- after superenterpairs in loop %d -- is:\n",loop_count);1810 for(int iii=0;iii<=strat->Ll;iii++)1811 {1812 printf("\n L[%d]:\n",iii);1813 PrintS(" ");p_Write(strat->L[iii].p,strat->tailRing);1814 PrintS(" ");p_Write(strat->L[iii].p1,strat->tailRing);1815 PrintS(" ");p_Write(strat->L[iii].p2,strat->tailRing);1816 }1817 #endif1818 1689 strat->enterS(strat->P, 1819 1690 posInS(strat,strat->sl,strat->P.p, strat->P.ecart), 1820 1691 strat, strat->tl); 1821 #ifdef ADIDEBUG1822 printf("\nThis pair has been added to S:\n");1823 pWrite(strat->P.p);1824 pWrite(strat->P.p1);1825 pWrite(strat->P.p2);1826 #endif1827 1828 1692 // apply hilbert criterion 1829 1693 if (hilb!=NULL) … … 2321 2185 { 2322 2186 idInsertPoly(FCopy, pFmon); 2323 #ifdef ADIDEBUG2324 printf("\nPreintegerCheck found this constant:\n");pWrite(pFmon);2325 #endif2326 2327 2187 strat->kModW=kModW=NULL; 2328 2188 if (h==testHomog) … … 2357 2217 strat->homog=h; 2358 2218 } 2359 #ifdef ADIDEBUG2360 else2361 {2362 printf("\npreIntegerCheck didn't found any new information\n");2363 }2364 #endif2365 2219 omTestMemory(1); 2366 2220 if(w == NULL) … … 2553 2407 int sbaEnterS = -1; 2554 2408 bool sigdrop = TRUE; 2555 #ifdef ADIDEBUG2556 printf("\nEnter the nice kSba loop\n");2557 #endif2558 2409 //This is how we set the SBA algorithm; 2559 2410 int totalsbaruns = 1,blockedreductions = 20,blockred = 0,loops = 0; … … 2679 2530 r=sba(r,Q,NULL,hilb,strat); 2680 2531 } 2681 #ifdef ADIDEBUG2682 printf("\nSBA Run %i: %i elements (syzCrit = %i,rewCrit = %i)\n",loops,IDELEMS(r),strat->nrsyzcrit,strat->nrrewcrit);2683 idPrint(r);2684 //getchar();2685 #endif2686 2532 } 2687 2533 } … … 2700 2546 sbaEnterS = strat->sbaEnterS; 2701 2547 blockred = strat->blockred; 2702 #ifdef ADIDEBUG2703 printf("\nsbaEnterS = %i\n",sbaEnterS);2704 #endif2705 2548 delete(strat); 2706 2549 if ((delete_w)&&(w!=NULL)&&(*w!=NULL)) delete *w; … … 2709 2552 if(sigdrop || blockred > blockedreductions) 2710 2553 { 2711 #ifdef ADIDEBUG2712 printf("\nWent to std\n");2713 idPrint(r);2714 getchar();2715 #endif2716 2554 r = kStd(r, Q, h, w, hilb, syzComp, newIdeal, vw); 2717 2555 } -
kernel/GBEngine/kstd2.cc
r2d5de0e r86ff333 10 10 #include "kernel/mod2.h" 11 11 12 //#define ADIDEBUG 113 12 #define GCD_SBA 1 14 13 … … 879 878 assume(rField_is_Ring(currRing)); 880 879 #if GCD_SBA 881 #ifdef ADIDEBUG882 printf("\nBefore sbaCheckGcdPair ");pWrite(h->p);883 #endif884 880 while(sbaCheckGcdPair(h,strat)) 885 881 { 886 #ifdef ADIDEBUG887 printf("\nIntermidiate sbaCheckGcdPair ");pWrite(h->p);888 #endif889 882 h->sev = pGetShortExpVector(h->p); 890 883 } 891 #ifdef ADIDEBUG892 printf("\nAfter sbaCheckGcdPair ");pWrite(h->p);893 #endif894 884 #endif 895 885 poly beforeredsig; … … 900 890 //printf("FDEGS: %ld -- %ld\n",h->FDeg, h->pFDeg()); 901 891 assume(h->FDeg == h->pFDeg()); 902 #ifdef ADIDEBUG903 printf("\n--------------------------redSig-------------------------------------\n");904 printf("\nBefore redSig:\n");905 p_Write(h->p,strat->tailRing);pWrite(h->sig);906 #endif907 892 //#if 1 908 893 #ifdef DEBUGF5 … … 935 920 { 936 921 #if GCD_SBA 937 #ifdef ADIDEBUG938 printf("\nBefore sbaCheckGcdPair ");pWrite(h->p);939 #endif940 922 while(sbaCheckGcdPair(h,strat)) 941 923 { 942 #ifdef ADIDEBUG943 printf("\nIntermidiate sbaCheckGcdPair ");pWrite(h->p);944 #endif945 924 h->sev = pGetShortExpVector(h->p); 946 925 h->is_redundant = FALSE; 947 926 start = 0; 948 927 } 949 #ifdef ADIDEBUG950 printf("\nAfter sbaCheckGcdPair ");pWrite(h->p);951 #endif952 928 #endif 953 929 // over ZZ: cleanup coefficients by complete reduction with monomials … … 970 946 if(pLtCmp(beforeredsig,h->sig) == 1) 971 947 { 972 #ifdef ADIDEBUG973 printf("\nSigDrop after reduce\n");pWrite(beforeredsig);pWrite(h->sig);974 #endif975 948 strat->sigdrop = TRUE; 976 949 //Reduce it as much as you can … … 979 952 { 980 953 //It reduced to 0, cancel the sigdrop 981 #ifdef ADIDEBUG982 printf("\nReduced to 0 via redRing. Cancel sigdrop\n");983 #endif984 954 strat->sigdrop = FALSE; 985 955 p_Delete(&h->sig,currRing);h->sig = NULL; … … 988 958 else 989 959 { 990 #ifdef ADIDEBUG991 printf("\nReduced to this via redRing.SIGDROP\n");pWrite(h->p);992 #endif993 960 //strat->enterS(*h, strat->sl+1, strat, strat->tl); 994 961 return 0; … … 1059 1026 printf("INDEX OF REDUCER T: %d\n",ii); 1060 1027 #endif 1061 #ifdef ADIDEBUG1062 printf("\nWe reduce it with:\n");p_Write(strat->T[ii].p,strat->tailRing);pWrite(strat->T[ii].sig);1063 #endif1064 1028 sigSafe = ksReducePolySigRing(h, &(strat->T[ii]), strat->S_2_R[ii], NULL, NULL, strat); 1065 #ifdef ADIDEBUG1066 printf("\nAfter small reduction:\n");pWrite(h->p);pWrite(h->sig);1067 #endif1068 1029 if(h->p == NULL && h->sig == NULL) 1069 1030 { … … 1076 1037 if(rField_is_Ring(currRing) && h->p != NULL && pLmCmp(h->p,strat->T[ii].p)==0) 1077 1038 { 1078 #ifdef ADIDEBUG1079 printf("\nReducer and Original have same LT. Force it with redRing!\n");1080 #endif1081 1039 int red_result = redRing(h,strat); 1082 1040 if(red_result == 0) 1083 1041 { 1084 #ifdef ADIDEBUG1085 printf("\nRedRing reduced it to 0. Perfect\n");1086 #endif1087 1042 pDelete(&h->sig);h->sig = NULL; 1088 1043 return 0; … … 1090 1045 else 1091 1046 { 1092 #ifdef ADIDEBUG1093 printf("\nRedRing reduced it to *.\nHave to sigdrop now\n");pWrite(h->p);1094 #endif1095 1047 strat->sigdrop = TRUE; 1096 1048 return 1; … … 1233 1185 } 1234 1186 strat->redTailChange=TRUE; 1235 #ifdef ADIDEBUG1236 printf("\nWill TAILreduce * with *:\n");p_Write(Ln.p,strat->tailRing);pWrite(Ln.sig);1237 p_Write(With->p,strat->tailRing);pWrite(With->sig);pWrite(L->sig);1238 #endif1239 1187 int ret = ksReducePolyTailSig(L, With, &Ln, strat); 1240 1188 if(rField_is_Ring(currRing)) … … 1242 1190 //Because Ln.sig is set to L->sig, but in ksReducePolyTailSig -> ksReducePolySig 1243 1191 // I delete it an then set Ln.sig. Hence L->sig is lost 1244 #ifdef ADIDEBUG1245 printf("\nAfter small TAILreduce:\n");pWrite(Ln.p);pWrite(Ln.sig);pWrite(L->sig);1246 #endif1247 1192 #if SBA_PRINT_REDUCTION_STEPS 1248 1193 if (ret != 3) … … 2014 1959 while (strat->Ll >= 0) 2015 1960 { 2016 #ifdef ADIDEBUG2017 printf("\n ------------------------NEW LOOP\n");2018 printf("\nShdl = \n");2019 #if 02020 idPrint(strat->Shdl);2021 #else2022 for(int ii = 0; ii<=strat->sl;ii++)2023 p_Write(strat->S[ii],strat->tailRing);2024 #endif2025 printf("\n list L\n");2026 int iii;2027 #if 12028 for(iii = 0; iii<= strat->Ll; iii++)2029 {2030 printf("L[%i]:",iii);2031 p_Write(strat->L[iii].p, currRing);2032 p_Write(strat->L[iii].p1, currRing);2033 p_Write(strat->L[iii].p2, currRing);2034 }2035 #else2036 {2037 printf("L[%i]:",strat->Ll);2038 p_Write(strat->L[strat->Ll].p, strat->tailRing);2039 p_Write(strat->L[strat->Ll].p1, strat->tailRing);2040 p_Write(strat->L[strat->Ll].p2, strat->tailRing);2041 }2042 #endif2043 #if 02044 for(iii = 0; iii<= strat->Bl; iii++)2045 {2046 printf("B[%i]:",iii);2047 p_Write(strat->B[iii].p, /*strat->tailRing*/currRing);2048 p_Write(strat->B[iii].p1, /*strat->tailRing*/currRing);2049 p_Write(strat->B[iii].p2, strat->tailRing);2050 }2051 #endif2052 //getchar();2053 #endif2054 1961 #ifdef KDEBUG 2055 1962 if (TEST_OPT_DEBUG) messageSets(strat); 2056 1963 #endif 2057 1964 if (strat->Ll== 0) strat->interpt=TRUE; 2058 if (TEST_OPT_DEGBOUND 1965 if (siCntrlc 1966 || (TEST_OPT_DEGBOUND 2059 1967 && ((strat->honey && (strat->L[strat->Ll].ecart+currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg)) 2060 || ((!strat->honey) && (currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg)))) 1968 || ((!strat->honey) && (currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))))) 2061 1969 { 2062 1970 /* … … 2064 1972 * 24 IN test and the degree +ecart of L[strat->Ll] is bigger then 2065 1973 *a predefined number Kstd1_deg 1974 * or siCntrlc 2066 1975 */ 2067 1976 while ((strat->Ll >= 0) 2068 && (strat->L[strat->Ll].p1!=NULL) && (strat->L[strat->Ll].p2!=NULL) 2069 && ((strat->honey && (strat->L[strat->Ll].ecart+currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg)) 1977 && (siCntrlc || 1978 ((strat->L[strat->Ll].p1!=NULL) && (strat->L[strat->Ll].p2!=NULL) 1979 && ((strat->honey && (strat->L[strat->Ll].ecart+currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg)) 2070 1980 || ((!strat->honey) && (currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))) 2071 ) 1981 ))) 2072 1982 deleteInL(strat->L,&strat->Ll,strat->Ll,strat); 2073 1983 if (strat->Ll<0) break; … … 2207 2117 // posInS only depends on the leading term 2208 2118 strat->enterS(strat->P, pos, strat, strat->tl); 2209 #ifdef ADIDEBUG2210 printf("\nThis element has been added to S:\n");pWrite(strat->P.p);pWrite(strat->P.p1);pWrite(strat->P.p2);2211 #endif2212 2119 #if 0 2213 2120 int pl=pLength(strat->P.p); … … 2549 2456 while (strat->Ll >= 0) 2550 2457 { 2551 #ifdef ADIDEBUG2552 printf("\n ------------------------NEW LOOP\n");2553 printf("\nShdl = \n");2554 #if 02555 idPrint(strat->Shdl);2556 #else2557 for(int ii = 0; ii<=strat->sl;ii++)2558 {2559 printf("\nS[%i]: ",ii);p_Write(strat->S[ii],strat->tailRing);2560 printf("sig: ");pWrite(strat->sig[ii]);2561 }2562 #endif2563 #if 02564 for(int iii = 0; iii< strat->syzl; iii++)2565 {2566 printf("\nsyz[%i]:\n",iii);2567 p_Write(strat->syz[iii], currRing);2568 }2569 #endif2570 #if 02571 for(int iii = 0; iii<= strat->tl; iii++)2572 {2573 printf("\nT[%i]:\n",iii);2574 p_Write(strat->T[iii].p, currRing);2575 }2576 #endif2577 printf("\n list L\n");2578 int iii;2579 #if 02580 for(iii = 0; iii<= strat->Ll; iii++)2581 {2582 printf("\nL[%i]:\n",iii);2583 p_Write(strat->L[iii].p, currRing);2584 p_Write(strat->L[iii].p1, currRing);2585 p_Write(strat->L[iii].p2, currRing);2586 p_Write(strat->L[iii].sig, currRing);2587 }2588 #else2589 {2590 printf("L[%i]:",strat->Ll);2591 p_Write(strat->L[strat->Ll].p, strat->tailRing);2592 p_Write(strat->L[strat->Ll].p1, strat->tailRing);2593 p_Write(strat->L[strat->Ll].p2, strat->tailRing);2594 p_Write(strat->L[strat->Ll].sig, currRing);2595 }2596 #endif2597 //getchar();2598 #endif2599 2458 if (strat->Ll > lrmax) lrmax =strat->Ll;/*stat.*/ 2600 2459 #ifdef KDEBUG … … 2643 2502 if(rField_is_Ring(currRing)) 2644 2503 strat->sbaEnterS = pGetComp(strat->P.sig) - 1; 2645 2646 #ifdef ADIDEBUG2647 printf("\n-------------------------\nThis is the current element P\n");2648 p_Write(strat->P.p,strat->tailRing);2649 p_Write(strat->P.p1,strat->tailRing);2650 p_Write(strat->P.p2,strat->tailRing);2651 p_Write(strat->P.sig,currRing);2652 #endif2653 2504 /* reduction of the element chosen from L */ 2654 2505 if (!strat->rewCrit2(strat->P.sig, ~strat->P.sevSig, strat->P.GetLmCurrRing(), strat, strat->P.checked+1)) … … 2759 2610 strat->P.sev = pGetShortExpVector(strat->P.p); 2760 2611 } 2761 #ifdef ADIDEBUG2762 printf("\nAfter reduce (redresult=%i): \n",red_result);pWrite(strat->P.p);pWrite(strat->P.sig);2763 #endif2764 2612 //sigdrop case 2765 2613 if(rField_is_Ring(currRing) && strat->sigdrop) 2766 2614 { 2767 2615 //First reduce it as much as one can 2768 #ifdef ADIDEBUG2769 printf("\nSigdrop in the reduce. Trying redring\n");2770 #endif2771 2616 red_result = redRing(&strat->P,strat); 2772 2617 if(red_result == 0) 2773 2618 { 2774 #ifdef ADIDEBUG2775 printf("\nSigdrop cancelled since redRing reduced to 0\n");2776 #endif2777 2619 strat->sigdrop = FALSE; 2778 2620 pDelete(&strat->P.sig); … … 2781 2623 else 2782 2624 { 2783 #ifdef ADIDEBUG2784 printf("\nStill Sigdrop - redRing reduced to:\n");pWrite(strat->P.p);2785 #endif2786 2625 strat->enterS(strat->P, 0, strat, strat->tl); 2787 2626 if (TEST_OPT_PROT) … … 2792 2631 if(rField_is_Ring(currRing) && strat->blockred > strat->blockredmax) 2793 2632 { 2794 #ifdef ADIDEBUG2795 printf("\nToo many blocked reductions\n");2796 #endif2797 2633 strat->sigdrop = TRUE; 2798 2634 break; … … 2888 2724 if(rField_is_Ring(currRing) && strat->sigdrop) 2889 2725 { 2890 #ifdef ADIDEBUG2891 printf("\n Still sigdrop after redtailSba - it reduced to \n");pWrite(strat->P.p);2892 #endif2893 2726 strat->enterS(strat->P, 0, strat, strat->tl); 2894 2727 break; … … 2899 2732 if(strat->P.sig == NULL || pLtCmp(beforetailred,strat->P.sig) == 1) 2900 2733 { 2901 #ifdef ADIDEBUG2902 printf("\nSigDrop after TAILred\n");pWrite(beforetailred);pWrite(strat->P.sig);2903 #endif2904 2734 strat->sigdrop = TRUE; 2905 2735 //Reduce it as much as you can … … 2908 2738 { 2909 2739 //It reduced to 0, cancel the sigdrop 2910 #ifdef ADIDEBUG2911 printf("\nReduced to 0 via redRing. Cancel sigdrop\n");2912 #endif2913 2740 strat->sigdrop = FALSE; 2914 2741 p_Delete(&strat->P.sig,currRing);strat->P.sig = NULL; … … 2916 2743 else 2917 2744 { 2918 #ifdef ADIDEBUG2919 printf("\nReduced to this via redRing.SIGDROP\n");pWrite(strat->P.p);2920 #endif2921 2745 strat->enterS(strat->P, 0, strat, strat->tl); 2922 2746 break; … … 2928 2752 goto case_when_red_result_changed; 2929 2753 } 2930 #ifdef ADIDEBUG2931 printf("\nNach redTailSba: \n");2932 p_Write(strat->P.p,strat->tailRing);p_Write(strat->P.sig,currRing);2933 #endif2934 2754 // remove sigsafe label since it is no longer valid for the next element to 2935 2755 // be reduced … … 2989 2809 else 2990 2810 enterpairsSig(strat->P.p,strat->P.sig,strat->sl+1,strat->sl,strat->P.ecart,pos,strat, strat->tl); 2991 #ifdef ADIDEBUG2992 printf("\nThis element is added to S\n");2993 p_Write(strat->P.p, strat->tailRing);p_Write(strat->P.p1, strat->tailRing);p_Write(strat->P.p2, strat->tailRing);pWrite(strat->P.sig);2994 //getchar();2995 #endif2996 2811 if(rField_is_Ring(currRing) && strat->sigdrop) 2997 2812 break; -
kernel/GBEngine/kutil.cc
r2d5de0e r86ff333 12 12 #define MYTEST 0 13 13 14 //#define ADIDEBUG 115 14 //All vs Just strategy over rings: 16 15 // 1 - Just … … 344 343 if (rField_is_Ring(r) /*&& (rHasLocalOrMixedOrdering(r))*/) 345 344 lc = pGetCoeff(p); 346 #ifdef ADIDEBUG347 printf("\n cancelunit\n");348 pWrite(p);349 #endif350 345 #ifdef HAVE_RINGS 351 346 // Leading coef have to be a unit … … 406 401 // Note: As long as qring j forbidden if j contains integer (i.e. ground rings are 407 402 // domains), no zerodivisor test needed CAUTION 408 #ifdef ADIDEBUG409 pWrite(h);410 #endif411 403 if (!n_DivBy(pGetCoeff(h),lc,r->cf)) 412 404 { 413 #ifdef ADIDEBUG414 printf("\nDoes not divide\n");415 #endif416 405 return; 417 406 } 418 #ifdef ADIDEBUG419 printf("\nDivides. Go On\n");420 #endif421 407 pIter(h); 422 408 } … … 1344 1330 compare=pDivCompRing(strat->B[j].lcm,h.lcm); 1345 1331 compareCoeff = n_DivComp(pGetCoeff(strat->B[j].lcm), pGetCoeff(h.lcm), currRing->cf); 1346 #ifdef ADIDEBUG1347 printf("\nChainCrit in enteronepairring\n");1348 printf("\nB[j]\n");1349 pWrite(strat->B[j].p);1350 pWrite(strat->B[j].p1);1351 pWrite(strat->B[j].p2);1352 pWrite(strat->B[j].lcm);1353 printf("\nh - neue Paar\n");1354 pWrite(h.p);1355 pWrite(p);1356 pWrite(strat->S[i]);1357 pWrite(h.lcm);1358 printf("\ncompare = %i\ncompareCoeff = %i\n",compare,compareCoeff);1359 #endif1360 1332 if(compare == pDivComp_EQUAL) 1361 1333 { … … 1365 1337 if ((strat->fromQ==NULL) || (isFromQ==0) || (strat->fromQ[i]==0)) 1366 1338 { 1367 #ifdef ADIDEBUG1368 printf("\ndelete h\n");1369 #endif1370 1339 strat->c3++; 1371 1340 pLmDelete(h.lcm); … … 1376 1345 if(compareCoeff == pDivComp_GREATER) 1377 1346 { 1378 #ifdef ADIDEBUG1379 printf("\ndelete: B[j]\n");1380 #endif1381 1347 deleteInL(strat->B,&strat->Bl,j,strat); 1382 1348 strat->c3++; … … 1386 1352 if ((strat->fromQ==NULL) || (isFromQ==0) || (strat->fromQ[i]==0)) 1387 1353 { 1388 #ifdef ADIDEBUG1389 printf("\ndelete h\n");1390 #endif1391 1354 strat->c3++; 1392 1355 pLmDelete(h.lcm); … … 1402 1365 if ((strat->fromQ==NULL) || (isFromQ==0) || (strat->fromQ[i]==0)) 1403 1366 { 1404 #ifdef ADIDEBUG1405 printf("\ndelete h\n");1406 #endif1407 1367 strat->c3++; 1408 1368 pLmDelete(h.lcm); … … 1413 1373 if(compare == pDivComp_GREATER) 1414 1374 { 1415 #ifdef ADIDEBUG1416 printf("\ndelete B[j]\n");1417 #endif1418 1375 deleteInL(strat->B,&strat->Bl,j,strat); 1419 1376 strat->c3++; … … 1423 1380 number s, t; 1424 1381 poly m1, m2, gcd = NULL; 1425 #ifdef ADIDEBUG1426 printf("\nTrying to add spair S[%i] und p\n",i);pWrite(strat->S[i]);pWrite(p);1427 #endif1428 1382 s = pGetCoeff(strat->S[i]); 1429 1383 t = pGetCoeff(p); … … 1495 1449 //h.pCleardenom(); 1496 1450 //pSetm(h.p); 1497 #ifdef ADIDEBUG1498 printf("\nThis is afterwards:\n");1499 pWrite(h.p);1500 #endif1501 1451 h.i_r1 = -1;h.i_r2 = -1; 1502 1452 strat->initEcart(&h); … … 1519 1469 if (currRing!=strat->tailRing) 1520 1470 h.t_p = k_LmInit_currRing_2_tailRing(h.p, strat->tailRing); 1521 #ifdef ADIDEBUG1522 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);1523 #endif1524 1471 enterL(&strat->B,&strat->Bl,&strat->Bmax,h,posx); 1525 1472 kTest_TS(strat); … … 1656 1603 } 1657 1604 } 1658 //#if 11659 #ifdef ADIDEBUG1660 printf("\nThis strong poly was added to L:\n");pWrite(h.p);pWrite(h.p1);pWrite(h.p2);1661 #endif1662 1605 return TRUE; 1663 1606 } … … 1695 1638 if(pairsig!= NULL && pLtCmp(pairsig,h->sig) == 0) 1696 1639 { 1697 #ifdef ADIDEBUG1698 printf("\nCan replace * (sig = *) with * (sig = *) since of * with sig *\n");1699 pWrite(h->p);pWrite(h->sig);pWrite(gcd);pWrite(pairsig);pWrite(strat->S[i]);pWrite(strat->sig[i]);1700 //getchar();1701 #endif1702 1640 pDelete(&h->p); 1703 1641 h->p = gcd; … … 1839 1777 if(h.sig == NULL) 1840 1778 { 1841 #ifdef ADIDEBUG1842 printf("\nPossible sigdrop in enterpairstrongSig (due to lost of sig)\n");1843 #endif1844 1779 //sigdrop since we loose the signature 1845 1780 strat->sigdrop = TRUE; 1846 1781 //Try to reduce it as far as we can via redRing 1847 1782 int red_result = redRing(&h,strat); 1848 #ifdef ADIDEBUG1849 printf("\nAfter redRing reduce:\n");pWrite(h.p);1850 #endif1851 1783 if(red_result == 0) 1852 1784 { 1853 1785 // Cancel the sigdrop 1854 #ifdef ADIDEBUG1855 printf("\nCancel the sigdrop. It reduced to 0\n");1856 #endif1857 1786 p_Delete(&h.sig,currRing);h.sig = NULL; 1858 1787 strat->sigdrop = FALSE; … … 1861 1790 else 1862 1791 { 1863 #ifdef ADIDEBUG1864 printf("\nSigdrop. end\n");1865 #endif1866 1792 strat->enterS(strat->P,strat->sl+1,strat, strat->tl+1); 1867 1793 #if 1 … … 1879 1805 if(rField_is_Ring(currRing) && pLtCmp(h.sig,sig) == -1) 1880 1806 { 1881 #ifdef ADIDEBUG1882 printf("\nSigDrop in enteronestrongpolySig\n");1883 pWrite(h.sig);1884 pWrite(p);pWrite(sig);1885 pWrite(strat->S[i]);pWrite(strat->sig[i]);1886 #endif1887 1807 strat->sigdrop = TRUE; 1888 1808 // Completely reduce it … … 1891 1811 { 1892 1812 // Reduced to 0 1893 #ifdef ADIDEBUG1894 printf("\nCancel the sigdrop after redRing (=0)\n");1895 #endif1896 1813 strat->sigdrop = FALSE; 1897 1814 p_Delete(&h.sig,currRing);h.sig = NULL; … … 1900 1817 else 1901 1818 { 1902 #ifdef ADIDEBUG1903 printf("\nAfter redRing still sigdrop:\n");pWrite(h.p);1904 #endif1905 1819 strat->enterS(strat->P,strat->sl+1,strat, strat->tl+1); 1906 1820 // 0 - add just the original poly causing the sigdrop, 1 - add also this … … 1911 1825 } 1912 1826 } 1913 #ifdef ADIDEBUG1914 printf("\nThis strong poly was added to L:\n");pWrite(h.p);pWrite(h.p1);pWrite(h.p2);pWrite(h.sig);1915 #endif1916 1827 //Check for sigdrop 1917 1828 if(gcd != NULL && pLtCmp(sig,pairsig) > 0 && pLtCmp(strat->sig[i],pairsig) > 0) 1918 1829 { 1919 #ifdef ADIDEBUG1920 printf("\nSigDrop in strongpair\noriginals: ");pWrite(sig);pWrite(strat->sig[i]);1921 printf("\nnow: ");pWrite(pairsig);1922 #endif1923 1830 strat->sigdrop = TRUE; 1924 1831 //Enter this element to S … … 2705 2612 #endif 2706 2613 { 2707 #ifdef ADIDEBUG2708 printf("\nTrying to add p and S[%i]\n",i);2709 pWrite(p);pWrite(pSig);2710 pWrite(strat->S[i]);pWrite(strat->sig[i]);2711 #endif2712 2614 #if ALL_VS_JUST 2713 2615 //Over rings, if we construct the strong pair, do not add the spair … … 2764 2666 pSetCoeff0(m1,s); 2765 2667 pSetCoeff0(m2,t); 2766 #ifdef ADIDEBUG2767 printf("\nIn Spoly: m1, m2 :\n");pWrite(m1);pWrite(m2);2768 #endif2769 2668 } 2770 2669 else … … 2830 2729 if(sigCmp == 0) 2831 2730 { 2832 #ifdef ADIDEBUG2833 printf("\nPossible sigdrop in enterpairSig (due to lost of sig)\n");2834 #endif2835 2731 //sigdrop since we loose the signature 2836 2732 strat->sigdrop = TRUE; … … 2847 2743 } 2848 2744 int red_result = redRing(&Lp,strat); 2849 #ifdef ADIDEBUG2850 printf("\nAfter redRing reduce:\n");pWrite(Lp.p);2851 #endif2852 2745 if(red_result == 0) 2853 2746 { 2854 2747 // Cancel the sigdrop 2855 #ifdef ADIDEBUG2856 printf("\nCancel the sigdrop. It reduced to 0\n");2857 #endif2858 2748 p_Delete(&Lp.sig,currRing);Lp.sig = NULL; 2859 2749 strat->sigdrop = FALSE; … … 2862 2752 else 2863 2753 { 2864 #ifdef ADIDEBUG2865 printf("\nSigdrop. end\n");2866 #endif2867 2754 strat->enterS(strat->P,strat->sl+1,strat, strat->tl+1); 2868 2755 #if 1 … … 2916 2803 ) 2917 2804 { 2918 #ifdef ADIDEBUG2919 printf("\nDELETED!\n");2920 #endif2921 2805 pDelete(&pSigMult); 2922 2806 pDelete(&sSigMult); … … 3029 2913 { 3030 2914 pLmFree(Lp.lcm); 3031 #ifdef ADIDEBUG3032 printf("\nrewCrit3 deletes it!\n");3033 #endif3034 2915 pDelete(&Lp.sig); 3035 2916 pDelete (&m1); … … 3101 2982 if(rField_is_Ring(currRing) && pLtCmp(Lp.sig,pSig) == -1) 3102 2983 { 3103 #ifdef ADIDEBUG3104 printf("\nSigDrop in enteronepairSig\n");pWrite(Lp.sig);3105 pWrite(p);pWrite(pSig);3106 pWrite(strat->S[i]);pWrite(strat->sig[i]);3107 #endif3108 2984 strat->sigdrop = TRUE; 3109 2985 // Completely reduce it … … 3112 2988 { 3113 2989 // Reduced to 0 3114 #ifdef ADIDEBUG3115 printf("\nCancel the sigdrop after redRing (=0)\n");3116 #endif3117 2990 strat->sigdrop = FALSE; 3118 2991 p_Delete(&Lp.sig,currRing);Lp.sig = NULL; … … 3121 2994 else 3122 2995 { 3123 #ifdef ADIDEBUG3124 printf("\nAfter redRing still sigdrop:\n");pWrite(Lp.p);3125 #endif3126 2996 strat->enterS(strat->P,strat->sl+1,strat, strat->tl+1); 3127 2997 // 0 - add just the original poly causing the sigdrop, 1 - add also this … … 3132 3002 } 3133 3003 } 3134 #ifdef ADIDEBUG3135 printf("\nThis spair was added to B:\n");3136 pWrite(Lp.p);3137 pWrite(Lp.p1);3138 pWrite(Lp.p2);3139 pWrite(Lp.sig);3140 #endif3141 3004 l = strat->posInLSba(strat->L,strat->Ll,&Lp,strat); 3142 3005 enterL(&strat->L,&strat->Ll,&strat->Lmax,Lp,l); … … 3865 3728 for (j=0; j<=k; j++) 3866 3729 { 3867 #ifdef ADIDEBUG3868 PrintS("\n Trying to add spoly : \n");3869 PrintS(" ");p_Write(h, strat->tailRing);3870 PrintS(" ");p_Write(strat->S[j],strat->tailRing);3871 #endif3872 3730 strat->enterOnePair(j,h,ecart,isFromQ,strat, atR); 3873 3731 //Print("j:%d, Ll:%d\n",j,strat->Ll); … … 4064 3922 } 4065 3923 #endif 4066 #ifdef ADIDEBUG4067 printf("\nChainCrit1\n");4068 pWrite(strat->B[i].p);4069 pWrite(strat->B[i].p1);4070 pWrite(strat->B[i].p2);4071 #endif4072 3924 deleteInL(strat->B,&strat->Bl,i,strat); 4073 3925 strat->c3++; … … 4089 3941 if ((pNext(strat->L[j].p) == strat->tail) || (rHasGlobalOrdering(currRing))) 4090 3942 { 4091 #ifdef ADIDEBUG4092 printf("\nChainCrit2\n");4093 pWrite(strat->L[j].p);4094 pWrite(strat->L[j].p1);4095 pWrite(strat->L[j].p2);4096 #endif4097 3943 deleteInL(strat->L,&strat->Ll,j,strat); 4098 3944 strat->c3++; … … 4158 4004 } 4159 4005 #endif 4160 #ifdef ADIDEBUG4161 printf("\nChainCrit3\n");4162 pWrite(strat->L[j].p);4163 pWrite(strat->L[j].p1);4164 pWrite(strat->L[j].p2);4165 #endif4166 4006 if (isInPairsetL(i-1,strat->L[j].p1,strat->L[i].p1,&l,strat) 4167 4007 && (pNext(strat->L[l].p) == strat->tail) … … 4804 4644 if(Lp.sig == NULL || nIsZero(pGetCoeff(Lp.sig))) 4805 4645 { 4806 #ifdef ADIDEBUG4807 printf("\nSigdrop in enterextended spoly\n");pWrite(h);pWrite(hSig);4808 #endif4809 4646 strat->sigdrop = TRUE; 4810 4647 //Try to reduce it as far as we can via redRing 4811 4648 int red_result = redRing(&Lp,strat); 4812 #ifdef ADIDEBUG4813 printf("\nAfter redRing reduce:\n");pWrite(Lp.p);4814 #endif4815 4649 if(red_result == 0) 4816 4650 { 4817 4651 // Cancel the sigdrop 4818 #ifdef ADIDEBUG4819 printf("\nCancel the sigdrop. It reduced to 0\n");4820 #endif4821 4652 p_Delete(&Lp.sig,currRing);Lp.sig = NULL; 4822 4653 strat->sigdrop = FALSE; … … 4825 4656 else 4826 4657 { 4827 #ifdef ADIDEBUG4828 printf("\nSigdrop. end\n");4829 #endif4830 4658 strat->enterS(strat->P,strat->sl+1,strat, strat->tl+1); 4831 4659 #if 1 … … 4915 4743 assume (rField_is_Ring(currRing)); 4916 4744 // enter also zero divisor * poly, if this is non zero and of smaller degree 4917 #ifdef ADIDEBUG4918 printf("\n Trying to add extended spolys\n");4919 #endif4920 4745 if (!(rField_is_Domain(currRing))) enterExtendedSpolySig(h, hSig, strat); 4921 4746 if(strat->sigdrop) return; 4922 #ifdef ADIDEBUG4923 printf("\n Trying to add spolys\n");4924 #endif4925 4747 initenterpairsSigRing(h, hSig, hFrom, k, ecart, 0, strat, atR); 4926 4748 if(strat->sigdrop) return; 4927 #ifdef ADIDEBUG4928 printf("\n Trying to add gcd-polys\n");4929 #endif4930 4749 initenterstrongPairsSig(h, hSig, k, ecart, 0, strat, atR); 4931 4750 if(strat->sigdrop) return; … … 7147 6966 PrintS("DELETE!\n"); 7148 6967 #endif 7149 #ifdef ADIDEBUG7150 printf("\nsyzCrit:\n");pWrite(strat->syz[k]);pWrite(sig);7151 #endif7152 6968 strat->nrsyzcrit++; 7153 6969 //printf("- T -\n\n"); … … 7200 7016 (n_DivBy(pGetCoeff(sig), pGetCoeff(strat->syz[k]),currRing->cf) && pLtCmp(sig,strat->syz[k]) == 1))) 7201 7017 { 7202 #ifdef ADIDEBUG7203 printf("\nsyzCrit:\n");pWrite(strat->syz[k]);pWrite(sig);7204 #endif7205 7018 strat->nrsyzcrit++; 7206 7019 return TRUE; … … 7238 7051 PrintS("DELETE!\n"); 7239 7052 #endif 7240 #ifdef ADIDEBUG7241 printf("\nFaugere RewCrit: * divisible by *\n");pWrite(sig);pWrite(strat->sig[k]);7242 #endif7243 7053 strat->nrrewcrit++; 7244 7054 return TRUE; … … 7278 7088 BOOLEAN arriRewCriterion(poly /*sig*/, unsigned long /*not_sevSig*/, poly /*lm*/, kStrategy strat, int start=0) 7279 7089 { 7280 #ifdef ADIDEBUG7281 printf("\narriRewCrit\n");7282 #endif7283 7090 if(rField_is_Ring(currRing)) 7284 7091 return FALSE; … … 7293 7100 if (!(pLmCmp(p1,p2) == 1)) 7294 7101 { 7295 #ifdef ADIDEBUG7296 printf("\narriRewCrit deleted: sig, P.sig\n");7297 #endif7298 7102 pDelete(&p1); 7299 7103 pDelete(&p2); … … 7309 7113 BOOLEAN arriRewCriterionPre(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int /*start=0*/) 7310 7114 { 7311 #ifdef ADIDEBUG7312 printf("\narriRewCritPre\n");7313 #endif7314 7115 //Over Rings, there are still some changes to do: considering coeffs 7315 7116 if(rField_is_Ring(currRing)) … … 7328 7129 { 7329 7130 deleteInL(strat->B,&strat->Bl,found,strat); 7330 #ifdef ADIDEBUG7331 printf("\nDelete!\n");7332 #endif7333 7131 } 7334 7132 else 7335 7133 { 7336 #ifdef ADIDEBUG7337 printf("\nDelete this one!\n");7338 #endif7339 7134 return TRUE; 7340 7135 } … … 7352 7147 pDelete(&p1); 7353 7148 pDelete(&p2); 7354 #ifdef ADIDEBUG7355 printf("\nDelete this one!\n");7356 #endif7357 7149 return TRUE; 7358 7150 } … … 9543 9335 } 9544 9336 strat->T[atT] = (TObject) p; 9545 #ifdef ADIDEBUG9546 printf("\nenterT: add in position %i\n",atT);9547 p_Write(p.p,strat->tailRing);p_Write(p.sig,currRing);9548 #endif9549 9337 //printf("\nenterT: add new: length = %i, ecart = %i\n",p.length,p.ecart); 9550 9338 … … 9629 9417 } 9630 9418 strat->T[atT] = (TObject) p; 9631 #ifdef ADIDEBUG9632 printf("\nenterT_strong: add in position %i\n",atT);9633 pWrite(p.p);9634 #endif9635 9419 //printf("\nenterT_strong: add new: length = %i, ecart = %i\n",p.length,p.ecart); 9636 9420 … … 9649 9433 && !n_IsUnit(p.p->coef, currRing->cf)) 9650 9434 { 9651 #ifdef ADIDEBUG9652 printf("\nDas ist p:\n");pWrite(p.p);9653 #endif9654 9435 for(i=strat->tl;i>=0;i--) 9655 9436 { 9656 9437 if(strat->T[i].ecart <= p.ecart && pLmDivisibleBy(strat->T[i].p,p.p)) 9657 9438 { 9658 #ifdef ADIDEBUG9659 printf("\nFound one: %i\n",i);pWrite(strat->T[i].p);9660 #endif9661 9439 enterOneStrongPoly(i,p.p,p.ecart,0,strat,0 , TRUE); 9662 9440 } … … 9680 9458 void enterSyz(LObject &p, kStrategy strat, int atT) 9681 9459 { 9682 #ifdef ADIDEBUG9683 printf("\n Entersyz:\n");pWrite(p.sig);9684 #endif9685 9460 int i; 9686 9461 strat->newt = TRUE; … … 9739 9514 { 9740 9515 //printf("\nYES!\n"); 9741 #ifdef ADIDEBUG9742 printf("\n syzCrit deleted!\n");pWrite(strat->L[cc].p);pWrite(strat->L[cc].sig);9743 #endif9744 9516 deleteInL(strat->L,&strat->Ll,cc,strat); 9745 9517 } -
libpolys/polys/monomials/p_polys.cc
r2d5de0e r86ff333 46 46 47 47 #include "clapsing.h" 48 49 #define ADIDEBUG 050 48 51 49 /*
Note: See TracChangeset
for help on using the changeset viewer.