Changeset 0091f5 in git
- Timestamp:
- Jan 18, 2017, 4:07:25 PM (7 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- 1082b92ca9710fddf763537ffbccb6abed6ab98e
- Parents:
- 72e8c16151daf886c929fa07bdc27e451c807ccf
- Location:
- kernel/GBEngine
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kstd2.cc
r72e8c1 r0091f5 454 454 // over ZZ: cleanup coefficients by complete reduction with monomials 455 455 postReduceByMon(h, strat); 456 if(h->p == NULL) 457 { 458 if (h->lcm!=NULL) pLmDelete(h->lcm); 459 h->Clear(); 460 return 0; 461 } 456 462 if(nIsZero(pGetCoeff(h->p))) return 2; 457 463 j = kFindDivisibleByInT(strat, h); … … 2298 2304 if (!errorreported) 2299 2305 { 2300 if(nCoeff_is_Ring_Z(currRing->cf)) 2306 if(rField_is_Ring_Z(currRing)) 2307 { 2308 for(int i = 0;i<=strat->sl;i++) 2309 { 2310 if(!nGreaterZero(pGetCoeff(strat->S[i]))) 2311 { 2312 strat->S[i] = pNeg(strat->S[i]); 2313 } 2314 } 2301 2315 finalReduceByMon(strat); 2302 if(rField_is_Ring(currRing))2303 {2304 2316 for(int i = 0;i<=strat->sl;i++) 2305 2317 { … … 2310 2322 } 2311 2323 } 2324 else if (rField_is_Ring(currRing)) 2325 finalReduceByMon(strat); 2312 2326 } 2313 2327 /* release temp data-------------------------------- */ -
kernel/GBEngine/kutil.cc
r72e8c1 r0091f5 1431 1431 { 1432 1432 pLmDelete(h.lcm); 1433 1433 h.lcm=NULL; 1434 1434 } 1435 1435 h.Clear(); … … 11071 11071 } 11072 11072 } 11073 pp = pNext(p); 11074 while(pp != NULL) 11075 { 11076 if(pLmDivisibleBy(strat->S[i], pp)) 11077 { 11078 number dummy = n_IntMod(pp->coef, strat->S[i]->coef, currRing->cf); 11079 p_SetCoeff(pp,dummy,currRing); 11080 if(nIsZero(pp->coef)) 11073 if (p!=NULL) 11074 { 11075 pp = pNext(p); 11076 while(pp != NULL) 11077 { 11078 if(pLmDivisibleBy(strat->S[i], pp)) 11081 11079 { 11082 pLmDelete(&pNext(p)); 11083 pp = pNext(p); 11084 deleted = TRUE; 11080 number dummy = n_IntMod(pp->coef, strat->S[i]->coef, currRing->cf); 11081 p_SetCoeff(pp,dummy,currRing); 11082 if(nIsZero(pp->coef)) 11083 { 11084 pLmDelete(&pNext(p)); 11085 pp = pNext(p); 11086 deleted = TRUE; 11087 } 11088 else 11089 { 11090 p = pp; 11091 pp = pNext(p); 11092 } 11085 11093 } 11086 11094 else … … 11090 11098 } 11091 11099 } 11092 else11093 {11094 p = pp;11095 pp = pNext(p);11096 }11097 11100 } 11098 11101 } 11099 11102 } 11100 11103 h->SetLmCurrRing(); 11101 if( deleted)11104 if((deleted)&&(h->p!=NULL)) 11102 11105 strat->initEcart(h); 11103 11106 }
Note: See TracChangeset
for help on using the changeset viewer.