Changeset 6123d46 in git
- Timestamp:
- Dec 7, 2009, 3:22:41 PM (13 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
- Children:
- 561aa20d93487cb95c506fc3281c4720f466070c
- Parents:
- a23a297b3ce46de66672d1b0f7796e93c2ccb4de
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gfan.cc
ra23a297 r6123d46 64 64 65 65 #ifndef gfan_DEBUG 66 // #define gfan_DEBUG 166 // #define gfan_DEBUG 67 67 #ifndef gfan_DEBUGLEVEL 68 68 #define gfan_DEBUGLEVEL 1 … … 406 406 this->pred=gc.UCN; 407 407 this->facetPtr=NULL; 408 this->gcBasis=idCopy(f.flipGB); 409 // ring saveRing=currRing; 410 // rChangeCurrRing(gc.baseRing); 411 // this->gcBasis=idCopy(f.flipGB); 408 // this->gcBasis=idCopy(f.flipGB); 409 // ring saveRing=currRing; 410 // ring tmpRing=f.flipRing; 411 // rComplete(f.flipRing); 412 // rChangeCurrRing(f.flipRing); 413 this->gcBasis=idrCopyR(f.flipGB, f.flipRing); 412 414 // this->inputIdeal=idCopy(this->gcBasis); 413 415 this->baseRing=rCopy(f.flipRing); 414 // rChangeCurrRing(saveRing); 416 // rComplete(this->baseRing); 417 // rChangeCurrRing(saveRing); 415 418 this->numFacets=0; 416 419 this->ivIntPt=NULL; … … 1334 1337 int size=IDELEMS(H); 1335 1338 ideal res=idInit(size,1); 1336 poly temp1 =pInit();1337 poly temp2 =pInit();1338 poly temp3 =pInit(); //polys to temporarily store values for pSub1339 poly temp1;//=pInit(); 1340 poly temp2;//=pInit(); 1341 poly temp3;//=pInit(); //polys to temporarily store values for pSub 1339 1342 for (int ii=0;ii<size;ii++) 1340 1343 { … … 1777 1780 pDelete(&gcTmp->gcBasis->m[ii]); 1778 1781 } 1779 // idDelete((ideal*)&gcTmp->gcBasis); 1780 // rDelete(gcTmp->baseRing);1782 // idDelete((ideal*)&gcTmp->gcBasis);//Whonder why? 1783 // rDelete(gcTmp->baseRing); 1781 1784 } 1782 #if gfan_DEBUG1783 if(SearchListRoot!=NULL)1784 gcTmp->showSLA(*SearchListRoot);1785 #endif1785 // #ifdef gfan_DEBUG 1786 // if(SearchListRoot!=NULL) 1787 // gcTmp->showSLA(*SearchListRoot); 1788 // #endif 1786 1789 rChangeCurrRing(gcAct->baseRing); 1787 1790 //rDelete(rTmp); … … 2335 2338 2336 2339 ring saveRing=currRing; 2337 rChangeCurrRing(gc->baseRing); 2338 ring newRing; //The ring to be read in 2339 2340 string::iterator EOL; 2341 int terms=1; //#Terms in the poly 2340 //Comment the following if you uncomment the if(line=="RING") part below 2341 rChangeCurrRing(gc->baseRing); 2342 // string::iterator EOL; 2343 // int terms=1; //#Terms in the poly 2342 2344 2343 2345 while( !gcInputFile.eof() ) … … 2349 2351 if(line=="RING") 2350 2352 { 2351 /*getline(gcInputFile,line); 2352 found = line.find("a("); 2353 line.erase(0,found+2); 2354 string strweight; 2355 strweight=line.substr(0,line.find_first_of(")")); 2356 intvec *iv=new intvec(this->numVars); 2357 for(int ii=0;ii<this->numVars;ii++) 2358 { 2359 string weight; 2360 weight=line.substr(0,line.find_first_of(",)")); 2361 (*iv)[ii]=atoi(weight.c_str()); 2362 line.erase(0,line.find_first_of(",)")+1); 2363 } 2364 ring newRing; 2365 newRing=rCopy0(currRing); 2366 int length=this->numVars; 2367 int *A=(int *)omAlloc0(length*sizeof(int)); 2368 for(int jj=0;jj<length;jj++) 2369 { 2370 A[jj]=-(*iv)[jj]; 2371 } 2372 omFree(newRing->wvhdl[0]); 2373 newRing->wvhdl[0]=(int*)A; 2374 newRing->block1[0]=length; 2375 rComplete(newRing); 2376 baseRing=rCopy(newRing);*/ 2353 // getline(gcInputFile,line); 2354 // found = line.find("a("); 2355 // line.erase(0,found+2); 2356 // string strweight; 2357 // strweight=line.substr(0,line.find_first_of(")")); 2358 // intvec *iv=new intvec(this->numVars); 2359 // for(int ii=0;ii<this->numVars;ii++) 2360 // { 2361 // string weight; 2362 // weight=line.substr(0,line.find_first_of(",)")); 2363 // (*iv)[ii]=atoi(weight.c_str()); 2364 // line.erase(0,line.find_first_of(",)")+1); 2365 // } 2366 // ring newRing; 2367 // if(currRing->order[0]!=ringorder_a) 2368 // { 2369 // newRing=rCopyAndAddWeight(currRing,iv); 2370 // } 2371 // else 2372 // { 2373 // newRing=rCopy0(currRing); 2374 // int length=this->numVars; 2375 // int *A=(int *)omAlloc0(length*sizeof(int)); 2376 // for(int jj=0;jj<length;jj++) 2377 // { 2378 // A[jj]=-(*iv)[jj]; 2379 // } 2380 // omFree(newRing->wvhdl[0]); 2381 // newRing->wvhdl[0]=(int*)A; 2382 // newRing->block1[0]=length; 2383 // } 2384 // delete iv; 2385 // rComplete(newRing); 2386 // gc->baseRing=rCopy(newRing); 2387 // if(currRing!=gc->baseRing) 2388 // rChangeCurrRing(gc->baseRing); 2377 2389 } 2390 2378 2391 if(line=="GCBASISLENGTH") 2379 2392 { … … 2382 2395 int size=atoi(strGcBasisLength.c_str()); 2383 2396 gcBasisLength=size; 2384 gc Basis=idInit(size,1);2397 gc->gcBasis=idInit(size,1); 2385 2398 } 2386 2399 if(line=="GCBASIS") … … 2524 2537 // ring tmpRing=gcAct->getBaseRing; 2525 2538 // rChangeCurrRing(tmpRing); 2526 l->m[1].data=(void*)idrCopyR_NoSort(gcAct->gcBasis,gcAct->getBaseRing()); 2539 // l->m[1].data=(void*)idrCopyR_NoSort(gcAct->gcBasis,gcAct->getBaseRing()); 2540 l->m[1].data=(void*)idrCopyR(gcAct->gcBasis,gcAct->getBaseRing()); 2527 2541 // rChangeCurrRing(saveRing); 2528 2542
Note: See TracChangeset
for help on using the changeset viewer.