Changeset 6123d46 in git for kernel/gfan.cc


Ignore:
Timestamp:
Dec 7, 2009, 3:22:41 PM (14 years ago)
Author:
Martin Monerjan
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
561aa20d93487cb95c506fc3281c4720f466070c
Parents:
a23a297b3ce46de66672d1b0f7796e93c2ccb4de
Message:
fixed dPolyErrors
ring reconstruction in lprepareList


git-svn-id: file:///usr/local/Singular/svn/trunk@12370 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/gfan.cc

    ra23a297 r6123d46  
    6464
    6565#ifndef gfan_DEBUG
    66 // #define gfan_DEBUG 1
     66// #define gfan_DEBUG
    6767#ifndef gfan_DEBUGLEVEL
    6868#define gfan_DEBUGLEVEL 1
     
    406406        this->pred=gc.UCN;
    407407        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);
    412414//      this->inputIdeal=idCopy(this->gcBasis);
    413415        this->baseRing=rCopy(f.flipRing);
    414 //      rChangeCurrRing(saveRing);
     416//      rComplete(this->baseRing);
     417//      rChangeCurrRing(saveRing);
    415418        this->numFacets=0;
    416419        this->ivIntPt=NULL;
     
    13341337        int size=IDELEMS(H);
    13351338        ideal res=idInit(size,1);
    1336         poly temp1=pInit();
    1337         poly temp2=pInit();
    1338         poly temp3=pInit();     //polys to temporarily store values for pSub
     1339        poly temp1;//=pInit();
     1340        poly temp2;//=pInit();
     1341        poly temp3;//=pInit();  //polys to temporarily store values for pSub
    13391342        for (int ii=0;ii<size;ii++)
    13401343        {
     
    17771780                                        pDelete(&gcTmp->gcBasis->m[ii]);
    17781781                                }
    1779 //                              idDelete((ideal*)&gcTmp->gcBasis);
    1780 //                              rDelete(gcTmp->baseRing);
     1782//                              idDelete((ideal*)&gcTmp->gcBasis);//Whonder why?
     1783//                              rDelete(gcTmp->baseRing);
    17811784                        }                       
    1782 #if gfan_DEBUG
    1783                         if(SearchListRoot!=NULL)
    1784                                 gcTmp->showSLA(*SearchListRoot);
    1785 #endif
     1785// #ifdef gfan_DEBUG
     1786//                      if(SearchListRoot!=NULL)
     1787//                              gcTmp->showSLA(*SearchListRoot);
     1788// #endif
    17861789                        rChangeCurrRing(gcAct->baseRing);
    17871790                        //rDelete(rTmp);
     
    23352338       
    23362339        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
    23422344       
    23432345        while( !gcInputFile.eof() )
     
    23492351                if(line=="RING")
    23502352                {
    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);
    23772389                }
     2390               
    23782391                if(line=="GCBASISLENGTH")
    23792392                {
     
    23822395                        int size=atoi(strGcBasisLength.c_str());
    23832396                        gcBasisLength=size;             
    2384                         gcBasis=idInit(size,1);
     2397                        gc->gcBasis=idInit(size,1);
    23852398                }
    23862399                if(line=="GCBASIS")
     
    25242537//              ring tmpRing=gcAct->getBaseRing;
    25252538//              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());
    25272541//              rChangeCurrRing(saveRing);
    25282542
Note: See TracChangeset for help on using the changeset viewer.