Changeset f07b38c in git
- Timestamp:
- Nov 23, 2009, 3:15:52 PM (14 years ago)
- Branches:
- (u'spielwiese', '5d369c3cbad1a1bf2d5c856a48fb8a30b51cec3b')
- Children:
- d945f30c526b2f3c4c937f5acb82e282284898d9
- Parents:
- cef1fb8a6b684adbc201e50f3ee51a42e97ee1f6
- Location:
- kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gfan.cc
rcef1fb rf07b38c 64 64 65 65 #ifndef gfan_DEBUG 66 // #define gfan_DEBUG66 // #define gfan_DEBUG 1 67 67 #ifndef gfan_DEBUGLEVEL 68 68 #define gfan_DEBUGLEVEL 1 … … 377 377 // if (this->rootRing!=NULL && this->rootRing!=(ip_sring *)0xfefefefefefefefe) 378 378 // rDelete(this->rootRing); 379 //rDelete(this->baseRing); 379 // if(this->UCN!=1) 380 // rDelete(this->baseRing); 380 381 facet *fAct; 381 382 facet *fDel; … … 389 390 delete fDel; 390 391 } 392 this->counter--; 393 dd_FreeMatrix(this->ddFacets); 391 394 //dd_FreeMatrix(this->ddFacets); 392 395 } … … 447 450 448 451 /** For debugging purposes only */ 449 vo id gcone::showSLA(facet &f)452 volatile void gcone::showSLA(facet &f) 450 453 { 451 454 facet *fAct; … … 952 955 fNormal = f->getFacetNormal(); //read this->fNormal; 953 956 954 std::cout << "running gcone::flip" << std::endl;955 std::cout << "flipping UCN " << this->getUCN() << endl;956 cout << "over facet (";957 fNormal->show(1,0);958 cout << ") with UCN " << f->getUCN();959 std::cout << std::endl;957 // std::cout << "running gcone::flip" << std::endl; 958 // std::cout << "flipping UCN " << this->getUCN() << endl; 959 // cout << "over facet ("; 960 // fNormal->show(1,0); 961 // cout << ") with UCN " << f->getUCN(); 962 // std::cout << std::endl; 960 963 961 964 /*1st step: Compute the initial ideal*/ … … 1216 1219 f->flipRing=rCopy(dstRing); //store the ring on the other side 1217 1220 //#ifdef gfan_DEBUG 1218 cout << "Flipped GB is UCN " << counter+1 << ":" << endl;1221 // cout << "Flipped GB is UCN " << counter+1 << ":" << endl; 1219 1222 // this->idDebugPrint(dstRing_I); 1220 1223 // cout << endl; … … 1723 1726 gcTmp->showFacets(1); 1724 1727 #endif 1728 /*add facets to SLA here*/ 1729 SearchListRoot=gcTmp->enqueueNewFacets(*SearchListRoot); 1730 1725 1731 if(gfanHeuristic==1) 1726 1732 { 1727 1733 gcTmp->writeConeToFile(*gcTmp); 1734 // idDelete((ideal*)&gcTmp->gcBasis); 1735 for(int ii=0;ii<IDELEMS(gcTmp->gcBasis);ii++) 1736 { 1737 gcTmp->gcBasis->m[ii]=(poly)NULL; 1738 } 1728 1739 } 1729 /*add facets to SLA here*/ 1730 SearchListRoot=gcTmp->enqueueNewFacets(*SearchListRoot); 1731 #ifdef gfan_DEBUG 1740 1741 #if gfan_DEBUG 1732 1742 if(SearchListRoot!=NULL) 1733 1743 gcTmp->showSLA(*SearchListRoot); … … 1766 1776 { 1767 1777 deleteMarker = gcHead; 1768 gcHead = gcNext->next;1778 // gcHead = gcNext->next; 1769 1779 //gcNext->next->prev = NULL; 1770 1780 } … … 1772 1782 { 1773 1783 deleteMarker = gcNext; 1774 gcNext->prev->next = gcNext->next;1775 gcNext->next->prev = gcNext->prev;1784 // gcNext->prev->next = gcNext->next; 1785 // gcNext->next->prev = gcNext->prev; 1776 1786 } 1777 1787 // gcNext = gcNext->next; … … 1794 1804 gcAct = gcNext; 1795 1805 //implant the GB into gcAct 1796 readConeFromFile(gc Next->getUCN(), gcAct);1806 readConeFromFile(gcAct->getUCN(), gcAct); 1797 1807 rAct=rCopy(gcAct->baseRing); 1798 1808 rComplete(rAct); … … 2453 2463 while(!line.empty()) 2454 2464 { 2465 // resPoly=pInit(); 2466 // strPoly=pInit(); 2455 2467 hasNegCoeff = FALSE; 2468 hasCoeffInQ = FALSE; 2456 2469 found = line.find_first_of("+-"); //get the first monomial 2457 2470 string tmp; … … 2473 2486 hasCoeffInQ = TRUE; 2474 2487 strCoeffNom=strMonom.substr(0,found); 2475 strCoeffDenom=strMonom.substr(found+1,strMonom.find_first_not_of("1234567890" ));2488 strCoeffDenom=strMonom.substr(found+1,strMonom.find_first_not_of("1234567890",found+1)); 2476 2489 strMonom.erase(0,found); 2477 2490 strMonom.erase(0,strMonom.find_first_not_of("1234567890/")); … … 2541 2554 }//while(!line.empty()) 2542 2555 2543 gc Basis->m[jj]=pCopy(resPoly);2556 gc->gcBasis->m[jj]=pCopy(resPoly); 2544 2557 resPoly=NULL; //reset 2545 2558 } … … 2586 2599 l->m[0].data=(void*)gcAct->getUCN(); 2587 2600 l->m[1].rtyp=IDEAL_CMD; 2601 /*The following is necessary for leaves in the tree of cones 2602 * Since we don't use them in the computation and gcBasis is 2603 * set to (poly)NULL in noRevS we need to get this back here. 2604 */ 2605 if(gcAct->gcBasis->m[0]==(poly)NULL) 2606 gcAct->readConeFromFile(gcAct->getUCN(),gcAct); 2588 2607 l->m[1].data=(void*)idrCopyR_NoSort(gcAct->gcBasis,gcAct->getBaseRing()); 2589 2608 2590 2609 l->m[2].rtyp=INTVEC_CMD; 2591 2610 intvec iv=(gcAct->f2M(gcAct,gcAct->facetPtr)); … … 2717 2736 res = inputIdeal; 2718 2737 lResList=lprepareResult(gcRoot,gcRoot->getCounter()); 2719 // res=lResList; 2738 /*Cleanup*/ 2739 gcone *gcDel; 2740 gcDel = gcRoot; 2741 gcAct = gcRoot; 2742 do 2743 { 2744 gcDel = gcAct; 2745 gcAct = gcAct->next; 2746 delete gcDel; 2747 }while(gcAct!=NULL); 2720 2748 } 2721 2749 dd_free_global_constants(); … … 2730 2758 } 2731 2759 2760 /*Return result*/ 2732 2761 return lResList; 2733 2762 } -
kernel/gfan.h
rcef1fb rf07b38c 165 165 int getPredUCN(); 166 166 void showFacets(short codim=1); 167 vo id showSLA(facet &f);167 volatile void showSLA(facet &f); 168 168 void idDebugPrint(ideal const &I); 169 169 void invPrint(ideal const &I);
Note: See TracChangeset
for help on using the changeset viewer.