Changeset d6e0c0 in git for kernel/GBEngine/kstd2.cc
- Timestamp:
- May 27, 2016, 11:35:38 AM (8 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'fc741b6502fd8a97288eaa3eba6e5220f3c3df87')
- Children:
- 11416edcd9adbf9f06648517bfe1cc5a0cf57377
- Parents:
- b61d85898290efdf5f9da1b651cffefa4abd25d2e21795456bd208614b301fe91592ebed25ebc2d1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kstd2.cc
rb61d858 rd6e0c0 106 106 pAssume(~not_sev == p_GetShortExpVector(p, r)); 107 107 108 loop 109 { 110 if (j > strat->tl) return -1; 108 #ifdef HAVE_RINGS 109 if(rField_is_Ring(r)) 110 { 111 loop 112 { 113 if (j > strat->tl) return -1; 111 114 #if defined(PDEBUG) || defined(PDIV_DEBUG) 112 if (p_LmShortDivisibleBy(T[j].p, sevT[j],p, not_sev, r)) 113 { 114 if(rField_is_Ring(r)) 115 if (p_LmShortDivisibleBy(T[j].p, sevT[j],p, not_sev, r)) 115 116 { 116 117 if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].p), r)) 117 return j;}118 else119 {120 118 return j; 121 }122 119 } 123 120 #else 124 if (!(sevT[j] & not_sev) &&121 if (!(sevT[j] & not_sev) && 125 122 p_LmDivisibleBy(T[j].p, p, r)) 126 123 { 127 if(rField_is_Ring(r)) 128 { 129 if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].p), r)) 130 return j; 131 } 132 else 133 { 124 if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].p), r)) 134 125 return j; 135 } 136 } 137 #endif 138 j++; 139 } 126 } 127 #endif 128 j++; 129 } 130 } 131 else 132 { 133 loop 134 { 135 if (j > strat->tl) return -1; 136 #if defined(PDEBUG) || defined(PDIV_DEBUG) 137 if (p_LmShortDivisibleBy(T[j].p, sevT[j],p, not_sev, r)) 138 { 139 return j; 140 } 141 #else 142 if (!(sevT[j] & not_sev) && 143 p_LmDivisibleBy(T[j].p, p, r)) 144 { 145 return j; 146 } 147 #endif 148 j++; 149 } 150 } 151 #endif 140 152 } 141 153 else … … 143 155 const poly p=L->t_p; 144 156 const ring r=strat->tailRing; 145 loop 146 { 147 if (j > strat->tl) return -1; 157 #ifdef HAVE_RINGS 158 if(rField_is_Ring(r)) 159 { 160 loop 161 { 162 if (j > strat->tl) return -1; 148 163 #if defined(PDEBUG) || defined(PDIV_DEBUG) 149 if (p_LmShortDivisibleBy(T[j].t_p, sevT[j],164 if (p_LmShortDivisibleBy(T[j].t_p, sevT[j], 150 165 p, not_sev, r)) 151 166 { 152 if(rField_is_Ring(r)) 153 { 154 if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].t_p), r)) 155 return j; 156 } 157 else 158 { 167 if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].t_p), r)) 159 168 return j; 160 }161 169 } 162 170 #else 163 if (!(sevT[j] & not_sev) &&171 if (!(sevT[j] & not_sev) && 164 172 p_LmDivisibleBy(T[j].t_p, p, r)) 165 173 { 166 if(rField_is_Ring(r)) 167 { 168 if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].t_p), r)) 169 return j; 170 } 171 else 172 { 174 if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].t_p), r)) 173 175 return j; 174 } 175 } 176 #endif 177 j++; 176 } 177 #endif 178 j++; 179 } 180 } 181 else 182 #endif 183 { 184 loop 185 { 186 if (j > strat->tl) return -1; 187 #if defined(PDEBUG) || defined(PDIV_DEBUG) 188 if (p_LmShortDivisibleBy(T[j].t_p, sevT[j], 189 p, not_sev, r)) 190 { 191 return j; 192 } 193 #else 194 if (!(sevT[j] & not_sev) && 195 p_LmDivisibleBy(T[j].t_p, p, r)) 196 { 197 return j; 198 } 199 #endif 200 j++; 201 } 178 202 } 179 203 } … … 190 214 #if 1 191 215 int ende; 192 if ((strat->ak>0) || currRing->pLexOrder ) ende=strat->sl;216 if ((strat->ak>0) || currRing->pLexOrder || rField_is_Ring(currRing)) ende=strat->sl; 193 217 else ende=posInS(strat,*max_ind,p,0)+1; 194 218 if (ende>(*max_ind)) ende=(*max_ind); … … 197 221 #endif 198 222 (*max_ind)=ende; 199 loop 200 { 201 if (j > ende) return -1; 223 #ifdef HAVE_RINGS 224 if(rField_is_Ring(currRing)) 225 { 226 loop 227 { 228 if (j > ende) return -1; 202 229 #if defined(PDEBUG) || defined(PDIV_DEBUG) 203 if (p_LmShortDivisibleBy(strat->S[j], strat->sevS[j],230 if (p_LmShortDivisibleBy(strat->S[j], strat->sevS[j], 204 231 p, not_sev, currRing)) 205 { 206 if(rField_is_Ring(currRing)) 207 {if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing)) 208 return j;} 209 else 210 return j; 211 } 232 { 233 if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing)) 234 return j; 235 } 212 236 #else 213 if ( !(strat->sevS[j] & not_sev) &&237 if ( !(strat->sevS[j] & not_sev) && 214 238 p_LmDivisibleBy(strat->S[j], p, currRing)) 215 { 216 if(rField_is_Ring(currRing)) 217 {if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing)) 218 return j;} 219 else 220 return j; 221 } 222 #endif 223 j++; 239 { 240 if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing)) 241 return j; 242 } 243 #endif 244 j++; 245 } 246 } 247 else 248 #endif 249 { 250 loop 251 { 252 if (j > ende) return -1; 253 #if defined(PDEBUG) || defined(PDIV_DEBUG) 254 if (p_LmShortDivisibleBy(strat->S[j], strat->sevS[j], 255 p, not_sev, currRing)) 256 { 257 return j; 258 } 259 #else 260 if ( !(strat->sevS[j] & not_sev) && 261 p_LmDivisibleBy(strat->S[j], p, currRing)) 262 { 263 return j; 264 } 265 #endif 266 j++; 267 } 224 268 } 225 269 } … … 237 281 int ende=strat->sl; 238 282 #endif 239 loop 240 { 241 if (j > ende) return -1; 283 #ifdef HAVE_RINGS 284 if(rField_is_Ring(currRing)) 285 { 286 loop 287 { 288 if (j > ende) return -1; 242 289 #if defined(PDEBUG) || defined(PDIV_DEBUG) 243 if (p_LmShortDivisibleBy(strat->S[j], strat->sevS[j],290 if (p_LmShortDivisibleBy(strat->S[j], strat->sevS[j], 244 291 p, not_sev, currRing)) 245 { 246 if(rField_is_Ring(currRing)) 247 {if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing)) 248 return j;} 249 else 250 return j; 251 } 292 { 293 if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing)) 294 return j; 295 } 252 296 #else 253 if ( !(strat->sevS[j] & not_sev) &&297 if ( !(strat->sevS[j] & not_sev) && 254 298 p_LmDivisibleBy(strat->S[j], p, currRing)) 255 { 256 if(rField_is_Ring(currRing)) 257 {if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing)) 258 return j;} 259 else 260 return j; 261 } 262 #endif 263 j++; 299 { 300 if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing)) 301 return j; 302 } 303 #endif 304 j++; 305 } 306 } 307 else 308 #endif 309 { 310 loop 311 { 312 if (j > ende) return -1; 313 #if defined(PDEBUG) || defined(PDIV_DEBUG) 314 if (p_LmShortDivisibleBy(strat->S[j], strat->sevS[j], 315 p, not_sev, currRing)) 316 { 317 return j; 318 } 319 #else 320 if ( !(strat->sevS[j] & not_sev) && 321 p_LmDivisibleBy(strat->S[j], p, currRing)) 322 { 323 return j; 324 } 325 #endif 326 j++; 327 } 264 328 } 265 329 } … … 1541 1605 1542 1606 initBuchMoraCrit(strat); /*set Gebauer, honey, sugarCrit*/ 1543 initBuchMoraPos(strat); 1607 if(rField_is_Ring(currRing)) 1608 initBuchMoraPosRing(strat); 1609 else 1610 initBuchMoraPos(strat); 1544 1611 initHilbCrit(F,Q,&hilb,strat); 1545 1612 initBba(strat); … … 1760 1827 { 1761 1828 enterT(strat->P, strat); 1829 #ifdef HAVE_RINGS 1762 1830 if (rField_is_Ring(currRing)) 1763 1831 superenterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl); 1764 1832 else 1833 #endif 1765 1834 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl); 1766 1835 // posInS only depends on the leading term … … 1800 1869 int pos=posInS(strat,strat->sl,strat->P.p,strat->P.ecart); 1801 1870 enterT(strat->P, strat); 1871 #ifdef HAVE_RINGS 1802 1872 if (rField_is_Ring(currRing)) 1803 1873 superenterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl); 1804 1874 else 1875 #endif 1805 1876 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl); 1806 1877 strat->enterS(strat->P, pos, strat, strat->tl); … … 1859 1930 } 1860 1931 else if (TEST_OPT_PROT) PrintLn(); 1932 #ifdef HAVE_RINGS 1861 1933 if(nCoeff_is_Ring_Z(currRing->cf)) 1862 1934 finalReduceByMon(strat); … … 1871 1943 } 1872 1944 } 1945 #endif 1873 1946 /* release temp data-------------------------------- */ 1874 1947 exitBuchMora(strat); … … 1890 1963 return (strat->Shdl); 1891 1964 } 1965 1892 1966 ideal sba (ideal F0, ideal Q,intvec *w,intvec *hilb,kStrategy strat) 1893 1967 { … … 1994 2068 initSbaCrit(strat); /*set Gebauer, honey, sugarCrit*/ 1995 2069 initSbaPos(strat); 1996 //initBuchMoraPos(strat);1997 2070 initHilbCrit(F,Q,&hilb,strat); 1998 2071 initSba(F,strat); … … 2462 2535 pWrite(strat->P.sig); 2463 2536 */ 2537 #ifdef HAVE_RINGS 2464 2538 if (rField_is_Ring(currRing)) 2465 2539 superenterpairsSig(strat->P.p,strat->P.sig,strat->sl+1,strat->sl,strat->P.ecart,pos,strat, strat->tl); 2466 2540 else 2541 #endif 2467 2542 enterpairsSig(strat->P.p,strat->P.sig,strat->sl+1,strat->sl,strat->P.ecart,pos,strat, strat->tl); 2468 2543 #if ADIDEBUG … … 3001 3076 { 3002 3077 if (TEST_OPT_PROT) { PrintS("t"); mflush(); } 3078 #ifdef HAVE_RINGS 3003 3079 if (rField_is_Ring(currRing)) 3004 3080 { … … 3006 3082 } 3007 3083 else 3084 #endif 3008 3085 { 3009 3086 si_opt_1 &= ~Sy_bit(OPT_INTSTRATEGY); … … 3072 3149 { 3073 3150 if (TEST_OPT_PROT) { PrintS("t"); mflush(); } 3151 #ifdef HAVE_RINGS 3074 3152 if (rField_is_Ring(currRing)) 3075 3153 { … … 3077 3155 } 3078 3156 else 3157 #endif 3079 3158 { 3080 3159 p = redtailBba(p,max_ind,strat,(lazyReduce & KSTD_NF_NONORM)==0); … … 3423 3502 3424 3503 initBuchMoraCrit(strat); /*set Gebauer, honey, sugarCrit, NO CHANGES */ 3425 initBuchMoraPos(strat); /*NO CHANGES YET: perhaps later*/ 3504 if(rField_is_Ring(currRing)) 3505 initBuchMoraPosRing(strat); 3506 else 3507 initBuchMoraPos(strat); /*NO CHANGES YET: perhaps later*/ 3426 3508 initHilbCrit(F,Q,&hilb,strat); /*NO CHANGES*/ 3427 3509 initBbaShift(strat); /* DONE */
Note: See TracChangeset
for help on using the changeset viewer.