Changeset e6f1e6 in git
- Timestamp:
- May 17, 2016, 5:26:29 PM (7 years ago)
- Branches:
- (u'spielwiese', 'd1ba061a762c62d3a25159d8da8b6e17332291fa')
- Children:
- 6f203b6a99801e807e56ef784f79d4951204b9e5
- Parents:
- f8fb93d1bc922d1e97207d1d5b347fe1db1eedcf
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iparith.cc
rf8fb93d re6f1e6 3908 3908 { 3909 3909 SPrintStart(); 3910 #ifdef HAVE_RINGS3911 3910 if (rField_is_Ring_Z(currRing)) 3912 3911 { … … 3933 3932 rDelete(tempR); 3934 3933 } 3935 #endif3936 3934 assumeStdFlag(v); 3937 3935 intvec *module_w=(intvec*)atGet(v,"isHomog",INTVEC_CMD); … … 4054 4052 { 4055 4053 assumeStdFlag(v); 4056 #ifdef HAVE_RINGS4057 4054 if (rField_is_Ring(currRing)) 4058 4055 { … … 4117 4114 return FALSE; 4118 4115 } 4119 #endif4120 4116 res->data = (char *)(long)scDimInt((ideal)(v->Data()),currRing->qideal); 4121 4117 return FALSE; … … 4282 4278 static BOOLEAN jjHILBERT(leftv, leftv v) 4283 4279 { 4284 #ifdef HAVE_RINGS4285 4280 if (rField_is_Ring_Z(currRing)) 4286 4281 { … … 4309 4304 return FALSE; 4310 4305 } 4311 #endif4312 4306 assumeStdFlag(v); 4313 4307 intvec *module_w=(intvec*)atGet(v,"isHomog",INTVEC_CMD); … … 4318 4312 static BOOLEAN jjHILBERT_IV(leftv res, leftv v) 4319 4313 { 4320 #ifdef HAVE_RINGS4321 4314 if (rField_is_Ring_Z(currRing)) 4322 4315 { … … 4324 4317 Print("// performed for generic fibre, that is, over Q\n"); 4325 4318 } 4326 #endif4327 4319 res->data=(void *)hSecondSeries((intvec *)v->Data()); 4328 4320 return FALSE; … … 4433 4425 { 4434 4426 ideal result=kInterRed((ideal)(v->Data()), currRing->qideal); 4435 #ifdef HAVE_RINGS4436 4427 if(rField_is_Ring(currRing)) 4437 4428 Warn("interred: this command is experimental over the integers"); 4438 #endif4439 4429 if (TEST_OPT_PROT) { PrintLn(); mflush(); } 4440 4430 res->data = result; … … 5924 5914 return TRUE; 5925 5915 } 5926 #ifdef HAVE_RINGS5927 5916 if (rField_is_Ring_Z(currRing)) 5928 5917 { … … 5966 5955 if (returnWithTrue) return TRUE; else return FALSE; 5967 5956 } 5968 #endif5969 5957 assumeStdFlag(u); 5970 5958 intvec *module_w=(intvec *)atGet(u,"isHomog",INTVEC_CMD); … … 9245 9233 } 9246 9234 #endif 9247 #ifdef HAVE_RINGS9248 9235 if (rField_is_Ring(currRing)) 9249 9236 { … … 9266 9253 } 9267 9254 } 9268 #endif 9269 return FALSE; 9270 } 9255 return FALSE; 9256 } -
Singular/ipassign.cc
rf8fb93d re6f1e6 947 947 ideal qid; 948 948 949 #ifdef HAVE_RINGS950 949 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); 967 965 968 966 idSkipZeroes(qid); -
Singular/ipshell.cc
rf8fb93d re6f1e6 1798 1798 #endif 1799 1799 1800 #ifdef HAVE_RINGS1801 1800 void rDecomposeRing(leftv h,const ring R) 1802 1801 /* field is R or C */ 1803 1802 { 1803 #ifdef HAVE_RINGS 1804 1804 lists L=(lists)omAlloc0Bin(slists_bin); 1805 1805 if (rField_is_Ring_Z(R)) L->Init(1); … … 1824 1824 L->m[1].rtyp=LIST_CMD; 1825 1825 L->m[1].data=(void *)LL; 1826 } 1826 #else 1827 WerrorS("rDecomposeRing"); 1827 1828 #endif 1829 } 1828 1830 1829 1831 … … 2072 2074 rDecomposeC(&(L->m[0]),r); 2073 2075 } 2074 #ifdef HAVE_RINGS2075 2076 else if (rField_is_Ring(r)) 2076 2077 { 2077 2078 rDecomposeRing(&(L->m[0]),r); 2078 2079 } 2079 #endif2080 2080 else if ( r->cf->extRing!=NULL )// nCoeff_is_algExt(r->cf)) 2081 2081 { -
Singular/misc_ip.cc
rf8fb93d re6f1e6 621 621 if (TEST_OPT_INTSTRATEGY && (currRing!=NULL) 622 622 && rField_has_simple_inverse() 623 #ifdef HAVE_RINGS624 623 && !rField_is_Ring(currRing) 625 #endif626 624 ) { 627 625 si_opt_1 &=~Sy_bit(OPT_INTSTRATEGY); … … 653 651 if (TEST_OPT_INTSTRATEGY && (currRing!=NULL) 654 652 && rField_has_simple_inverse() 655 #ifdef HAVE_RINGS656 653 && !rField_is_Ring(currRing) 657 #endif658 654 ) { 659 655 test &=~Sy_bit(OPT_INTSTRATEGY); -
kernel/GBEngine/kInline.h
rf8fb93d re6f1e6 1144 1144 assume(p_sev == pGetShortExpVector(p)); 1145 1145 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 { 1159 1155 if (!pLmShortDivisibleBy(p,p_sev, strat->S[*at], ~ strat->sevS[*at])) return; 1160 #endif1156 } 1161 1157 deleteInS((*at),strat); 1162 1158 (*at)--; -
kernel/GBEngine/kstd1.cc
rf8fb93d re6f1e6 999 999 { 1000 1000 i = p_IsPurePower(p, currRing); 1001 if (rField_is_Ring(currRing) && (!n_IsUnit(pGetCoeff(p), currRing->cf))) i=0; 1001 1002 if (i == last) 1002 1003 { … … 1009 1010 { 1010 1011 i = p_IsPurePower(h, strat->tailRing); 1012 if (rField_is_Ring(currRing) && (!n_IsUnit(pGetCoeff(h), currRing->cf))) i=0; 1011 1013 if (i==last) return TRUE; 1012 1014 (*length)++; … … 1889 1891 // } 1890 1892 // } 1891 #ifdef HAVE_RINGS1892 1893 if(nCoeff_is_Ring_Z(currRing->cf)) 1893 1894 finalReduceByMon(strat); 1894 #endif1895 1895 if (Q!=NULL) updateResult(strat->Shdl,Q,strat); 1896 1896 SI_RESTORE_OPT1(save1); … … 2125 2125 h.sev = strat->sevS[j]; 2126 2126 h.SetpFDeg(); 2127 #ifdef HAVE_RINGS2128 2127 if(rField_is_Ring(currRing) && rHasLocalOrMixedOrdering(currRing)) 2129 2128 enterT_strong(h,strat); 2130 2129 else 2131 #endif 2132 enterT(h,strat); 2130 enterT(h,strat); 2133 2131 } 2134 2132 if (TEST_OPT_PROT) { PrintS("r"); mflush(); } … … 2220 2218 strat->syzComp = syzComp; 2221 2219 if (TEST_OPT_SB_1 2222 #ifdef HAVE_RINGS2223 2220 &&(!rField_is_Ring(currRing)) 2224 #endif2225 2221 ) 2226 2222 strat->newIdeal = newIdeal; … … 2288 2284 else 2289 2285 #endif 2290 #ifdef HAVE_RINGS2291 2286 if (rField_is_Ring(currRing)) 2292 2287 { … … 2360 2355 } 2361 2356 else 2362 #endif2363 2357 { 2364 2358 if (rHasLocalOrMixedOrdering(currRing)) … … 2420 2414 strat->syzComp = syzComp; 2421 2415 if (TEST_OPT_SB_1) 2422 #ifdef HAVE_RINGS2423 2416 if(!rField_is_Ring(currRing)) 2424 #endif 2425 strat->newIdeal = newIdeal; 2417 strat->newIdeal = newIdeal; 2426 2418 if (rField_has_simple_inverse(currRing)) 2427 2419 strat->LazyPass=20; … … 2490 2482 else 2491 2483 #endif 2492 #ifdef HAVE_RINGS2493 2484 if (rField_is_Ring(currRing)) 2494 2485 r=bba(F,Q,NULL,hilb,strat); 2495 2486 else 2496 #endif2497 2487 { 2498 2488 if (rHasLocalOrMixedOrdering(currRing)) … … 2539 2529 strat->syzComp = syzComp; 2540 2530 if (TEST_OPT_SB_1) 2541 #ifdef HAVE_RINGS2542 2531 if(!rField_is_Ring(currRing)) 2543 #endif 2544 strat->newIdeal = newIdeal; 2532 strat->newIdeal = newIdeal; 2545 2533 if (rField_has_simple_inverse(currRing)) 2546 2534 strat->LazyPass=20; … … 2638 2626 return idInit(1,F->rank); 2639 2627 } 2640 #ifdef HAVE_RINGS2641 2628 if(rField_is_Ring(currRing)) 2642 2629 { … … 2657 2644 } 2658 2645 } 2659 #endif2660 2646 ideal r=NULL; 2661 2647 int Kstd1_OldDeg = Kstd1_deg,i; … … 3249 3235 #endif 3250 3236 if ((rHasLocalOrMixedOrdering(currRing))|| (rField_is_numeric(currRing)) 3251 #ifdef HAVE_RINGS3252 3237 ||(rField_is_Ring(currRing)) 3253 #endif3254 3238 ) 3255 3239 return kInterRedOld(F,Q); -
kernel/GBEngine/kstd2.cc
rf8fb93d re6f1e6 109 109 #if defined(PDEBUG) || defined(PDIV_DEBUG) 110 110 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 { 120 118 return j; 121 #endif 122 119 } 123 120 } 124 121 #else … … 126 123 p_LmDivisibleBy(T[j].p, p, r)) 127 124 { 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 { 136 132 return j; 137 #endif 138 133 } 139 134 } 140 135 #endif … … 153 148 p, not_sev, r)) 154 149 { 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 { 163 157 return j; 164 #endif 165 158 } 166 159 } 167 160 #else … … 169 162 p_LmDivisibleBy(T[j].t_p, p, r)) 170 163 { 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 { 179 171 return j; 180 #endif 181 172 } 182 173 } 183 174 #endif … … 211 202 p, not_sev, currRing)) 212 203 { 213 #ifdef HAVE_RINGS214 204 if(rField_is_Ring(currRing)) 215 205 {if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing)) 216 206 return j;} 217 207 else 218 #endif219 208 return j; 220 209 } … … 223 212 p_LmDivisibleBy(strat->S[j], p, currRing)) 224 213 { 225 #ifdef HAVE_RINGS226 214 if(rField_is_Ring(currRing)) 227 215 {if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing)) 228 216 return j;} 229 217 else 230 #endif231 218 return j; 232 219 } … … 255 242 p, not_sev, currRing)) 256 243 { 257 #ifdef HAVE_RINGS258 244 if(rField_is_Ring(currRing)) 259 245 {if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing)) 260 246 return j;} 261 247 else 262 #endif263 248 return j; 264 249 } … … 267 252 p_LmDivisibleBy(strat->S[j], p, currRing)) 268 253 { 269 #ifdef HAVE_RINGS270 254 if(rField_is_Ring(currRing)) 271 255 {if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing)) 272 256 return j;} 273 257 else 274 #endif275 258 return j; 276 259 } … … 1522 1505 { 1523 1506 // deletes the short spoly 1524 #ifdef HAVE_RINGS1525 1507 if (rField_is_Ring(currRing)) 1526 1508 pLmDelete(strat->P.p); 1527 1509 else 1528 #endif1529 1510 pLmFree(strat->P.p); 1530 1511 strat->P.p = NULL; … … 1639 1620 { 1640 1621 enterT(strat->P, strat); 1641 #ifdef HAVE_RINGS1642 1622 if (rField_is_Ring(currRing)) 1643 1623 superenterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl); 1644 1624 else 1645 #endif1646 1625 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl); 1647 1626 // posInS only depends on the leading term … … 1670 1649 int pos=posInS(strat,strat->sl,strat->P.p,strat->P.ecart); 1671 1650 enterT(strat->P, strat); 1672 #ifdef HAVE_RINGS1673 1651 if (rField_is_Ring(currRing)) 1674 1652 superenterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl); 1675 1653 else 1676 #endif1677 1654 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl); 1678 1655 strat->enterS(strat->P, pos, strat, strat->tl); … … 1684 1661 if (strat->P.lcm!=NULL) 1685 1662 { 1686 #ifdef HAVE_RINGS1687 1663 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); 1692 1665 strat->P.lcm=NULL; 1693 1666 } … … 1709 1682 if (TEST_OPT_SB_1) 1710 1683 { 1711 #ifdef HAVE_RINGS1712 1684 if(!rField_is_Ring(currRing)) 1713 #endif1714 1685 { 1715 1686 int k=1; … … 1746 1717 } 1747 1718 else if (TEST_OPT_PROT) PrintLn(); 1748 #ifdef HAVE_RINGS1749 1719 if(nCoeff_is_Ring_Z(currRing->cf)) 1750 1720 finalReduceByMon(strat); … … 1759 1729 } 1760 1730 } 1761 #endif1762 1731 /* release temp data-------------------------------- */ 1763 1732 exitBuchMora(strat); … … 1947 1916 // deletes the short spoly 1948 1917 /* 1949 #ifdef HAVE_RINGS1950 1918 if (rField_is_Ring(currRing)) 1951 1919 pLmDelete(strat->P.p); 1952 1920 else 1953 #endif1954 1921 pLmFree(strat->P.p); 1955 1922 */ … … 2137 2104 pWrite(strat->P.sig); 2138 2105 */ 2139 #ifdef HAVE_RINGS2140 2106 if (rField_is_Ring(currRing)) 2141 2107 superenterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl); 2142 2108 else 2143 #endif2144 2109 enterpairsSig(strat->P.p,strat->P.sig,strat->sl+1,strat->sl,strat->P.ecart,pos,strat, strat->tl); 2145 2110 // posInS only depends on the leading term … … 2338 2303 if (TEST_OPT_SB_1) 2339 2304 { 2340 #ifdef HAVE_RINGS2341 2305 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 } 2357 2320 } 2358 2321 } … … 2512 2475 { 2513 2476 if (TEST_OPT_PROT) { PrintS("t"); mflush(); } 2514 #ifdef HAVE_RINGS2515 2477 if (rField_is_Ring(currRing)) 2516 2478 { … … 2518 2480 } 2519 2481 else 2520 #endif2521 2482 { 2522 2483 si_opt_1 &= ~Sy_bit(OPT_INTSTRATEGY); … … 2585 2546 { 2586 2547 if (TEST_OPT_PROT) { PrintS("t"); mflush(); } 2587 #ifdef HAVE_RINGS2588 2548 if (rField_is_Ring(currRing)) 2589 2549 { … … 2591 2551 } 2592 2552 else 2593 #endif2594 2553 { 2595 2554 p = redtailBba(p,max_ind,strat,(lazyReduce & KSTD_NF_NONORM)==0); … … 2701 2660 { 2702 2661 // deletes the short spoly 2703 #ifdef HAVE_RINGS2704 2662 if (rField_is_Ring(currRing)) 2705 2663 pLmDelete(strat->P.p); 2706 2664 else 2707 #endif2708 2665 pLmFree(strat->P.p); 2709 2666 -
kernel/GBEngine/kutil.cc
rf8fb93d re6f1e6 334 334 poly p = L->GetLmTailRing(); 335 335 336 #ifdef HAVE_RINGS337 336 if (rField_is_Ring(r) /*&& (rHasLocalOrMixedOrdering(r))*/) 338 337 lc = pGetCoeff(p); 339 #endif340 338 #if ADIDEBUG 341 339 printf("\n cancelunit\n"); … … 365 363 { 366 364 number eins; 367 #ifdef HAVE_RINGS368 365 if (rField_is_Ring(r) /*&& (rHasLocalOrMixedOrdering(r))*/) 369 366 eins = nCopy(lc); 370 367 else 371 #endif372 368 eins=nInit(1); 373 369 if (L->p != NULL) … … 453 449 // k = 0; 454 450 p=pIsPurePower(pp); 451 if (rField_is_Ring(currRing) && (!n_IsUnit(pGetCoeff(pp),currRing->cf))) return; 455 452 if (p!=0) strat->NotUsedAxis[p] = FALSE; 456 453 /*- the leading term of pp is a power of the p-th variable -*/ … … 2120 2117 pDelete(&pSigMult); 2121 2118 pDelete(&sSigMult); 2122 #ifdef HAVE_RINGS2123 2119 if (rField_is_Ring(currRing)) 2124 2120 pLmDelete(Lp.lcm); 2125 2121 else 2126 #endif2127 2122 pLmFree(Lp.lcm); 2128 2123 Lp.lcm=NULL; … … 2141 2136 pDelete(&pSigMult); 2142 2137 pDelete(&sSigMult); 2143 #ifdef HAVE_RINGS2144 2138 if (rField_is_Ring(currRing)) 2145 2139 pLmDelete(Lp.lcm); 2146 2140 else 2147 #endif2148 2141 pLmFree(Lp.lcm); 2149 2142 Lp.lcm=NULL; … … 3986 3979 int j=pos; 3987 3980 3988 #ifdef HAVE_RINGS3989 3981 assume (!rField_is_Ring(currRing)); 3990 #endif3991 3982 //#if ADIDEBUG 3992 3983 #if 0 … … 4042 4033 int j=pos; 4043 4034 4044 #ifdef HAVE_RINGS4045 4035 assume (!rField_is_Ring(currRing)); 4046 #endif4047 4036 4048 4037 initenterpairsSig(h,hSig,hFrom,k,ecart,0,strat, atR); … … 4073 4062 const int iCompH = pGetComp(h); 4074 4063 4075 #ifdef HAVE_RINGS4076 4064 if (rField_is_Ring(currRing)) 4077 4065 { … … 4089 4077 } 4090 4078 else 4091 #endif4092 4079 for (j=0; j<=k; j++) 4093 4080 { … … 4237 4224 else 4238 4225 { 4239 #ifdef HAVE_RINGS4240 4226 if (rField_is_Ring(currRing)) 4241 4227 { … … 4265 4251 } 4266 4252 else 4267 #endif4268 4253 if (pLmCmp(set[length],p)== -cmp_int) 4269 4254 return length+1; … … 5887 5872 (ecart== LONG_MAX || ecart>= strat->ecartS[j])) 5888 5873 { 5889 #ifdef HAVE_RINGS5890 5874 if(rField_is_Ring(r)) 5891 5875 {if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), r)) 5892 5876 break;} 5893 5877 else 5894 #endif5895 5878 break; 5896 5879 } … … 5900 5883 p_LmDivisibleBy(strat->S[j], p, r)) 5901 5884 { 5902 #ifdef HAVE_RINGS5903 5885 if(rField_is_Ring(r)) 5904 5886 {if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), r)) 5905 5887 break;} 5906 5888 else 5907 #endif5908 5889 break; 5909 5890 } … … 5939 5920 (ecart== LONG_MAX || ecart>= strat->ecartS[j])) 5940 5921 { 5941 #ifdef HAVE_RINGS5942 5922 if(rField_is_Ring(r)) 5943 5923 {if(n_DivBy(pGetCoeff(p), pGetCoeff(t->t_p), r)) 5944 5924 return t;} 5945 5925 else 5946 #endif5947 5926 return t; 5948 5927 } … … 5954 5933 if (p_LmDivisibleBy(t->t_p, p, r)) 5955 5934 { 5956 #ifdef HAVE_RINGS5957 5935 if(rField_is_Ring(r)) 5958 5936 {if(n_DivBy(pGetCoeff(p), pGetCoeff(t->t_p), r)) 5959 5937 return t;} 5960 5938 else 5961 #endif5962 5939 return t; 5963 5940 } … … 7362 7339 { 7363 7340 change=FALSE; 7364 #ifdef HAVE_RINGS7365 7341 if(rField_is_Ring(currRing)) 7366 7342 any_change = FALSE; 7367 #endif7368 7343 if (((strat->fromQ==NULL) || (strat->fromQ[i]==0)) && (i>0)) 7369 7344 { … … 7968 7943 strat->sevT[atT] = (p.sev == 0 ? pGetShortExpVector(p.p) : p.sev); 7969 7944 #if 1 7970 #ifdef HAVE_RINGS7971 7945 if(rField_is_Ring(currRing) && rHasLocalOrMixedOrdering(currRing) && !n_IsUnit(p.p->coef, currRing->cf)) 7972 7946 { … … 7992 7966 } 7993 7967 //getchar();*/ 7994 #endif7995 7968 #endif 7996 7969 kTest_T(&(strat->T[atT])); … … 8072 8045 //can be used also if the ideal is not homogenous 8073 8046 if((rHasLocalOrMixedOrdering(currRing)) && (rHasMixedOrdering(currRing)==FALSE)) 8074 #ifdef HAVE_RINGS 8075 { 8076 if(rField_is_Ring(currRing)) 8047 { 8048 if(rField_is_Ring(currRing)) 8077 8049 *hilb=NULL; 8078 else8050 else 8079 8051 return; 8080 8052 } 8081 #endif8082 8053 if (strat->homog!=isHomog) 8083 8054 { … … 8092 8063 if (TEST_OPT_SB_1) 8093 8064 strat->chainCrit=chainCritOpt_1; 8094 #ifdef HAVE_RINGS8095 8065 if (rField_is_Ring(currRing)) 8096 8066 { … … 8098 8068 strat->chainCrit=chainCritRing; 8099 8069 } 8100 #endif8101 8070 #ifdef HAVE_RATGRING 8102 8071 if (rIsRatGRing(currRing)) … … 8135 8104 #endif 8136 8105 8137 #ifdef HAVE_RINGS8138 8106 // Coefficient ring? 8139 8107 if (rField_is_Ring(currRing)) … … 8143 8111 strat->honey = FALSE; 8144 8112 } 8145 #endif8146 8113 #ifdef KDEBUG 8147 8114 if (TEST_OPT_DEBUG) … … 8172 8139 strat->syzCrit = syzCriterion; 8173 8140 } 8174 #ifdef HAVE_RINGS8175 8141 if (rField_is_Ring(currRing)) 8176 8142 { … … 8178 8144 strat->chainCrit=chainCritRing; 8179 8145 } 8180 #endif8181 8146 #ifdef HAVE_RATGRING 8182 8147 if (rIsRatGRing(currRing)) … … 8208 8173 #endif 8209 8174 8210 #ifdef HAVE_RINGS8211 8175 // Coefficient ring? 8212 8176 if (rField_is_Ring(currRing)) … … 8216 8180 strat->honey = FALSE; 8217 8181 } 8218 #endif8219 8182 #ifdef KDEBUG 8220 8183 if (TEST_OPT_DEBUG) … … 8320 8283 else if (BTEST1(12) || BTEST1(14) || BTEST1(16) || BTEST1(18)) 8321 8284 strat->posInT = posInT1; 8322 #ifdef HAVE_RINGS8323 8285 if (rField_is_Ring(currRing)) 8324 8286 { … … 8328 8290 strat->posInT = posInT11; 8329 8291 } 8330 #endif8331 8292 strat->posInLDependsOnLength = kPosInLDependsOnLength(strat->posInL); 8332 8293 } … … 8366 8327 if (strat->kNoether!=NULL) pSetComp(strat->kNoetherTail(), strat->ak); 8367 8328 } 8368 #ifdef HAVE_RINGS8369 8329 if(rField_is_Ring(currRing)) 8370 8330 { … … 8372 8332 } 8373 8333 else 8374 #endif8375 8334 { 8376 8335 if(TEST_OPT_SB_1) … … 8401 8360 strat->noTailReduction = !TEST_OPT_REDTAIL; 8402 8361 if ((!TEST_OPT_SB_1) 8403 #ifdef HAVE_RINGS8404 8362 || (rField_is_Ring(currRing)) 8405 #endif8406 8363 ) 8407 8364 { … … 8513 8470 else if (BTEST1(12) || BTEST1(14) || BTEST1(16) || BTEST1(18)) 8514 8471 strat->posInT = posInT1; 8515 #ifdef HAVE_RINGS8516 8472 if (rField_is_Ring(currRing)) 8517 8473 { … … 8521 8477 strat->posInT = posInT11; 8522 8478 } 8523 #endif8524 8479 strat->posInLDependsOnLength = FALSE; 8525 8480 strat->posInLSba = posInLSig; … … 8564 8519 if (strat->kNoether!=NULL) pSetComp(strat->kNoetherTail(), strat->ak); 8565 8520 } 8566 #ifdef HAVE_RINGS8567 8521 if(rField_is_Ring(currRing)) 8568 8522 { … … 8570 8524 } 8571 8525 else 8572 #endif8573 8526 { 8574 8527 if(TEST_OPT_SB_1) … … 8598 8551 if (!TEST_OPT_SB_1) 8599 8552 { 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); 8604 8554 } 8605 8555 //if (strat->fromQ!=NULL) omFreeSize(strat->fromQ,IDELEMS(strat->Shdl)*sizeof(int)); … … 8668 8618 &&(pLmDivisibleBy(Q->m[q],r->m[l]))) 8669 8619 { 8670 #if HAVE_RINGS8671 8620 if(!rField_is_Ring(currRing) || n_DivBy(r->m[l]->coef, Q->m[q]->coef, currRing)) 8672 #endif8673 8621 { 8674 8622 if (TEST_OPT_REDSB) … … 8765 8713 && (r->m[q]!=NULL) 8766 8714 &&(pLmDivisibleBy(r->m[l],r->m[q])) 8767 #if HAVE_RINGS8768 8715 && (!rField_is_Ring(currRing) || 8769 8716 n_DivBy(r->m[q]->coef, r->m[l]->coef, currRing)) 8770 #endif8771 8717 ) 8772 8718 { 8773 8719 //If they are equal then take the one with the smallest length 8774 8720 if(pLmDivisibleBy(r->m[q],r->m[l]) 8775 #ifdef HAVE_RINGS8776 8721 && ((rField_is_Ring(currRing) 8777 8722 && n_DivBy(r->m[q]->coef, r->m[l]->coef, currRing)) 8778 8723 || !(rField_is_Ring(currRing))) 8779 #endif8780 8724 && (pLength(r->m[q]) < pLength(r->m[l]) || 8781 8725 (pLength(r->m[q]) == pLength(r->m[l]) && nGreaterZero(r->m[q]->coef)))) … … 8933 8877 scComputeHC(strat->Shdl,NULL,strat->ak,strat->kHEdge, strat->tailRing); 8934 8878 #endif 8879 if (strat->kHEdge==NULL) return FALSE; 8935 8880 if (strat->t_kHEdge != NULL) p_LmFree(strat->t_kHEdge, strat->tailRing); 8936 8881 if (strat->tailRing != currRing) … … 8974 8919 return TRUE; 8975 8920 } 8976 #ifdef HAVE_RINGS8977 8921 if (rField_is_Ring(currRing)) 8978 8922 pLmDelete(newNoether); 8979 8923 else 8980 #endif8981 8924 pLmFree(newNoether); 8982 8925 return FALSE; … … 9366 9309 // Hmmm .. the condition pFDeg == p_Deg 9367 9310 // 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 9373 9312 (strat->ak==0), // omit_comp if the input is an ideal 9374 9313 expbound); // exp_limit … … 10208 10147 if (strat->kNoether!=NULL) pSetComp(strat->kNoetherTail(), strat->ak); 10209 10148 } 10210 #ifdef HAVE_RINGS10211 10149 if(rField_is_Ring(currRing)) 10212 10150 { 10213 10151 /*Shdl=*/initSL(F, Q,strat); /*sets also S, ecartS, fromQ */ 10214 10152 } 10215 #endif10216 10153 { 10217 10154 if(TEST_OPT_SB_1) … … 10242 10179 { 10243 10180 /* 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); 10248 10182 } 10249 10183 if (strat->fromQ!=NULL) omFreeSize(strat->fromQ,IDELEMS(strat->Shdl)*sizeof(int)); … … 10696 10630 int j=pos; 10697 10631 10698 #ifdef HAVE_RINGS10699 10632 assume (!rField_is_Ring(currRing)); 10700 #endif10701 10633 initenterpairsShift(h,k,ecart,0,strat, atR,uptodeg,lV); 10702 10634 if ( (!strat->fromT) -
kernel/GBEngine/syz.cc
rf8fb93d re6f1e6 534 534 res[/*syzIndex+*/1] = idSyzygies(res[0/*syzIndex*/],hom,&w,FALSE,setRegularity,&Kstd1_deg); 535 535 if ((!TEST_OPT_NOTREGULARITY) && (Kstd1_deg>0) 536 #ifdef HAVE_RINGS537 536 && (!rField_is_Ring(currRing)) 538 #endif539 537 ) si_opt_1 |= Sy_bit(OPT_DEGBOUND); 540 538 } -
kernel/combinatorics/hdegree.cc
rf8fb93d re6f1e6 1017 1017 for(i=0;i<=idElem(S);i++) 1018 1018 { 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)))) 1020 1022 { 1021 1023 p_Delete(&SS->m[i],tailRing); -
kernel/ideals.cc
rf8fb93d re6f1e6 58 58 intvec * wth; 59 59 BOOLEAN homog; 60 #ifdef HAVE_RINGS61 60 if(rField_is_Ring(currRing)) 62 61 { … … 65 64 return e; 66 65 } 67 #endif68 66 homog = idHomModule(h1,currRing->qideal,&wth); 69 67 if (rHasGlobalOrdering(currRing)) … … 656 654 && (h==isHomog) 657 655 && (!rIsPluralRing(currRing)) 658 #ifdef HAVE_RINGS659 656 && (!rField_is_Ring(currRing)) 660 #endif661 657 ) 662 658 { … … 1293 1289 } 1294 1290 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); 1299 1292 } 1300 1293 idDelete(&temph1); -
libpolys/coeffs/coeffs.h
rf8fb93d re6f1e6 744 744 745 745 // Tests: 746 #ifdef HAVE_RINGS 746 747 static FORCE_INLINE BOOLEAN nCoeff_is_Ring_2toM(const coeffs r) 747 748 { assume(r != NULL); return (getCoeffType(r)==n_Z2m); } … … 758 759 static FORCE_INLINE BOOLEAN nCoeff_is_Ring(const coeffs r) 759 760 { 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 760 768 761 769 /// returns TRUE, if r is a field or r has no zero divisors (i.e is a domain) -
libpolys/polys/kbuckets.cc
rf8fb93d re6f1e6 588 588 if (i<coef_start) 589 589 bucket->buckets[i] = p_Mult_nn(bucket->buckets[i], n, r); 590 #ifdef HAVE_RINGS591 590 /* Frank Seelisch on March 11, 2010: 592 591 This looks a bit strange: The following "if" is indented … … 601 600 kBucketAdjust(bucket, i); 602 601 } 603 #endif604 602 else 605 603 if (bucket->coef[i]!=NULL) … … 613 611 #else 614 612 bucket->buckets[i] = p_Mult_nn(bucket->buckets[i], n, r); 615 #ifdef HAVE_RINGS616 613 if (rField_is_Ring(r) && !(rField_is_Domain(r))) 617 614 { … … 619 616 kBucketAdjust(bucket, i); 620 617 } 621 #endif622 618 #endif 623 619 } … … 719 715 i = pLogLength(l1); 720 716 721 #if defined(HAVE_ RINGS)||defined(HAVE_PLURAL)717 #if defined(HAVE_PLURAL) 722 718 if ((rField_is_Ring(r) && !(rField_is_Domain(r))) 723 719 ||(rIsPluralRing(r))) -
libpolys/polys/monomials/p_polys.cc
rf8fb93d re6f1e6 1221 1221 1222 1222 /*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 1224 1225 */ 1225 1226 int p_IsPurePower(const poly p, const ring r) 1226 1227 { 1227 #ifdef HAVE_RINGS1228 if (rField_is_Ring(r))1229 {1230 if (p == NULL) return 0;1231 if (!n_IsUnit(pGetCoeff(p), r->cf)) return 0;1232 }1233 #endif1234 1228 int i,k=0; 1235 1229 … … 2184 2178 } 2185 2179 if ((pNext(rc) != NULL) 2186 #ifdef HAVE_RINGS2187 2180 || rField_is_Ring(r) 2188 #endif2189 2181 ) 2190 2182 return p_Pow(p,i,r); … … 2230 2222 2231 2223 2232 #ifdef HAVE_RINGS2233 2224 if (rField_is_Ring(r)) 2234 2225 { … … 2255 2246 return; 2256 2247 } 2257 #endif2258 2248 number h,d; 2259 2249 poly p; … … 2733 2723 number d, h; 2734 2724 2735 #ifdef HAVE_RINGS2736 2725 if (rField_is_Ring(r)) 2737 2726 { … … 2740 2729 return p; 2741 2730 } 2742 #endif2743 2731 2744 2732 if (rField_is_Zp(r) && TEST_OPT_INTSTRATEGY) … … 3028 3016 poly p; 3029 3017 3030 #ifdef HAVE_RINGS3031 3018 if (rField_is_Ring(r)) 3032 3019 { … … 3036 3023 return; 3037 3024 } 3038 #endif3039 3025 3040 3026 if (rField_is_Zp(r) && TEST_OPT_INTSTRATEGY) … … 3577 3563 void p_Norm(poly p1, const ring r) 3578 3564 { 3579 #ifdef HAVE_RINGS3580 3565 if (rField_is_Ring(r)) 3581 3566 { … … 3583 3568 // Werror("p_Norm not possible in the case of coefficient rings."); 3584 3569 } 3585 else 3586 #endif 3587 if (p1!=NULL) 3570 else if (p1!=NULL) 3588 3571 { 3589 3572 if (pNext(p1)==NULL) … … 4395 4378 if (pLength(p1) != pLength(p2)) 4396 4379 return FALSE; 4397 #ifdef HAVE_RINGS4398 4380 if (rField_is_Ring(r)) 4399 4381 { 4400 4382 if (!n_DivBy(p_GetCoeff(p1, r), p_GetCoeff(p2, r), r)) return FALSE; 4401 4383 } 4402 #endif4403 4384 n=n_Div(p_GetCoeff(p1,r),p_GetCoeff(p2,r),r); 4404 4385 while ((p1 != NULL) /*&& (p2 != NULL)*/) -
libpolys/polys/monomials/p_polys.h
rf8fb93d re6f1e6 1807 1807 { 1808 1808 if (p == NULL) return FALSE; 1809 #ifdef HAVE_RINGS1810 1809 if (rField_is_Ring(r)) 1811 1810 return (p_LmIsConstant(p, r) && n_IsUnit(pGetCoeff(p),r->cf)); 1812 #endif1813 1811 return p_LmIsConstant(p, r); 1814 1812 } -
libpolys/polys/monomials/ring.cc
rf8fb93d re6f1e6 3375 3375 if ( (r->cf->extRing!=NULL) 3376 3376 || rField_is_Q(r) 3377 #ifdef HAVE_RINGS3378 3377 || rField_is_Ring(r) 3379 #endif3380 3378 ) 3381 3379 r->options |= Sy_bit(OPT_INTSTRATEGY); … … 5118 5116 if (rField_is_Q_a(r)) return getCoeffType(r->cf); 5119 5117 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; 5126 5122 5127 5123 return n_unknown; -
libpolys/polys/operations/p_Mult_q.cc
rf8fb93d re6f1e6 70 70 assume(p != NULL && pNext(p) != NULL && q != NULL && pNext(q) != NULL); 71 71 pAssume1(! pHaveCommonMonoms(p, q)); 72 #ifdef HAVE_RINGS73 72 assume(!rField_is_Ring(r) || rField_is_Domain(r)); 74 #endif75 73 assume(lp >= 1 && lq >= 1); 76 74 p_Test(p, r); -
libpolys/polys/simpleideals.cc
rf8fb93d re6f1e6 267 267 if (id->m[j]!=NULL) 268 268 { 269 #ifdef HAVE_RINGS270 269 if (rField_is_Ring(r)) 271 270 { … … 281 280 if (p_ComparePolys(id->m[i], id->m[j],r)) p_Delete(&id->m[j],r); 282 281 } 283 #else284 if (p_ComparePolys(id->m[i], id->m[j],r)) p_Delete(&id->m[j],r);285 #endif286 282 } 287 283 } … … 357 353 if (id->m[j]!=NULL) 358 354 { 359 #ifdef HAVE_RINGS360 355 if (rField_is_Ring(r)) 361 356 { … … 372 367 else 373 368 { 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 } 379 379 } 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_RINGS386 }387 #endif388 380 } 389 381 } … … 1433 1425 if (componentIsUsed[j]==0) 1434 1426 { 1435 #ifdef HAVE_RINGS1436 1427 if (p_LmIsConstantComp(p,r) && 1437 1428 (!rField_is_Ring(r) || n_IsUnit(pGetCoeff(p),r->cf))) 1438 1429 { 1439 #else1440 if (p_LmIsConstantComp(p,r))1441 {1442 #endif1443 1430 generator = i; 1444 1431 componentIsUsed[j] = 1;
Note: See TracChangeset
for help on using the changeset viewer.