Changeset d249822 in git
- Timestamp:
- Jul 21, 2016, 11:11:08 AM (8 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
- Children:
- ef27298cfb747d136e3418af99edf58c03b12a05
- Parents:
- b6f42a8c2492312d1dd4f0c4c917fcf054636416
- Location:
- kernel/GBEngine
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kspoly.cc
rb6f42a8 rd249822 246 246 { 247 247 pSetCoeff(sigMult,nMult(nDiv(pGetCoeff(PR->p),pGetCoeff(PW->p)), pGetCoeff(sigMult))); 248 if(nIsZero(pGetCoeff(sigMult))) 249 { 250 sigMult = NULL; 251 } 248 252 } 249 253 //#if 1 … … 270 274 // Set the sig 271 275 poly origsig = pCopy(PR->sig); 272 PR->sig = pHead(pSub(PR->sig, sigMult)); 276 if(sigMult != NULL) 277 PR->sig = pHead(pSub(PR->sig, sigMult)); 273 278 //The sigs have the same lm, have to substract 274 279 //It may happen that now the signature is 0 (drop) -
kernel/GBEngine/kstd1.cc
rb6f42a8 rd249822 153 153 strat->tailRing)); 154 154 } 155 #ifdef HAVE_RINGS156 155 if(redMoraNF && (rField_is_Ring(currRing))) 157 156 enterT_strong(*h,strat); 158 157 else 159 #endif160 158 enterT(*h,strat); 161 159 *h = L; … … 1156 1154 if (pNext(strat->L[j].p) == strat->tail) 1157 1155 { 1158 #ifdef HAVE_RINGS1159 1156 if (rField_is_Ring(currRing)) 1160 1157 pLmDelete(strat->L[j].p); /*deletes the short spoly and computes*/ 1161 1158 else 1162 #else1163 1159 pLmFree(strat->L[j].p); /*deletes the short spoly and computes*/ 1164 #endif1165 1160 strat->L[j].p = NULL; 1166 1161 poly m1 = NULL, m2 = NULL; … … 1217 1212 if (pLmCmp(strat->L[i].p,strat->kNoether) == -1) 1218 1213 { 1219 #ifdef HAVE_RINGS1220 1214 if (rField_is_Ring(currRing)) 1221 1215 pLmDelete(strat->L[i].p); 1222 1216 else 1223 #endif1224 1217 pLmFree(strat->L[i].p); 1225 1218 strat->L[i].p = NULL; … … 1227 1220 else 1228 1221 { 1229 #ifdef HAVE_RINGS1230 1222 if (rField_is_Ring(currRing)) 1231 1223 pLmDelete(strat->L[i].p); 1232 1224 else 1233 #endif1234 1225 pLmFree(strat->L[i].p); 1235 1226 strat->L[i].p = NULL; … … 1339 1330 return; 1340 1331 1341 #ifdef HAVE_RINGS1342 1332 if ( (!rField_is_Ring(currRing)) || (rHasGlobalOrdering(currRing))) 1343 #endif1344 1333 { 1345 1334 strat->red = redFirst; … … 1348 1337 updateT(strat); 1349 1338 1350 #ifdef HAVE_RINGS1351 1339 if ( (!rField_is_Ring(currRing)) || (rHasGlobalOrdering(currRing))) 1352 #endif1353 1340 { 1354 1341 strat->posInT = posInT2; … … 1451 1438 strat->red = redHomog; 1452 1439 } 1453 #ifdef HAVE_RINGS //TODO Oliver1454 1440 if (rField_is_Ring(currRing)) 1455 1441 { 1456 1442 strat->red = redRing; 1457 1443 } 1458 #endif1459 1444 if (currRing->pLexOrder && strat->honey) 1460 1445 strat->initEcart = initEcartNormal; … … 1587 1572 } 1588 1573 1589 #ifdef HAVE_RINGS1590 1574 if (rField_is_Ring(currRing)) 1591 1575 strat->red = redRiloc; 1592 #endif1593 1576 1594 1577 /*reads the ecartWeights used for Graebes method from the … … 1739 1722 { 1740 1723 /*- deletes the short spoly and computes -*/ 1741 #ifdef HAVE_RINGS1742 1724 if (rField_is_Ring(currRing)) 1743 1725 pLmDelete(strat->P.p); 1744 1726 else 1745 #endif 1746 pLmFree(strat->P.p); 1727 pLmFree(strat->P.p); 1747 1728 strat->P.p = NULL; 1748 1729 poly m1 = NULL, m2 = NULL; … … 1779 1760 printf("\nBefore Ll = %i\n", strat->Ll); 1780 1761 #endif 1781 #ifdef HAVE_RINGS1782 1762 if(rField_is_Ring(strat->tailRing) && rHasLocalOrMixedOrdering(currRing)) 1783 {1784 1763 red_result = strat->red(&strat->P,strat); 1785 }1786 1764 else 1787 #endif1788 1765 red_result = strat->red(&strat->P,strat); 1789 1766 #if ADIDEBUG … … 1823 1800 enterT(strat->P,strat); 1824 1801 // build new pairs 1825 #ifdef HAVE_RINGS1826 1802 if (rField_is_Ring(currRing)) 1827 {1828 1803 superenterpairs(strat->P.p,strat->sl,strat->P.ecart,0,strat, strat->tl); 1829 }1830 1804 else 1831 #endif 1832 enterpairs(strat->P.p,strat->sl,strat->P.ecart,0,strat, strat->tl); 1805 enterpairs(strat->P.p,strat->sl,strat->P.ecart,0,strat, strat->tl); 1833 1806 // put in S 1834 1807 … … 1865 1838 if (strat->P.lcm!=NULL) 1866 1839 { 1867 #ifdef HAVE_RINGS 1868 if (rField_is_Ring(currRing))pLmDelete(strat->P.lcm);1840 if (rField_is_Ring(currRing)) 1841 pLmDelete(strat->P.lcm); 1869 1842 else 1870 #else1871 1843 pLmFree(strat->P.lcm); 1872 #endif1873 1844 strat->P.lcm=NULL; 1874 1845 } … … 1926 1897 // } 1927 1898 // } 1928 #ifdef HAVE_RINGS1929 1899 if(nCoeff_is_Ring_Z(currRing->cf)) 1930 1900 finalReduceByMon(strat); 1931 #endif1932 1901 if (Q!=NULL) updateResult(strat->Shdl,Q,strat); 1933 1902 SI_RESTORE_OPT1(save1); … … 2032 2001 if (TEST_OPT_PROT) { PrintS("r"); mflush(); } 2033 2002 if (BVERBOSE(23)) kDebugPrint(strat); 2034 #ifdef HAVE_RINGS2035 2003 if(rField_is_Ring(currRing)) 2036 2004 { … … 2038 2006 } 2039 2007 else 2040 #endif2008 { 2041 2009 if (p!=NULL) p = redMoraNF(p,strat, lazyReduce & KSTD_NF_ECART); 2010 } 2042 2011 if ((p!=NULL)&&((lazyReduce & KSTD_NF_LAZY)==0)) 2043 2012 { … … 2175 2144 h.sev = strat->sevS[j]; 2176 2145 h.SetpFDeg(); 2177 #ifdef HAVE_RINGS2178 2146 if(rField_is_Ring(currRing) && rHasLocalOrMixedOrdering(currRing)) 2179 2147 enterT_strong(h,strat); 2180 2148 else 2181 #endif2182 2149 enterT(h,strat); 2183 2150 } 2184 2151 if (TEST_OPT_PROT) { PrintS("r"); mflush(); } 2185 #ifdef HAVE_RINGS2186 2152 if(rField_is_Ring(currRing)) 2187 2153 { … … 2189 2155 } 2190 2156 else 2191 #endif2192 2157 p = redMoraNF(p,strat, lazyReduce & KSTD_NF_ECART); 2193 2158 if ((p!=NULL)&&((lazyReduce & KSTD_NF_LAZY)==0)) … … 2589 2554 #endif 2590 2555 //This is how we set the SBA algorithm; 2591 int totalsbaruns = 1,blockedreductions = 10,blockred = 0,loops = 0;2556 int totalsbaruns = 1,blockedreductions = 20,blockred = 0,loops = 0; 2592 2557 while(sigdrop && (loops < totalsbaruns || totalsbaruns == -1) 2593 2558 && (blockred <= blockedreductions)) … … 2714 2679 printf("\nSBA Run %i: %i elements (syzCrit = %i,rewCrit = %i)\n",loops,IDELEMS(r),strat->nrsyzcrit,strat->nrrewcrit); 2715 2680 idPrint(r); 2716 getchar();2681 //getchar(); 2717 2682 #endif 2718 2683 } … … 2743 2708 #if ADIDEBUG 2744 2709 printf("\nWent to std\n"); 2745 //idPrint(r);2746 //getchar();2710 idPrint(r); 2711 getchar(); 2747 2712 #endif 2748 2713 r = kStd(r, Q, h, w, hilb, syzComp, newIdeal, vw); -
kernel/GBEngine/kstd2.cc
rb6f42a8 rd249822 109 109 if (p_LmShortDivisibleBy(T[j].p, sevT[j],p, not_sev, r)) 110 110 { 111 if(n_DivBy(p GetCoeff(p), pGetCoeff(T[j].p), r))111 if(n_DivBy(p_GetCoeff(p,r), p_GetCoeff(T[j].p,r), r)) 112 112 return j; 113 113 } … … 116 116 p_LmDivisibleBy(T[j].p, p, r)) 117 117 { 118 if(n_DivBy(p GetCoeff(p), pGetCoeff(T[j].p), r))118 if(n_DivBy(p_GetCoeff(p,r), p_GetCoeff(T[j].p,r), r)) 119 119 return j; 120 120 } … … 212 212 #endif 213 213 (*max_ind)=ende; 214 #ifdef HAVE_RINGS215 214 if(rField_is_Ring(currRing)) 216 215 { … … 237 236 } 238 237 else 239 #endif240 238 { 241 239 loop … … 272 270 int ende=strat->sl; 273 271 #endif 274 #ifdef HAVE_RINGS275 272 if(rField_is_Ring(currRing)) 276 273 { … … 297 294 } 298 295 else 299 #endif300 296 { 301 297 loop … … 717 713 #endif 718 714 #endif 719 #ifdef HAVE_RINGS720 715 poly beforeredsig; 721 716 if(rField_is_Ring(currRing)) 722 717 beforeredsig = pCopy(h->sig); 723 #endif718 724 719 if (strat->tl<0) return 1; 725 720 //if (h->GetLmTailRing()==NULL) return 0; // HS: SHOULD NOT BE NEEDED! … … 794 789 return 0; 795 790 } 796 #ifdef HAVE_RINGS797 791 if(rField_is_Ring(currRing)) 798 792 { … … 827 821 p_Delete(&beforeredsig,currRing); 828 822 } 829 #endif830 823 return 1; 831 824 } … … 1895 1888 { 1896 1889 enterT(strat->P, strat); 1897 #ifdef HAVE_RINGS1898 1890 if (rField_is_Ring(currRing)) 1899 1891 superenterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl); 1900 1892 else 1901 #endif1902 1893 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl); 1903 1894 // posInS only depends on the leading term … … 1940 1931 int pos=posInS(strat,strat->sl,strat->P.p,strat->P.ecart); 1941 1932 enterT(strat->P, strat); 1942 #ifdef HAVE_RINGS1943 1933 if (rField_is_Ring(currRing)) 1944 1934 superenterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl); 1945 1935 else 1946 #endif1947 1936 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl); 1948 1937 strat->enterS(strat->P, pos, strat, strat->tl); … … 2001 1990 } 2002 1991 else if (TEST_OPT_PROT) PrintLn(); 2003 #ifdef HAVE_RINGS2004 1992 if(nCoeff_is_Ring_Z(currRing->cf)) 2005 1993 finalReduceByMon(strat); … … 2014 2002 } 2015 2003 } 2016 #endif2017 2004 /* release temp data-------------------------------- */ 2018 2005 exitBuchMora(strat); … … 2322 2309 strat->Ll--; 2323 2310 2324 #ifdef HAVE_RINGS2325 2311 if(rField_is_Ring(currRing)) 2326 2312 strat->sbaEnterS = pGetComp(strat->P.sig) - 1; 2327 #endif2328 2313 2329 2314 #if ADIDEBUG … … 2673 2658 // posInS only depends on the leading term 2674 2659 2675 #ifdef HAVE_RINGS2676 2660 if(rField_is_Ring(currRing) && strat->sigdrop) 2677 2661 break; 2678 #endif2679 2662 strat->P.sevSig = p_GetShortExpVector(strat->P.sig,currRing); 2680 2663 strat->enterS(strat->P, pos, strat, strat->tl); … … 2848 2831 zeroreductions++; 2849 2832 #endif 2850 #ifdef HAVE_RINGS2851 2833 if(rField_is_Ring(currRing) && strat->P.p == NULL && strat->P.sig == NULL) 2852 2834 { … … 2854 2836 } 2855 2837 else 2856 #endif2857 2838 { 2858 2839 int pos = posInSyz(strat, strat->P.sig); … … 2884 2865 #endif 2885 2866 // Clean strat->P for the next sba call 2886 #ifdef HAVE_RINGS2887 2867 if(rField_is_Ring(currRing) && strat->sigdrop) 2888 2868 { … … 2895 2875 #endif /* KDEBUG */ 2896 2876 } 2897 #endif2898 2877 #ifdef KDEBUG 2899 2878 if (TEST_OPT_DEBUG) messageSets(strat); … … 3016 2995 rDelete (sRing); 3017 2996 } 3018 #ifdef HAVE_RINGS3019 //if(nCoeff_is_Ring_Z(currRing->cf))3020 // finalReduceByMon(strat);3021 2997 if(rField_is_Ring(currRing) && !strat->sigdrop) 3022 #endif3023 2998 id_DelDiv(strat->Shdl, currRing); 3024 2999 idSkipZeroes(strat->Shdl); … … 3129 3104 { 3130 3105 if (TEST_OPT_PROT) { PrintS("t"); mflush(); } 3131 #ifdef HAVE_RINGS3132 3106 if (rField_is_Ring(currRing)) 3133 3107 { … … 3135 3109 } 3136 3110 else 3137 #endif3138 3111 { 3139 3112 si_opt_1 &= ~Sy_bit(OPT_INTSTRATEGY); … … 3202 3175 { 3203 3176 if (TEST_OPT_PROT) { PrintS("t"); mflush(); } 3204 #ifdef HAVE_RINGS3205 3177 if (rField_is_Ring(currRing)) 3206 3178 { … … 3208 3180 } 3209 3181 else 3210 #endif3211 3182 { 3212 3183 p = redtailBba(p,max_ind,strat,(lazyReduce & KSTD_NF_NONORM)==0); -
kernel/GBEngine/kutil.cc
rb6f42a8 rd249822 363 363 h = pNext(p); 364 364 365 #ifdef HAVE_RINGS366 365 if(rField_is_Ring(currRing)) 367 366 { … … 425 424 } 426 425 else 427 #endif428 426 { 429 427 loop … … 1807 1805 h.p = pNeg(h.p); 1808 1806 } 1809 #ifdef HAVE_RINGS1810 1807 1811 if(rField_is_Ring(currRing) && 1812 pLtCmp(h.sig,sig) == -1 1813 ) 1808 if(rField_is_Ring(currRing) && pLtCmp(h.sig,sig) == -1) 1814 1809 { 1815 1810 #if ADIDEBUG … … 1845 1840 } 1846 1841 } 1847 #endif1848 1842 #if ADIDEBUG 1849 1843 printf("\nThis strong poly was added to L:\n");pWrite(h.p);pWrite(h.p1);pWrite(h.p2);pWrite(h.sig); … … 2438 2432 2439 2433 // set coeffs of multipliers m1 and m2 2440 #ifdef HAVE_RINGS2441 2434 if(rField_is_Ring(currRing)) 2442 2435 { … … 2452 2445 } 2453 2446 else 2454 #endif2455 2447 { 2456 2448 pSetCoeff0(m1, nInit(1)); … … 2470 2462 // get multiplied signatures for testing 2471 2463 pSigMult = pp_Mult_mm(pSigMult,m1,currRing); 2472 pSigMultNegSev = ~p_GetShortExpVector(pSigMult,currRing); 2464 if(pSigMult != NULL) 2465 pSigMultNegSev = ~p_GetShortExpVector(pSigMult,currRing); 2473 2466 sSigMult = pp_Mult_mm(sSigMult,m2,currRing); 2474 sSigMultNegSev = ~p_GetShortExpVector(sSigMult,currRing); 2467 if(sSigMult != NULL) 2468 sSigMultNegSev = ~p_GetShortExpVector(sSigMult,currRing); 2475 2469 //#if 1 2476 2470 #ifdef DEBUGF5 … … 2482 2476 #endif 2483 2477 int sigCmp; 2484 #ifdef HAVE_RINGS 2485 if(rField_is_Ring(currRing)) 2486 sigCmp = p_LtCmpNoAbs(pSigMult,sSigMult,currRing); 2478 if(pSigMult != NULL && sSigMult != NULL) 2479 { 2480 if(rField_is_Ring(currRing)) 2481 sigCmp = p_LtCmpNoAbs(pSigMult,sSigMult,currRing); 2482 else 2483 sigCmp = p_LmCmp(pSigMult,sSigMult,currRing); 2484 } 2487 2485 else 2488 #endif 2489 sigCmp = p_LmCmp(pSigMult,sSigMult,currRing); 2486 { 2487 if(pSigMult == NULL) 2488 { 2489 if(sSigMult == NULL) 2490 sigCmp = 0; 2491 else 2492 sigCmp = -1; 2493 } 2494 else 2495 sigCmp = 1; 2496 } 2490 2497 //#if 1 2491 2498 #if DEBUGF5 … … 2497 2504 if(rField_is_Ring(currRing)) 2498 2505 { 2499 //I have to test it not in absolute value2500 2506 if(sigCmp == 0) 2501 2507 { … … 2542 2548 } 2543 2549 } 2544 if(p _LmCmp(pSigMult,sSigMult,currRing) == 0)2550 if(pSigMult != NULL && sSigMult != NULL && p_LmCmp(pSigMult,sSigMult,currRing) == 0) 2545 2551 { 2546 2552 //Same lm, have to substract … … 2663 2669 // store from which element this pair comes from for further tests 2664 2670 //Lp.from = strat->sl+1; 2665 #ifdef HAVE_RINGS2666 2671 if(rField_is_Ring(currRing)) 2667 2672 { … … 2674 2679 } 2675 2680 else 2676 #endif2677 2681 { 2678 2682 if(sigCmp==currRing->OrdSgn) … … 2748 2752 (!rIsPluralRing(currRing)) 2749 2753 // || (rIsPluralRing(currRing) && (ncRingType(currRing) != nc_lie)) 2750 #ifdef HAVE_RINGS2751 2754 && !rField_is_Ring(currRing) 2752 #endif2753 2755 ) 2754 2756 { … … 2771 2773 if (TEST_OPT_INTSTRATEGY) 2772 2774 { 2773 if (!rIsPluralRing(currRing) 2774 #ifdef HAVE_RINGS 2775 && !rField_is_Ring(currRing) 2776 #endif 2777 ) 2775 if (!rIsPluralRing(currRing) && !rField_is_Ring(currRing)) 2778 2776 nDelete(&(Lp.p->coef)); 2779 2777 } 2780 2778 // Check for sigdrop 2781 #ifdef HAVE_RINGS 2782 if(rField_is_Ring(currRing) && 2783 pLtCmp(Lp.sig,pSig) == -1 2784 ) 2779 if(rField_is_Ring(currRing) && pLtCmp(Lp.sig,pSig) == -1) 2785 2780 { 2786 2781 #if ADIDEBUG … … 2815 2810 } 2816 2811 } 2817 #endif2818 2812 #if ADIDEBUG 2819 2813 printf("\nThis spair was added to B:\n"); … … 4497 4491 } 4498 4492 #endif 4499 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,posx);4493 //pWrite(h);pWrite(hSig);pWrite(Lp.p);pWrite(Lp.sig);printf("\n------------------\n");getchar(); 4500 4494 enterL(&strat->L,&strat->Ll,&strat->Lmax,Lp,posx); 4501 4495 } … … 4546 4540 void superenterpairsSig (poly h,poly hSig,int hFrom,int k,int ecart,int pos,kStrategy strat, int atR) 4547 4541 { 4548 assume (rField_is_Ring _Z(currRing));4542 assume (rField_is_Ring(currRing)); 4549 4543 // enter also zero divisor * poly, if this is non zero and of smaller degree 4550 4544 #if ADIDEBUG … … 4625 4619 const int iCompH = pGetComp(h); 4626 4620 4627 #ifdef HAVE_RINGS4628 4621 if (rField_is_Ring(currRing)) 4629 4622 { … … 4641 4634 } 4642 4635 else 4643 #endif 4644 for (j=0; j<=k; j++) 4645 { 4646 const int iCompSj = pGetComp(strat->S[j]); 4647 if ((iCompH==iCompSj) 4648 //|| (0==iCompH) // can only happen,if iCompSj==0 4649 || (0==iCompSj)) 4650 { 4651 enterOnePairSpecial(j,h,ecart,strat, atR); 4636 { 4637 for (j=0; j<=k; j++) 4638 { 4639 const int iCompSj = pGetComp(strat->S[j]); 4640 if ((iCompH==iCompSj) 4641 //|| (0==iCompH) // can only happen,if iCompSj==0 4642 || (0==iCompSj)) 4643 { 4644 enterOnePairSpecial(j,h,ecart,strat, atR); 4645 } 4652 4646 } 4653 4647 } … … 6774 6768 #endif 6775 6769 if (p_LmShortDivisibleBy(strat->syz[k], strat->sevSyz[k], sig, not_sevSig, currRing) 6776 #ifdef HAVE_RINGS6777 6770 && (!rField_is_Ring(currRing) || 6778 (n_DivBy(pGetCoeff(sig), pGetCoeff(strat->syz[k]),currRing) && pLtCmp(sig,strat->syz[k]) == 1)) 6779 #endif 6780 ) 6771 (n_DivBy(pGetCoeff(sig), pGetCoeff(strat->syz[k]),currRing) && pLtCmp(sig,strat->syz[k]) == 1))) 6781 6772 { 6782 6773 //#if 1 … … 6802 6793 { 6803 6794 //#if 1 6795 if(sig == NULL) 6796 return FALSE; 6804 6797 #ifdef DEBUGF5 6805 6798 Print("--- syzygy criterion checks: "); … … 6832 6825 #endif 6833 6826 if (p_LmShortDivisibleBy(strat->syz[k], strat->sevSyz[k], sig, not_sevSig, currRing) 6834 #ifdef HAVE_RINGS6835 6827 && (!rField_is_Ring(currRing) || 6836 (n_DivBy(pGetCoeff(sig), pGetCoeff(strat->syz[k]),currRing) && pLtCmp(sig,strat->syz[k]) == 1)) 6837 #endif 6838 ) 6828 (n_DivBy(pGetCoeff(sig), pGetCoeff(strat->syz[k]),currRing) && pLtCmp(sig,strat->syz[k]) == 1))) 6839 6829 { 6840 6830 #if ADIDEBUG … … 6871 6861 #endif 6872 6862 if (p_LmShortDivisibleBy(strat->sig[k], strat->sevSig[k], sig, not_sevSig, currRing) 6873 #ifdef HAVE_RINGS 6874 && (!rField_is_Ring(currRing) || (n_DivBy(pGetCoeff(sig),pGetCoeff(strat->sig[k]),currRing) && pLmCmp(sig,strat->sig[k]) == 1 )) 6875 #endif 6876 ) 6863 && (!rField_is_Ring(currRing) || (n_DivBy(pGetCoeff(sig),pGetCoeff(strat->sig[k]),currRing) && pLmCmp(sig,strat->sig[k]) == 1 ))) 6877 6864 { 6878 6865 //#if 1 … … 6926 6913 { 6927 6914 if (p_LmShortDivisibleBy(strat->sig[ii], strat->sevSig[ii], strat->P.sig, ~strat->P.sevSig, currRing) 6928 #ifdef HAVE_RINGS 6929 && (!(rField_is_Ring(currRing)) || n_DivBy(pGetCoeff(strat->P.sig),pGetCoeff(strat->sig[ii]),currRing)) 6930 #endif 6931 ) 6915 && (!(rField_is_Ring(currRing)) || n_DivBy(pGetCoeff(strat->P.sig),pGetCoeff(strat->sig[ii]),currRing))) 6932 6916 { 6933 6917 p_ExpVectorSum(p1,strat->P.sig,strat->S[ii],currRing); … … 6957 6941 BOOLEAN arriRewCriterionPre(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int /*start=0*/) 6958 6942 { 6959 #ifdef HAVE_RINGS6960 6943 //Over Rings, there are still some changes to do: considering coeffs 6961 6944 if(rField_is_Ring(currRing)) 6962 6945 return FALSE; 6963 #endif6964 6946 int found = -1; 6965 6947 for (int i=strat->Bl; i>-1; i--) { 6966 6948 if (pLmEqual(strat->B[i].sig,sig) 6967 #ifdef HAVE_RINGS6968 6949 && (rField_is_Ring(currRing) && n_Equal(pGetCoeff(strat->B[i].sig),pGetCoeff(sig),currRing)) 6969 #endif6970 6950 ) 6971 6951 { … … 7989 7969 { 7990 7970 Q.sig = pOne(); 7991 #ifdef HAVE_RINGS7992 7971 if(rField_is_Ring(currRing)) 7993 7972 p_SetCoeff(Q.sig,nCopy(p_GetCoeff(strat->S[k],currRing)),currRing); 7994 #endif7995 7973 p_ExpVectorCopy(Q.sig,strat->S[k],currRing); 7996 7974 p_SetCompP (Q.sig, comp, currRing); 7997 7975 poly q = p_One(currRing); 7998 #ifdef HAVE_RINGS7999 7976 if(rField_is_Ring(currRing)) 8000 7977 p_SetCoeff(q,nCopy(p_GetCoeff(strat->S[i],currRing)),currRing); 8001 #endif8002 7978 p_ExpVectorCopy(q,strat->S[i],currRing); 8003 7979 q = p_Neg (q, currRing); … … 8037 8013 { 8038 8014 Q.sig = pOne(); 8039 #ifdef HAVE_RINGS8040 8015 if(rField_is_Ring(currRing)) 8041 8016 p_SetCoeff(Q.sig,nCopy(p_GetCoeff(strat->S[k],currRing)),currRing); 8042 #endif8043 8017 p_ExpVectorCopy(Q.sig,strat->S[k],currRing); 8044 8018 p_SetCompP (Q.sig, comp, currRing); 8045 8019 poly q = p_One(currRing); 8046 #ifdef HAVE_RINGS8047 8020 if(rField_is_Ring(currRing)) 8048 8021 p_SetCoeff(q,nCopy(p_GetCoeff(strat->L[strat->Ll].p,currRing)),currRing); 8049 #endif8050 8022 p_ExpVectorCopy(q,strat->L[strat->Ll].p,currRing); 8051 8023 q = p_Neg (q, currRing); … … 10679 10651 } 10680 10652 } 10653 if(p == NULL) 10654 return; 10681 10655 pp = pNext(p); 10682 10656 while(pp != NULL)
Note: See TracChangeset
for help on using the changeset viewer.