- Timestamp:
- Sep 25, 2021, 3:12:28 PM (3 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 3586d91e2c2266ac9093d8f200ff040122e65211
- Parents:
- a178ae5229393bf22d9dd493679de1c14137e994
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2021-09-25 15:12:28+02:00
- git-committer:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2021-09-25 15:17:38+02:00
- Location:
- kernel/GBEngine
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kspoly.cc
ra178ae r1adb76 514 514 515 515 p_ExpVectorSub(lm, p2, tailRing); // Calculate the Monomial we must multiply to p2 516 p_SetCoeff(lm, n_Init(1, tailRing ), tailRing);516 p_SetCoeff(lm, n_Init(1, tailRing->cf), tailRing); 517 517 while (PW->max_exp != NULL && !p_LmExpVectorAddIsOk(lm, PW->max_exp, tailRing)) 518 518 { … … 629 629 { // just cancel the leading term 630 630 PR->LmDeleteAndIter(); 631 if (coef != NULL) *coef = n_Init(1, tailRing );631 if (coef != NULL) *coef = n_Init(1, tailRing->cf); 632 632 return 0; 633 633 } … … 665 665 666 666 // take care of coef buisness 667 if (! n_IsOne(pGetCoeff(p2), tailRing ))667 if (! n_IsOne(pGetCoeff(p2), tailRing->cf)) 668 668 { 669 669 number bn = pGetCoeff(lm); … … 674 674 PR->Tail_Mult_nn(an); 675 675 if (coef != NULL) *coef = an; 676 else n_Delete(&an, tailRing );676 else n_Delete(&an, tailRing->cf); 677 677 } 678 678 else 679 679 { 680 if (coef != NULL) *coef = n_Init(1, tailRing );680 if (coef != NULL) *coef = n_Init(1, tailRing->cf); 681 681 } 682 682 … … 1386 1386 if (!ret) 1387 1387 { 1388 if (! n_IsOne(coef, currRing ))1388 if (! n_IsOne(coef, currRing->cf)) 1389 1389 { 1390 1390 pNext(Current) = NULL; … … 1394 1394 } 1395 1395 1396 n_Delete(&coef, currRing );1396 n_Delete(&coef, currRing->cf); 1397 1397 pNext(Current) = Red.GetLmTailRing(); 1398 1398 if (Current == PR->p && PR->t_p != NULL) -
kernel/GBEngine/kstd2.cc
ra178ae r1adb76 159 159 { 160 160 mult= n_QuotRem(pGetCoeff(p), pGetCoeff(T0p), &rest, r->cf); 161 if (!n_IsZero(mult, r ) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))161 if (!n_IsZero(mult, r->cf) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf)) 162 162 { 163 163 return 0; … … 168 168 { 169 169 mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T0p), &rest, r->cf); 170 if (!n_IsZero(mult, r ) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))170 if (!n_IsZero(mult, r->cf) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf)) 171 171 { 172 172 return 0; … … 186 186 { 187 187 mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T0p), &rest, r->cf); 188 if (!n_IsZero(mult, r ) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))188 if (!n_IsZero(mult, r->cf) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf)) 189 189 { 190 190 return 0; … … 195 195 { 196 196 mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T0p), &rest, r->cf); 197 if (!n_IsZero(mult, r ) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))197 if (!n_IsZero(mult, r->cf) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf)) 198 198 { 199 199 return 0; … … 229 229 { 230 230 mult= n_QuotRem(pGetCoeff(p), pGetCoeff(T[j].p), &rest, r->cf); 231 if (!n_IsZero(mult, r ) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))231 if (!n_IsZero(mult, r->cf) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf)) 232 232 { 233 233 o = j; … … 239 239 { 240 240 mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T[j].p), &rest, r->cf); 241 if (!n_IsZero(mult, r ) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))241 if (!n_IsZero(mult, r->cf) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf)) 242 242 { 243 243 o = j; … … 262 262 { 263 263 mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T[j].t_p), &rest, r->cf); 264 if (!n_IsZero(mult, r ) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))264 if (!n_IsZero(mult, r->cf) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf)) 265 265 { 266 266 o = j; … … 272 272 { 273 273 mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T[j].t_p), &rest, r->cf); 274 if (!n_IsZero(mult, r ) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))274 if (!n_IsZero(mult, r->cf) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf)) 275 275 { 276 276 o = j; -
kernel/GBEngine/syz4.cc
ra178ae r1adb76 141 141 p_SetComp(q, v[i].comp, r); 142 142 p_Setm(q, r); 143 number n = n_Div(p_GetCoeff(multiplier, r), p_GetCoeff(v[i].lt, r), r );144 n_InpMult(n, p_GetCoeff(t, r), r );145 p_SetCoeff0(q, n_InpNeg(n, r ), r);143 number n = n_Div(p_GetCoeff(multiplier, r), p_GetCoeff(v[i].lt, r), r->cf); 144 n_InpMult(n, p_GetCoeff(t, r), r->cf); 145 p_SetCoeff0(q, n_InpNeg(n, r->cf), r); 146 146 return q; 147 147 } … … 267 267 const ring r = currRing; 268 268 poly p = p_Copy(itr->second, r); 269 if (LIKELY(!n_Equal(pGetCoeff(multiplier), pGetCoeff(itr->first), r )))270 { 271 number n = n_Div(pGetCoeff(multiplier), pGetCoeff(itr->first), r );269 if (LIKELY(!n_Equal(pGetCoeff(multiplier), pGetCoeff(itr->first), r->cf))) 270 { 271 number n = n_Div(pGetCoeff(multiplier), pGetCoeff(itr->first), r->cf); 272 272 p = p_Mult_nn(p, n, r); 273 n_Delete(&n, r );273 n_Delete(&n, r->cf); 274 274 } 275 275 return p;
Note: See TracChangeset
for help on using the changeset viewer.