Changeset 4eaf38d in git
- Timestamp:
- Apr 15, 2009, 4:36:10 PM (14 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 459b80a7e98c18294ff7b7baa6fa52186193fa9e
- Parents:
- 28e0e5582e2e5e2059a6cd427d901f66d7e9c4b3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gfan.cc
r28e0e55 r4eaf38d 2 2 Compute the Groebner fan of an ideal 3 3 $Author: monerjan $ 4 $Date: 2009-04-1 4 11:05:52$5 $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1.3 2 2009-04-14 11:05:52monerjan Exp $6 $Id: gfan.cc,v 1.3 2 2009-04-14 11:05:52monerjan Exp $4 $Date: 2009-04-15 14:36:10 $ 5 $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1.33 2009-04-15 14:36:10 monerjan Exp $ 6 $Id: gfan.cc,v 1.33 2009-04-15 14:36:10 monerjan Exp $ 7 7 */ 8 8 … … 161 161 * As a result of this procedure the pointer facetPtr points to the first facet of the cone. 162 162 */ 163 void getConeNormals( const ideal&I)163 void getConeNormals(ideal const &I) 164 164 { 165 165 #ifdef gfan_DEBUG … … 404 404 { 405 405 cout << "Parallel vector found, adding to initialFormElement" << endl; 406 initialFormElement[ii] = pAdd( initialFormElement[ii],(poly)pHead(aktpoly));406 initialFormElement[ii] = pAdd(pCopy(initialFormElement[ii]),(poly)pHead(aktpoly)); 407 407 } 408 408 }//while … … 413 413 initialForm->m[ii]=initialFormElement[ii]; 414 414 }//for 415 f->setFlipGB(initialForm); 415 f->setFlipGB(initialForm); //FIXME PROBABLY WRONG TO STORE HERE SINCE INA!=flibGB 416 416 #ifdef gfan_DEBUG 417 417 cout << "Initial ideal is: " << endl; … … 441 441 rComplete(dstRing); 442 442 rChangeCurrRing(dstRing); 443 //map theMap=(map)idMaxIdeal(1);443 444 444 rWrite(currRing); cout << endl; 445 445 ideal ina; … … 504 504 step2 = ppMult_qq(step1, I->m[ii-1]); 505 505 //cout << "TICK 3.2" << endl; 506 step3 = pSub(p , step2);506 step3 = pSub(pCopy(p), step2); 507 507 //p=pSub(p,pMult( pDivide(pHead(p),pHead(I->m[ii])), I->m[ii])); 508 508 //cout << "TICK 4" << endl; 509 pSetm(p); 509 //pSetm(p); 510 pSort(step3); //must be here, otherwise strange behaviour with many +o+o+o+o+ terms 510 511 p=step3; 511 512 pWrite(p); … … 520 521 { 521 522 //cout << "TICK 5" << endl; 522 r=pAdd( r,pHead(p));523 r=pAdd(pCopy(r),pHead(p)); 523 524 pSetm(r); 525 pSort(r); 524 526 cout << "r="; pWrite(r); cout << endl; 525 527 //cout << "TICK 6" << endl; 526 528 if (pLength(p)!=1) 527 529 { 528 p=pSub(p ,pHead(p)); //Here it may occur that p=0 instead of p=NULL530 p=pSub(pCopy(p),pHead(p)); //Here it may occur that p=0 instead of p=NULL 529 531 } 530 532 else … … 546 548 int size=IDELEMS(H); 547 549 ideal res=idInit(size,1); 550 poly temp1, temp2, temp3; //polys to temporarily store values for pSub 548 551 for (int ii=0;ii<size;ii++) 549 552 { 550 553 res->m[ii]=restOfDiv(H->m[ii],G); 551 //res->m[ii]=pSub(H->m[ii],res->m[ii]); //buggy 552 pSetm(res->m[ii]); 554 temp1=H->m[ii]; 555 temp2=res->m[ii]; 556 temp3=pSub(temp1, temp2); 557 res->m[ii]=temp3; 558 //res->m[ii]=pSub(temp1,temp2); //buggy 559 //pSort(res->m[ii]); 560 //pSetm(res->m[ii]); 553 561 cout << "res->m["<<ii<<"]=";pWrite(res->m[ii]); 554 562 }
Note: See TracChangeset
for help on using the changeset viewer.