Changeset 06abb07 in git for kernel/GBEngine
- Timestamp:
- Sep 19, 2016, 2:23:44 PM (8 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 59dca7d44c6d942796166db1c0ac9621d2a5ee39
- Parents:
- c4ead28a352d5f3846b80a454f239a0ef2b5af5a
- Location:
- kernel/GBEngine
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kInline.h
rc4ead28 r06abb07 1130 1130 if (!pLmShortDivisibleBy(p,p_sev, strat->S[*at], ~ strat->sevS[*at])) 1131 1131 return; 1132 if(!n_DivBy(pGetCoeff(strat->S[*at]), pGetCoeff(p), currRing ))1132 if(!n_DivBy(pGetCoeff(strat->S[*at]), pGetCoeff(p), currRing->cf)) 1133 1133 return; 1134 1134 } -
kernel/GBEngine/kspoly.cc
rc4ead28 r06abb07 97 97 { // just cancel the leading term 98 98 PR->LmDeleteAndIter(); 99 if (coef != NULL) *coef = n_Init(1, tailRing );99 if (coef != NULL) *coef = n_Init(1, tailRing->cf); 100 100 return 0; 101 101 } … … 123 123 124 124 // take care of coef buisness 125 if (! n_IsOne(pGetCoeff(p2), tailRing ))125 if (! n_IsOne(pGetCoeff(p2), tailRing->cf)) 126 126 { 127 127 number bn = pGetCoeff(lm); … … 132 132 PR->Tail_Mult_nn(an); 133 133 if (coef != NULL) *coef = an; 134 else n_Delete(&an, tailRing );134 else n_Delete(&an, tailRing->cf); 135 135 } 136 136 else 137 137 { 138 if (coef != NULL) *coef = n_Init(1, tailRing );138 if (coef != NULL) *coef = n_Init(1, tailRing->cf); 139 139 } 140 140 … … 303 303 { // just cancel the leading term 304 304 PR->LmDeleteAndIter(); 305 if (coef != NULL) *coef = n_Init(1, tailRing );305 if (coef != NULL) *coef = n_Init(1, tailRing->cf); 306 306 return 0; 307 307 } … … 329 329 330 330 // take care of coef buisness 331 if (! n_IsOne(pGetCoeff(p2), tailRing ))331 if (! n_IsOne(pGetCoeff(p2), tailRing->cf)) 332 332 { 333 333 number bn = pGetCoeff(lm); … … 338 338 PR->Tail_Mult_nn(an); 339 339 if (coef != NULL) *coef = an; 340 else n_Delete(&an, tailRing );340 else n_Delete(&an, tailRing->cf); 341 341 } 342 342 else 343 343 { 344 if (coef != NULL) *coef = n_Init(1, tailRing );344 if (coef != NULL) *coef = n_Init(1, tailRing->cf); 345 345 } 346 346 … … 553 553 { // just cancel the leading term 554 554 PR->LmDeleteAndIter(); 555 if (coef != NULL) *coef = n_Init(1, tailRing );555 if (coef != NULL) *coef = n_Init(1, tailRing->cf); 556 556 return 0; 557 557 } … … 581 581 { 582 582 p_SetCoeff(lm, nDiv(pGetCoeff(lm),pGetCoeff(p2)), tailRing); 583 if (coef != NULL) *coef = n_Init(1, tailRing );583 if (coef != NULL) *coef = n_Init(1, tailRing->cf); 584 584 } 585 585 else 586 586 { 587 if (! n_IsOne(pGetCoeff(p2), tailRing ))587 if (! n_IsOne(pGetCoeff(p2), tailRing->cf)) 588 588 { 589 589 number bn = pGetCoeff(lm); … … 594 594 PR->Tail_Mult_nn(an); 595 595 if (coef != NULL) *coef = an; 596 else n_Delete(&an, tailRing );597 } 598 else 599 { 600 if (coef != NULL) *coef = n_Init(1, tailRing );596 else n_Delete(&an, tailRing->cf); 597 } 598 else 599 { 600 if (coef != NULL) *coef = n_Init(1, tailRing->cf); 601 601 } 602 602 } … … 772 772 if (!ret) 773 773 { 774 if (! n_IsOne(coef, currRing ))774 if (! n_IsOne(coef, currRing->cf)) 775 775 { 776 776 pNext(Current) = NULL; … … 780 780 } 781 781 782 n_Delete(&coef, currRing );782 n_Delete(&coef, currRing->cf); 783 783 pNext(Current) = Red.GetLmTailRing(); 784 784 if (Current == PR->p && PR->t_p != NULL) -
kernel/GBEngine/kstd1.cc
rc4ead28 r06abb07 443 443 p_LmShortDivisibleBy(strat->T[i].GetLmTailRing(), strat->sevT[i], h->GetLmTailRing(), ~h->sev, strat->tailRing) 444 444 && 445 n_DivBy(h->p->coef,strat->T[i].p->coef,strat->tailRing ))445 n_DivBy(h->p->coef,strat->T[i].p->coef,strat->tailRing->cf)) 446 446 #else 447 447 j = kFindDivisibleByInT(strat, h, i); … … 859 859 #endif 860 860 if (p_LmShortDivisibleBy(strat->T[j].GetLmTailRing(), strat->sevT[j], H.GetLmTailRing(), not_sev, strat->tailRing) 861 && (n_DivBy(H.p->coef, strat->T[j].p->coef,strat->tailRing ))861 && (n_DivBy(H.p->coef, strat->T[j].p->coef,strat->tailRing->cf)) 862 862 ) 863 863 { … … 885 885 && (strat->T[j].length < li))) 886 886 && pLmShortDivisibleBy(strat->T[j].p,strat->sevT[j], H.p, not_sev) 887 && (n_DivBy(H.p->coef, strat->T[j].p->coef,strat->tailRing ))887 && (n_DivBy(H.p->coef, strat->T[j].p->coef,strat->tailRing->cf)) 888 888 ) 889 889 { -
kernel/GBEngine/kstd2.cc
rc4ead28 r06abb07 108 108 if (p_LmShortDivisibleBy(T[j].p, sevT[j],p, not_sev, r)) 109 109 { 110 if(n_DivBy(p _GetCoeff(p,r), p_GetCoeff(T[j].p,r), r))110 if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].p), r->cf)) 111 111 return j; 112 112 } … … 115 115 p_LmDivisibleBy(T[j].p, p, r)) 116 116 { 117 if(n_DivBy(p _GetCoeff(p,r), p_GetCoeff(T[j].p,r), r))117 if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].p), r->cf)) 118 118 return j; 119 119 } … … 156 156 p, not_sev, r)) 157 157 { 158 if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].t_p), r ))158 if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].t_p), r->cf)) 159 159 return j; 160 160 } … … 163 163 p_LmDivisibleBy(T[j].t_p, p, r)) 164 164 { 165 if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].t_p), r ))165 if(n_DivBy(pGetCoeff(p), pGetCoeff(T[j].t_p), r->cf)) 166 166 return j; 167 167 } … … 220 220 p, not_sev, currRing)) 221 221 { 222 if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing ))222 if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing->cf)) 223 223 return j; 224 224 } … … 227 227 p_LmDivisibleBy(strat->S[j], p, currRing)) 228 228 { 229 if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing ))229 if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing->cf)) 230 230 return j; 231 231 } … … 278 278 p, not_sev, currRing)) 279 279 { 280 if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing ))280 if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing->cf)) 281 281 return j; 282 282 } … … 285 285 p_LmDivisibleBy(strat->S[j], p, currRing)) 286 286 { 287 if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing ))287 if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing->cf)) 288 288 return j; 289 289 } -
kernel/GBEngine/kutil.cc
rc4ead28 r06abb07 4040 4040 for (i=strat->Bl; i>=0; i--) 4041 4041 { 4042 if (pDivisibleBy(strat->S[j],strat->B[i].lcm) && n_DivBy( strat->B[i].lcm->coef, strat->S[j]->coef,currRing))4042 if (pDivisibleBy(strat->S[j],strat->B[i].lcm) && n_DivBy(pGetCoeff(strat->B[i].lcm), pGetCoeff(strat->S[j]),currRing->cf)) 4043 4043 { 4044 4044 #ifdef KDEBUG … … 7138 7138 if (p_LmShortDivisibleBy(strat->syz[k], strat->sevSyz[k], sig, not_sevSig, currRing) 7139 7139 && (!rField_is_Ring(currRing) || 7140 (n_DivBy(pGetCoeff(sig), pGetCoeff(strat->syz[k]),currRing ) && pLtCmp(sig,strat->syz[k]) == 1)))7140 (n_DivBy(pGetCoeff(sig), pGetCoeff(strat->syz[k]),currRing->cf) && pLtCmp(sig,strat->syz[k]) == 1))) 7141 7141 { 7142 7142 //#if 1 … … 7195 7195 if (p_LmShortDivisibleBy(strat->syz[k], strat->sevSyz[k], sig, not_sevSig, currRing) 7196 7196 && (!rField_is_Ring(currRing) || 7197 (n_DivBy(pGetCoeff(sig), pGetCoeff(strat->syz[k]),currRing ) && pLtCmp(sig,strat->syz[k]) == 1)))7197 (n_DivBy(pGetCoeff(sig), pGetCoeff(strat->syz[k]),currRing->cf) && pLtCmp(sig,strat->syz[k]) == 1))) 7198 7198 { 7199 7199 #ifdef ADIDEBUG … … 7411 7411 #if defined(PDEBUG) || defined(PDIV_DEBUG) 7412 7412 if (strat->S[j]!= NULL && p_LmShortDivisibleBy(strat->S[j], sev[j], p, not_sev, r) && 7413 (ecart== LONG_MAX || ecart>= strat->ecartS[j]) && n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), r ))7413 (ecart== LONG_MAX || ecart>= strat->ecartS[j]) && n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), r->cf)) 7414 7414 { 7415 7415 break; … … 7418 7418 if (!(sev[j] & not_sev) && 7419 7419 (ecart== LONG_MAX || ecart>= strat->ecartS[j]) && 7420 p_LmDivisibleBy(strat->S[j], p, r) && n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), r ))7420 p_LmDivisibleBy(strat->S[j], p, r) && n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), r->cf)) 7421 7421 { 7422 7422 break; … … 7483 7483 assume(t != NULL && t->t_p != NULL && t->tailRing == r); 7484 7484 if (p_LmShortDivisibleBy(t->t_p, sev[j], p, not_sev, r) && 7485 (ecart== LONG_MAX || ecart>= strat->ecartS[j]) && n_DivBy(pGetCoeff(p), pGetCoeff(t->t_p), r ))7485 (ecart== LONG_MAX || ecart>= strat->ecartS[j]) && n_DivBy(pGetCoeff(p), pGetCoeff(t->t_p), r->cf)) 7486 7486 { 7487 7487 return t; … … 7492 7492 t = strat->S_2_T(j); 7493 7493 assume(t != NULL && t->t_p != NULL && t->tailRing == r && t->p == strat->S[j]); 7494 if (p_LmDivisibleBy(t->t_p, p, r) && n_DivBy(pGetCoeff(p), pGetCoeff(t->t_p), r ))7494 if (p_LmDivisibleBy(t->t_p, p, r) && n_DivBy(pGetCoeff(p), pGetCoeff(t->t_p), r->cf)) 7495 7495 { 7496 7496 return t; … … 9615 9615 #ifdef HAVE_RINGS 9616 9616 &&((!rField_is_Ring(currRing)) 9617 || (n_DivBy(pGetCoeff(strat->L[cc].sig),pGetCoeff(strat->syz[atT]),currRing ) && (pLtCmp(strat->L[cc].sig,strat->syz[atT])==1)))9617 || (n_DivBy(pGetCoeff(strat->L[cc].sig),pGetCoeff(strat->syz[atT]),currRing->cf) && (pLtCmp(strat->L[cc].sig,strat->syz[atT])==1))) 9618 9618 #endif 9619 9619 ) … … 10353 10353 &&(pLmDivisibleBy(Q->m[q],r->m[l]))) 10354 10354 { 10355 if(n_DivBy(r->m[l]->coef, Q->m[q]->coef, currRing ))10355 if(n_DivBy(r->m[l]->coef, Q->m[q]->coef, currRing->cf)) 10356 10356 { 10357 10357 if (TEST_OPT_REDSB) … … 10416 10416 for(q=IDELEMS(Q)-1; q>=0;q--) 10417 10417 { 10418 if(n_DivBy(r->m[l]->coef, Q->m[q]->coef, currRing ))10418 if(n_DivBy(r->m[l]->coef, Q->m[q]->coef, currRing->cf)) 10419 10419 { 10420 10420 if ((Q->m[q]!=NULL)&&(pLmEqual(Q->m[q],r->m[l])) && pDivisibleBy(Q->m[q],r->m[l])) … … 10453 10453 && (r->m[q]!=NULL) 10454 10454 &&(pLmDivisibleBy(r->m[l],r->m[q])) 10455 &&(n_DivBy(r->m[q]->coef, r->m[l]->coef, currRing ))10455 &&(n_DivBy(r->m[q]->coef, r->m[l]->coef, currRing->cf)) 10456 10456 ) 10457 10457 { 10458 10458 //If they are equal then take the one with the smallest length 10459 10459 if(pLmDivisibleBy(r->m[q],r->m[l]) 10460 && n_DivBy(r->m[q]->coef, r->m[l]->coef, currRing )10460 && n_DivBy(r->m[q]->coef, r->m[l]->coef, currRing->cf) 10461 10461 && (pLength(r->m[q]) < pLength(r->m[l]) || 10462 10462 (pLength(r->m[q]) == pLength(r->m[l]) && nGreaterZero(r->m[q]->coef)))) -
kernel/GBEngine/tgb.cc
rc4ead28 r06abb07 83 83 else 84 84 { 85 return n_Size (n, r );85 return n_Size (n, r->cf); 86 86 } 87 87 } … … 143 143 { 144 144 poly rc = p_Init_Special (r); 145 pSetCoeff0 (rc, n_Init (1, r ));145 pSetCoeff0 (rc, n_Init (1, r->cf)); 146 146 return rc; 147 147 } -
kernel/GBEngine/tgbgauss.cc
rc4ead28 r06abb07 510 510 { 511 511 StringSetS(""); 512 n_Write(n[i][j],currRing );512 n_Write(n[i][j],currRing->cf); 513 513 char *s=StringEndS(); 514 514 PrintS(s); … … 711 711 StringSetS(""); 712 712 number n=get(i,j); 713 n_Write(n,currRing );713 n_Write(n,currRing->cf); 714 714 char *s=StringEndS(); 715 715 PrintS(s); … … 842 842 if (currRing==r) {nTest(m->coef);} 843 843 #endif 844 n_Normalize(m->coef,r );844 n_Normalize(m->coef,r->cf); 845 845 m=m->next; 846 846 }
Note: See TracChangeset
for help on using the changeset viewer.