Changeset b94a72 in git for kernel/GBEngine/kstd2.cc
- Timestamp:
- Apr 24, 2020, 6:38:31 PM (4 years ago)
- Branches:
- (u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
- Children:
- 8e903f23324de1e4ec1dc9926b6de0a16de605d6
- Parents:
- 5f544e3856e15c729d9cd4aeb0a80d2c613f4be2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kstd2.cc
r5f544e rb94a72 105 105 { 106 106 gcd = n_Gcd(pGetCoeff(p), pGetCoeff(T[j].p), r->cf); 107 if (o == -1 || 108 n_Greater(n_EucNorm(ogcd, r->cf), n_EucNorm(gcd, r->cf), r->cf) == TRUE) { 107 if (o == -1 108 || n_Greater(n_EucNorm(ogcd, r->cf), n_EucNorm(gcd, r->cf), r->cf)) 109 { 109 110 ogcd = gcd; 110 111 o = j; … … 125 126 { 126 127 gcd = n_Gcd(pGetCoeff(p), pGetCoeff(T[j].p), r->cf); 127 if (o == -1 || 128 n_Greater(n_EucNorm(ogcd, r->cf), n_EucNorm(gcd, r->cf), r->cf) == TRUE) { 128 if (o == -1 129 || n_Greater(n_EucNorm(ogcd, r->cf), n_EucNorm(gcd, r->cf), r->cf)) 130 { 129 131 ogcd = gcd; 130 132 o = j; … … 157 159 { 158 160 mult= n_QuotRem(pGetCoeff(p), pGetCoeff(T0p), &rest, r->cf); 159 if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf) == TRUE) { 161 if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf)) 162 { 160 163 return 0; 161 164 } … … 165 168 { 166 169 mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T0p), &rest, r->cf); 167 if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf) == TRUE) { 170 if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf)) 171 { 168 172 return 0; 169 173 } … … 182 186 { 183 187 mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T0p), &rest, r->cf); 184 if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf) == TRUE) { 188 if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf)) 189 { 185 190 return 0; 186 191 } … … 190 195 { 191 196 mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T0p), &rest, r->cf); 192 if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf) == TRUE) { 197 if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf)) 198 { 193 199 return 0; 194 200 } … … 223 229 { 224 230 mult= n_QuotRem(pGetCoeff(p), pGetCoeff(T[j].p), &rest, r->cf); 225 if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf) == TRUE) { 231 if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf)) 232 { 226 233 o = j; 227 234 orest = rest; … … 232 239 { 233 240 mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T[j].p), &rest, r->cf); 234 if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf) == TRUE) { 241 if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf)) 242 { 235 243 o = j; 236 244 orest = rest; … … 254 262 { 255 263 mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T[j].t_p), &rest, r->cf); 256 if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf) == TRUE) { 264 if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf)) 265 { 257 266 o = j; 258 267 orest = rest; … … 263 272 { 264 273 mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T[j].t_p), &rest, r->cf); 265 if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf) == TRUE) { 274 if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf)) 275 { 266 276 o = j; 267 277 orest = rest; … … 648 658 /* check if a reducer of the lead term exists */ 649 659 j = kFindDivisibleByInT(strat, h); 650 if (j < 0) { 660 if (j < 0) 661 { 651 662 /* check if a reducer with the same lead monomial exists */ 652 663 j = kFindSameLMInT_Z(strat, h); 653 if (j < 0) { 664 if (j < 0) 665 { 654 666 /* check if a reducer of the lead monomial exists, by the above 655 667 * check this is a real divisor of the lead monomial */ … … 683 695 } 684 696 } 685 686 697 else 698 { 687 699 /* not(lc(reducer) | lc(poly)) && not(lc(poly) | lc(reducer)) 688 700 * => we try to cut down the lead coefficient at least */ … … 713 725 ksReducePolyZ(h, &(strat->T[j]), NULL, NULL, strat); 714 726 ksReducePolyGCD(&h2, &(strat->T[j]), NULL, NULL, strat); 715 if (!rHasLocalOrMixedOrdering(currRing)) { 727 if (!rHasLocalOrMixedOrdering(currRing)) 728 { 716 729 redtailBbaAlsoLC_Z(&h2, j, strat); 717 730 h2.pCleardenom(); … … 4350 4363 /* shiftgb stuff */ 4351 4364 #ifdef HAVE_SHIFTBBA 4352 4353 4354 4365 ideal bbaShift(ideal F, ideal Q,intvec *w,intvec *hilb,kStrategy strat) 4355 4366 { … … 4508 4519 // therefore we call pCleardenom instead of pNorm 4509 4520 strat->redTailChange=FALSE; 4510 4521 4511 4522 /* if we are computing over Z we always want to try and cut down 4512 4523 * the coefficients in the tail terms */ 4513 if (rField_is_Z(currRing) && !rHasLocalOrMixedOrdering(currRing)) { 4524 if (rField_is_Z(currRing) && !rHasLocalOrMixedOrdering(currRing)) 4525 { 4514 4526 redtailBbaAlsoLC_Z(&(strat->P), strat->tl, strat); 4515 4527 strat->P.pCleardenom(); … … 4630 4642 if (pLmShortDivisibleBy(strat->T[j].p, strat->sevT[j], strat->S[k], ~strat->sevS[k])) 4631 4643 { 4632 if (pLmCmp(strat->T[j].p, strat->S[k]) != 0) { // check whether LM is different 4644 if (pLmCmp(strat->T[j].p, strat->S[k]) != 0) 4645 { // check whether LM is different 4633 4646 deleteInS(k, strat); 4634 4647 --k; … … 4710 4723 return (strat->Shdl); 4711 4724 } 4725 #endif 4712 4726 4713 4727 #ifdef HAVE_SHIFTBBA … … 4727 4741 * element in t with respect to the given pDivisibleBy 4728 4742 */ 4743 #ifdef HAVE_SHIFTBBA 4729 4744 int redFirstShift (LObject* h,kStrategy strat) 4730 4745 {
Note: See TracChangeset
for help on using the changeset viewer.