Changeset 879e4c in git
- Timestamp:
- Oct 15, 2015, 3:47:11 PM (8 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- 2d265b2596f3ebb9c7b09c216ebe2faa2638f2d5
- Parents:
- 5fd2b1e537aec892b174f98c27dc1c56397fcba2
- Location:
- kernel/GBEngine
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kstd1.cc
r5fd2b1e r879e4c 415 415 // over ZZ: cleanup coefficients by complete reduction with monomials 416 416 postReduceByMon(h, strat); 417 if(nIsZero(pGetCoeff(h->p)) || h->p == NULL) return 2; 417 if(h->p == NULL) 418 { 419 if (h->lcm!=NULL) pLmDelete(h->lcm); 420 h->Clear(); 421 return 0; 422 } 418 423 if(strat->tl >= 0) 419 424 h->i_r1 = strat->tl; … … 1200 1205 if (pLmCmp(strat->L[i].p,strat->kNoether) == -1) 1201 1206 { 1202 pLmFree(strat->L[i].p); 1207 #ifdef HAVE_RINGS 1208 if (rField_is_Ring(currRing)) 1209 pLmDelete(strat->L[i].p); 1210 else 1211 #endif 1212 pLmFree(strat->L[i].p); 1203 1213 strat->L[i].p = NULL; 1204 1214 } 1205 1215 else 1206 1216 { 1207 pLmFree(strat->L[i].p); 1217 #ifdef HAVE_RINGS 1218 if (rField_is_Ring(currRing)) 1219 pLmDelete(strat->L[i].p); 1220 else 1221 #endif 1222 pLmFree(strat->L[i].p); 1208 1223 strat->L[i].p = NULL; 1209 1224 poly m1 = NULL, m2 = NULL; -
kernel/GBEngine/kutil.cc
r5fd2b1e r879e4c 375 375 pSetCoeff(L->p,eins); 376 376 if (L->t_p != NULL) 377 pSetCoeff 0(L->t_p,eins);377 pSetCoeff(L->t_p,eins); 378 378 } 379 379 else … … 1397 1397 } 1398 1398 #else 1399 assume(i<=strat->sl);1400 1399 assume(atR >= 0); 1401 1400 assume(i<=strat->sl); 1401 assume(p!=NULL); 1402 1402 int l,j,compare,compareCoeff; 1403 1403 LObject h; … … 1544 1544 #endif 1545 1545 number s, t; 1546 poly m1, m2, gcd ;1546 poly m1, m2, gcd = NULL; 1547 1547 #if ADIDEBUG 1548 1548 printf("\nTrying to add spair S[%i] und p\n",i);pWrite(strat->S[i]);pWrite(p); … … 1554 1554 pSetCoeff0(m1, s); 1555 1555 pSetCoeff0(m2, t); 1556 pNeg(m2);1556 m2 = pNeg(m2); 1557 1557 p_Test(m1,strat->tailRing); 1558 1558 p_Test(m2,strat->tailRing); … … 1563 1563 if(sim2 == NULL) 1564 1564 { 1565 pDelete(&m1); 1566 pDelete(&m2); 1565 1567 if(pm1 == NULL) 1566 1568 { 1567 //pDelete(&sim2);1568 //pDelete(&pm1);1569 //pDelete(&gcd);1570 //pDelete(&m1);1571 //pDelete(&m2);1572 1569 return; 1573 1570 } 1574 1571 else 1575 1572 { 1576 gcd = pCopy(pm1); 1577 pDelete(&pm1); 1578 pDelete(&sim2); 1579 pDelete(&m1); 1580 pDelete(&m2); 1573 gcd = pm1; 1574 pm1 = NULL; 1581 1575 } 1582 1576 } … … 2371 2365 pDelete(&pSigMult); 2372 2366 pDelete(&sSigMult); 2373 pLmFree(Lp.lcm); 2367 #ifdef HAVE_RINGS 2368 if (rField_is_Ring(currRing)) 2369 pLmDelete(Lp.lcm); 2370 else 2371 #endif 2372 pLmFree(Lp.lcm); 2374 2373 Lp.lcm=NULL; 2375 2374 pDelete (&m1); … … 2387 2386 pDelete(&pSigMult); 2388 2387 pDelete(&sSigMult); 2389 pLmFree(Lp.lcm); 2388 #ifdef HAVE_RINGS 2389 if (rField_is_Ring(currRing)) 2390 pLmDelete(Lp.lcm); 2391 else 2392 #endif 2393 pLmFree(Lp.lcm); 2390 2394 Lp.lcm=NULL; 2391 2395 pDelete (&m1); … … 9100 9104 return TRUE; 9101 9105 } 9102 pLmFree(newNoether); 9106 #ifdef HAVE_RINGS 9107 if (rField_is_Ring(currRing)) 9108 pLmDelete(newNoether); 9109 else 9110 #endif 9111 pLmFree(newNoether); 9103 9112 return FALSE; 9104 9113 } … … 9359 9368 if(pLmDivisibleBy(strat->S[i], p)) 9360 9369 { 9361 p->coef = currRing->cf->cfIntMod(p->coef, strat->S[i]->coef, currRing->cf); 9370 number dummy = n_IntMod(p->coef, strat->S[i]->coef, currRing->cf); 9371 p_SetCoeff(p,dummy,currRing); 9362 9372 } 9363 9373 if(nIsZero(p->coef)) 9364 9374 { 9365 pLmDelete(&p Next(p));9375 pLmDelete(&p); 9366 9376 deleted = TRUE; 9367 9377 } … … 9376 9386 if(pLmDivisibleBy(strat->S[i], pp)) 9377 9387 { 9378 pp->coef = currRing->cf->cfIntMod(pp->coef, strat->S[i]->coef, currRing->cf); 9388 number dummy = n_IntMod(pp->coef, strat->S[i]->coef, currRing->cf); 9389 p_SetCoeff(pp,dummy,currRing); 9379 9390 if(nIsZero(pp->coef)) 9380 9391 { … … 9423 9434 if(pLmDivisibleBy(strat->S[j], p)) 9424 9435 { 9425 //nDelete(&(p->coef));9426 p ->coef = currRing->cf->cfIntMod(p->coef, strat->S[j]->coef, currRing->cf);9436 number dummy = n_IntMod(p->coef, strat->S[j]->coef, currRing->cf); 9437 p_SetCoeff(p,dummy,currRing); 9427 9438 } 9428 9439 pp = pNext(p); … … 9437 9448 if(pLmDivisibleBy(strat->S[j], pp)) 9438 9449 { 9439 //nDelete(&(pp->coef));9440 p p->coef = currRing->cf->cfIntMod(pp->coef, strat->S[j]->coef, currRing->cf);9450 number dummy = n_IntMod(pp->coef, strat->S[j]->coef, currRing->cf); 9451 p_SetCoeff(pp,dummy,currRing); 9441 9452 if(nIsZero(pp->coef)) 9442 9453 {
Note: See TracChangeset
for help on using the changeset viewer.