Changeset f4a2f42 in git
- Timestamp:
- May 8, 2009, 2:58:01 PM (15 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- a2e297661483537b015225dc3602180d4df607c7
- Parents:
- eaa679265a6d72561ceafe956d9fe10d64554d89
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gfan.cc
reaa679 rf4a2f42 2 2 Compute the Groebner fan of an ideal 3 3 $Author: monerjan $ 4 $Date: 2009-05-0 7 09:55:48$5 $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1.4 7 2009-05-07 09:55:48monerjan Exp $6 $Id: gfan.cc,v 1.4 7 2009-05-07 09:55:48monerjan Exp $4 $Date: 2009-05-08 12:58:01 $ 5 $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1.48 2009-05-08 12:58:01 monerjan Exp $ 6 $Id: gfan.cc,v 1.48 2009-05-08 12:58:01 monerjan Exp $ 7 7 */ 8 8 … … 242 242 (*ivtmp)[ii]=-(*ivtmp)[ii]; 243 243 } 244 //ivtmp->show(); cout << endl; 245 fAct->setFacetNormal(ivtmp); 246 //fAct->printNormal();cout << endl; 247 //ivtmp->show();cout << endl; 244 245 fAct->setFacetNormal(ivtmp); 248 246 } 249 247 … … 513 511 std::cout << "===" << std::endl; 514 512 std::cout << "running gcone::flip" << std::endl; 515 std::cout << "fNormal=";516 fNormal->show();517 std::cout << std::endl;513 // std::cout << "fNormal="; 514 // fNormal->show(); 515 // std::cout << std::endl; 518 516 #endif 519 517 /*1st step: Compute the initial ideal*/ … … 544 542 } 545 543 #ifdef gfan_DEBUG 546 cout << "check=";547 check->show();548 cout << endl;544 // cout << "check="; 545 // check->show(); 546 // cout << endl; 549 547 #endif 550 548 //TODO why not *check, *fNormal???? 551 549 if (isParallel(*check,*fNormal)) //pass *check when 552 550 { 553 cout << "Parallel vector found, adding to initialFormElement" << endl;551 // cout << "Parallel vector found, adding to initialFormElement" << endl; 554 552 initialFormElement[ii] = pAdd(pCopy(initialFormElement[ii]),(poly)pHead(aktpoly)); 555 553 } … … 583 581 rChangeCurrRing(tmpRing); 584 582 585 rWrite(currRing); cout << endl;583 //rWrite(currRing); cout << endl; 586 584 587 585 ideal ina; … … 595 593 idSkipZeroes(H); 596 594 #ifdef gfan_DEBUG 597 cout << "H="; idShow(H); cout << endl;595 // cout << "H="; idShow(H); cout << endl; 598 596 #endif 599 597 /*Substep 2.2 … … 605 603 srcRing_H=idrCopyR(H,tmpRing); 606 604 #ifdef gfan_DEBUG 607 cout << "srcRing_H = ";608 idShow(srcRing_H); cout << endl;605 // cout << "srcRing_H = "; 606 // idShow(srcRing_H); cout << endl; 609 607 #endif 610 608 srcRing_HH=ffG(srcRing_H,this->gcBasis); 611 609 #ifdef gfan_DEBUG 612 cout << "srcRing_HH = ";613 idShow(srcRing_HH); cout << endl;610 // cout << "srcRing_HH = "; 611 // idShow(srcRing_HH); cout << endl; 614 612 #endif 615 613 /*Substep 2.2.1 … … 770 768 //validOpts<1>=TRUE; 771 769 #ifdef gfan_DEBUG 772 idShow(dstRing_I);770 //idShow(dstRing_I); 773 771 #endif 774 772 BITSET save=test; … … 800 798 cout << "Entering restOfDiv" << endl; 801 799 poly p=f; 802 pWrite(p);800 //pWrite(p); 803 801 //poly r=kCreateZeroPoly(,currRing,currRing); //The 0-polynomial, hopefully 804 802 poly r=NULL; //The zero polynomial … … 825 823 pSort(step3); //must be here, otherwise strange behaviour with many +o+o+o+o+ terms 826 824 p=step3; 827 pWrite(p);825 //pWrite(p); 828 826 divOccured=TRUE; 829 827 } … … 875 873 //pSort(res->m[ii]); 876 874 //pSetm(res->m[ii]); 877 cout << "res->m["<<ii<<"]=";pWrite(res->m[ii]);875 //cout << "res->m["<<ii<<"]=";pWrite(res->m[ii]); 878 876 } 879 877 return res; … … 936 934 lhs=dotProduct(a,b)*dotProduct(a,b); 937 935 rhs=dotProduct(a,a)*dotProduct(b,b); 938 cout << "LHS="<<lhs<<", RHS="<<rhs<<endl;936 //cout << "LHS="<<lhs<<", RHS="<<rhs<<endl; 939 937 if (lhs==rhs) 940 938 { … … 1102 1100 * If this is the case, then our facet is indeed a search facet and TRUE is retuned. 1103 1101 */ 1104 bool isSearchFacet(gcone &gcTmp, facet &testfacet)1102 bool isSearchFacet(gcone &gcTmp, facet *testfacet) 1105 1103 { 1106 1104 ring actRing=currRing; … … 1164 1162 fMin=fCmp; 1165 1163 fAct=fMin; 1164 fCmp=fCmp->next; 1166 1165 } 1167 1166 else … … 1182 1181 1183 1182 /*If testfacet was minimal then fMin should still point there */ 1184 //NOTE BUG: Comment in and -> out of memory error 1185 /*intvec *alpha_min = new intvec(this->numVars); 1186 alpha_min=fMin->getFacetNormal(); 1187 delete fCmp,fAct,fMin; 1188 1189 intvec *test = new intvec(this->numVars); 1190 test=testfacet.getFacetNormal();*/ 1191 //if(fMin->getFacetNormal()==ivNeg(testfacet.getFacetNormal())) 1192 //if (isParallel(fMin->getFacetNormal(),testfacet.getFacetNormal())) 1183 1184 //if(fMin->getFacetNormal()==ivNeg(testfacet.getFacetNormal())) 1185 #ifdef gfan_DEBUG 1186 cout << "Checking for parallelity" << endl <<" fMin is"; 1193 1187 fMin->printNormal(); 1194 testfacet.printNormal(); //NOTE THIS IS EMPTY, so prolly cause of bug above 1188 cout << "testfacet is "; 1189 testfacet->printNormal(); 1190 cout << endl; 1191 #endif 1195 1192 if (fMin==gcTmp.facetPtr) 1196 1193 //if(areEqual(fMin->getFacetNormal(),ivNeg(testfacet.getFacetNormal()))) 1194 //if (isParallel(fMin->getFacetNormal(),testfacet->getFacetNormal())) 1197 1195 { 1198 1196 cout << "Parallel" << endl; … … 1247 1245 gcTmp->showIntPoint(); 1248 1246 /*recursive part goes gere*/ 1249 if (isSearchFacet(*gcTmp,(facet &)gcAct->facetPtr))1247 if (isSearchFacet(*gcTmp,(facet*)gcAct->facetPtr)) 1250 1248 { 1251 1249 gcAct->next=gcTmp; … … 1283 1281 */ 1284 1282 1285 /* Construct a new ring which will serve as our root 1286 Does not yet work as expected. Will work fine with order dp,Dp but otherwise hangs in getGB 1287 resolved 07.04.2009 MM 1288 */ 1283 /* Construct a new ring which will serve as our root*/ 1289 1284 rootRing=rCopy0(currRing); 1290 1285 rootRing->order[0]=ringorder_lp; 1291 //NOTE: Build ring accordiing to rCopyAndChangeWeight 1292 /*rootRing->order[0]=ringorder_a; 1293 rootRing->order[1]=ringorder_lp; 1294 rootRing->wvhdl[0] =( int *)omAlloc(numvar*sizeof(int)); 1295 rootRing->wvhdl[0][1]=1; 1296 rootRing->wvhdl[0][2]=1;*/ 1286 1297 1287 rComplete(rootRing); 1298 1288 rChangeCurrRing(rootRing);
Note: See TracChangeset
for help on using the changeset viewer.