Changeset 7c0ec6 in git


Ignore:
Timestamp:
Nov 12, 2009, 2:14:54 PM (14 years ago)
Author:
Martin Monerjan
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
3a7ee744399f1b56c9bf08b3b16e524f0f2f0de4
Parents:
27bb97f5f06fab3d914b8889b6cabffbc4df28b6
Message:
Preprocessing of facets
Computation of initial ideal as stand-alone method
Bugfix for matrix overflow


git-svn-id: file:///usr/local/Singular/svn/trunk@12274 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/gfan.cc

    r27bb97f r7c0ec6  
    22Compute the Groebner fan of an ideal
    33$Author: monerjan $
    4 $Date: 2009-10-29 16:26:32 $
    5 $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1.102 2009-10-29 16:26:32 monerjan Exp $
     4$Date: 2009/11/03 06:57:32 $
     5$Header: /usr/local/Singular/cvsroot/kernel/gfan.cc,v 1.103 2009/11/03 06:57:32 monerjan Exp $
    66$Id$
    77*/
     
    2828#include <sstream>
    2929#include <time.h>
     30
    3031//#include <gmpxx.h>
    3132
     
    379380                delete fDel;
    380381        }
     382        //dd_FreeMatrix(this->ddFacets);
    381383}                       
    382384               
     
    475477        }
    476478        cout << endl;
     479}
     480
     481void gcone::invPrint(ideal const &I)
     482{
     483//      int numElts=IDELEMS(I);
     484//      cout << "inv = ";
     485//      for(int ii=0;ii<numElts;ii++);
     486//      {
     487//              pWrite0(pHead(I->m[ii]));
     488//              cout << ",";
     489//      }
     490//      cout << endl;
    477491}
    478492
     
    593607                        pSetm(aktpoly);         //doesn't seem to help anything
    594608                        pGetExpV(aktpoly,v);
     609                       
    595610                        for (int kk=0;kk<numvar;kk++)
    596611                        {
     
    601616                        aktmatrixrow=aktmatrixrow+1;
    602617                }//while
    603                
     618                omFree(v);
    604619        } //for
    605620               
    606                         //Maybe add another row to contain the constraints of the standard simplex?
    607 
    608 #ifdef gfan_DEBUG
    609 //                      cout << "The inequality matrix is" << endl;
    610 //                      dd_WriteMatrix(stdout, ddineq);
     621#if false
     622        /*Let's make the preprocessing here. This could already be done in the above for-loop,
     623        * but for a start it is more convenient here.
     624        * We check the necessary condition of FJT p.18
     625        * Quote: [...] every non-zero spoly should have at least one of its terms in inv(G)
     626        */
     627        ideal initialForm=idInit(IDELEMS(I),1);
     628        intvec *gamma=new intvec(this->numVars);
     629        int falseGammaCounter=0;
     630        int *redRowsArray=NULL;
     631        int num_alloc=0;
     632        int num_elts=0;
     633        for(int ii=0;ii<ddineq->rowsize;ii++)
     634        {
     635                double tmp;             
     636                for(int jj=1;jj<=this->numVars;jj++)
     637                {
     638                        tmp=mpq_get_d(ddineq->matrix[ii][jj]);
     639                        (*gamma)[jj-1]=(int)tmp;
     640//                      (*gamma)[jj]=(ddineq->matrix[ii][jj]);
     641                }
     642                computeInv((ideal&)I,initialForm,*gamma);
     643                //Create leading ideal
     644                ideal L=idInit(IDELEMS(initialForm),1);
     645                for(int jj=0;jj<IDELEMS(initialForm);jj++)
     646                {
     647                        L->m[jj]=pCopy(pHead(initialForm->m[jj]));
     648                }               
     649               
     650                LObject *P = new sLObject();
     651                memset(P,0,sizeof(LObject));
     652//              P->p1=L->m[0];
     653//              P->p2=L->m[1];
     654//              ksCreateSpoly(P);
     655//              pWrite(P->p);
     656//              cout << "gamma=";
     657//              gamma->show(1,0);
     658//              cout << endl;
     659//              cout << "inv=";
     660//              for(int qq=0;qq<IDELEMS(initialForm);qq++)
     661//              {
     662//                      pWrite0(initialForm->m[qq]);
     663//                      cout << ",";                   
     664//              }
     665//              cout << endl;
     666                for(int jj=0;jj<=IDELEMS(initialForm)-2;jj++)
     667                {
     668                        bool isMaybeFacet=FALSE;
     669                        P->p1=initialForm->m[jj];       //build spolys of initialForm in_v
     670//                      cout << "P->p1=";
     671//                      pWrite0(P->p1);
     672//                      cout << endl;
     673                        for(int kk=jj+1;kk<=IDELEMS(initialForm)-1;kk++)
     674                        {
     675                                P->p2=initialForm->m[kk];
     676                                ksCreateSpoly(P);
     677                                /*cout << "P->p2=";
     678                                pWrite0(P->p2);
     679                                cout << endl;
     680                                cout << "spoly(p1,p2)=";
     681                                pWrite0(P->p);
     682                                cout << endl;   */                     
     683                                if(P->p!=NULL)  //spoly non zero=?
     684                                {       
     685                                        poly p=pInit();                 
     686                                        poly q=pInit();
     687                                        p=pCopy(P->p);
     688                                        q=pHead(p);     //Monomial q
     689                                        isMaybeFacet=FALSE;
     690                                        while(p!=NULL)
     691                                        {
     692                                                q=pHead(p);                                             
     693//                                              unsigned long sevSpoly=pGetShortExpVector(q);
     694//                                              unsigned long not_sevL;                                         
     695                                                for(int ll=0;ll<IDELEMS(L);ll++)
     696                                                {
     697//                                                      not_sevL=~pGetShortExpVector(L->m[ll]);//                                       
     698                                                        //if(!(sevSpoly & not_sevL) && pLmDivisibleBy(L->m[ll],q) )//i.e. spoly is in L
     699                                                        if(pLmEqual(L->m[ll],q) || pDivisibleBy(L->m[ll],q))
     700                                                        {                                                       
     701                                                                isMaybeFacet=TRUE;
     702                                                                break;
     703                                                        }
     704                                                }
     705                                                if(isMaybeFacet==TRUE)
     706                                                {
     707//                                                      dd_MatrixRowRemove(&ddineq,ii);
     708//                                                      set_addelem(redRows,ii);
     709//                                                      dd_set_si(ddineq->matrix[ii][0],1);
     710//                                                      falseGammaCounter++;
     711//                                                      cout << "Removing gamma!" << endl;
     712                                                        break;//while(p!=NULL)
     713                                                }
     714                                                p=pNext(p);                                             
     715                                        }//while
     716                                        if(isMaybeFacet==FALSE)
     717                                        {
     718                                                dd_set_si(ddineq->matrix[ii][0],1);                                             
     719                                                if(num_alloc==0)
     720                                                        num_alloc += 1;
     721                                                else
     722                                                        num_alloc += 1;
     723                                                void *_tmp = realloc(redRowsArray,(num_alloc*sizeof(int)));
     724                                                if(!_tmp)
     725                                                        WerrorS("Couldn't realloc memory\n");
     726                                                redRowsArray = (int*)_tmp;
     727                                                redRowsArray[num_elts]=ii;
     728                                                num_elts++;
     729                                                break;//for(int kk, since we have found one that is not in L   
     730                                        }
     731                                }//if(P->p!=NULL)
     732                        }
     733                }//for
     734                delete P;
     735                //idDelete(L);         
     736        }//for(ii<ddineq-rowsize
     737       
     738        int offset=0;//needed for correction of redRowsArray[ii]
     739        for( int ii=0;ii<num_elts;ii++ )
     740        {
     741                dd_MatrixRowRemove(&ddineq,redRowsArray[ii]+1-offset);//cddlib sucks at enumeration
     742                offset++;
     743        }
     744        free(redRowsArray);
     745#endif
     746//      cout << "Found " << falseGammaCounter << " false in " << rows << endl;
     747        //Maybe add another row to contain the constraints of the standard simplex?
     748
     749#ifdef gfan_DEBUG
     750//      cout << "The inequality matrix is" << endl;
     751//      dd_WriteMatrix(stdout, ddineq);
    611752#endif
    612753
    613754        // The inequalities are now stored in ddineq
    614755        // Next we check for superflous rows
    615         ddredrows = dd_RedundantRows(ddineq, &dderr);
    616         if (dderr!=dd_NoError)                  // did an error occur?
    617         {
    618                 dd_WriteErrorMessages(stderr,dderr);    //if so tell us
    619         }
    620 #ifdef gfan_DEBUG
    621         else
    622         {
     756        time_t canonicalizeTic, canonicalizeTac;
     757        time(&canonicalizeTic);
     758//      ddredrows = dd_RedundantRows(ddineq, &dderr);
     759//      if (dderr!=dd_NoError)                  // did an error occur?
     760//      {
     761//              dd_WriteErrorMessages(stderr,dderr);    //if so tell us
     762//      }
     763#ifdef gfan_DEBUG
     764//      else
     765//      {
    623766//                              cout << "Redundant rows: ";
    624767//                              set_fwrite(stdout, ddredrows);          //otherwise print the redundant rows
    625         }//if dd_Error
     768//      }//if dd_Error
    626769#endif
    627770        //Remove reduntant rows here!
     771        //Necessary check here! C.f. FJT p18
     772               
    628773        dd_MatrixCanonicalize(&ddineq, &ddlinset, &ddredrows, &ddnewpos, &dderr);
     774        time(&canonicalizeTac);
     775        cout << "dd_MatrixCanonicalize time: " << difftime(canonicalizeTac,canonicalizeTic) << "sec" << endl;
    629776        ddrows = ddineq->rowsize;       //Size of the matrix with redundancies removed
    630777        ddcols = ddineq->colsize;
     
    9001047//#endif                               
    9011048        /*1st step: Compute the initial ideal*/
    902         poly initialFormElement[IDELEMS(gb)];   //array of #polys in GB to store initial form
     1049        /*poly initialFormElement[IDELEMS(gb)];*/       //array of #polys in GB to store initial form
    9031050        ideal initialForm=idInit(IDELEMS(gb),this->gcBasis->rank);
    9041051        poly aktpoly;
    905         intvec *check = new intvec(this->numVars);      //array to store the difference of LE and v
    906                        
    907         for (int ii=0;ii<IDELEMS(gb);ii++)
    908         {
    909                 aktpoly = (poly)gb->m[ii];                                                             
    910                 int *v=(int *)omAlloc((this->numVars+1)*sizeof(int));
    911                 int *leadExpV=(int *)omAlloc((this->numVars+1)*sizeof(int));
    912                 pGetExpV(aktpoly,leadExpV);     //find the leading exponent in leadExpV[1],...,leadExpV[n], use pNext(p)
    913                 initialFormElement[ii]=pHead(aktpoly);
    914                                
    915                 while(pNext(aktpoly)!=NULL)     /*loop trough terms and check for parallelity*/
    916                 {
    917                         aktpoly=pNext(aktpoly); //next term
    918                         pSetm(aktpoly);
    919                         pGetExpV(aktpoly,v);           
    920                         /* Convert (int)v into (intvec)check */                 
    921                         for (int jj=0;jj<this->numVars;jj++)
    922                         {
    923                                                 //cout << "v["<<jj+1<<"]="<<v[jj+1]<<endl;
    924                                                 //cout << "leadExpV["<<jj+1<<"]="<<leadExpV[jj+1]<<endl;
    925                                 (*check)[jj]=v[jj+1]-leadExpV[jj+1];
    926                         }
    927 #ifdef gfan_DEBUG
    928 //                                      cout << "check=";                       
    929 //                                      check->show();
    930 //                                      cout << endl;
    931 #endif
    932                         if (isParallel(*check,*fNormal)) //pass *check when
    933                         {
    934 //                              cout << "Parallel vector found, adding to initialFormElement" << endl;                 
    935                                 initialFormElement[ii] = pAdd(pCopy(initialFormElement[ii]),(poly)pHead(aktpoly));
    936                         }                                               
    937                 }//while
    938 #ifdef gfan_DEBUG
    939 //                              cout << "Initial Form=";                               
    940 //                              pWrite(initialFormElement[ii]);
    941 //                              cout << "---" << endl;
    942 #endif
    943                 /*Now initialFormElement must be added to (ideal)initialForm */
    944                 initialForm->m[ii]=initialFormElement[ii];
    945         }//for                 
     1052        /*intvec *check = new intvec(this->numVars);*/  //array to store the difference of LE and v
     1053        computeInv(gb,initialForm,*fNormal);
     1054        //NOTE The code below went into gcone::computeInv
     1055//      for (int ii=0;ii<IDELEMS(gb);ii++)
     1056//      {
     1057//              aktpoly = (poly)gb->m[ii];                                                             
     1058//              int *v=(int *)omAlloc((this->numVars+1)*sizeof(int));
     1059//              int *leadExpV=(int *)omAlloc((this->numVars+1)*sizeof(int));
     1060//              pGetExpV(aktpoly,leadExpV);     //find the leading exponent in leadExpV[1],...,leadExpV[n], use pNext(p)
     1061//              initialFormElement[ii]=pHead(aktpoly);
     1062//                             
     1063//              while(pNext(aktpoly)!=NULL)     //*loop trough terms and check for parallelity*/
     1064//              {
     1065//                      aktpoly=pNext(aktpoly); //next term
     1066//                      pSetm(aktpoly);
     1067//                      pGetExpV(aktpoly,v);           
     1068//                      /* Convert (int)v into (intvec)check */                 
     1069//                      for (int jj=0;jj<this->numVars;jj++)
     1070//                      {
     1071//                                              //cout << "v["<<jj+1<<"]="<<v[jj+1]<<endl;
     1072//                                              //cout << "leadExpV["<<jj+1<<"]="<<leadExpV[jj+1]<<endl;
     1073//                              (*check)[jj]=v[jj+1]-leadExpV[jj+1];
     1074//                      }
     1075// #ifdef gfan_DEBUG
     1076// //                                   cout << "check=";                       
     1077// //                                   check->show();
     1078// //                                   cout << endl;
     1079// #endif
     1080//                      if (isParallel(*check,*fNormal)) //pass *check when
     1081//                      {
     1082// //                           cout << "Parallel vector found, adding to initialFormElement" << endl;                 
     1083//                              initialFormElement[ii] = pAdd(pCopy(initialFormElement[ii]),(poly)pHead(aktpoly));
     1084//                      }                                               
     1085//              }//while
     1086// #ifdef gfan_DEBUG
     1087// //                           cout << "Initial Form=";                               
     1088// //                           pWrite(initialFormElement[ii]);
     1089// //                           cout << "---" << endl;
     1090// #endif
     1091//              //*Now initialFormElement must be added to (ideal)initialForm */
     1092//              initialForm->m[ii]=initialFormElement[ii];
     1093//              omFree(leadExpV);
     1094//              omFree(v);
     1095//      }//for                 
    9461096#ifdef gfan_DEBUG
    9471097/*      cout << "Initial ideal is: " << endl;
     
    9851135                       
    9861136        ideal ina;                     
    987         ina=idrCopyR(initialForm,srcRing);                     
    988 #ifdef gfan_DEBUG
    989 //                      cout << "ina=";
    990 //                      idShow(ina); cout << endl;
     1137        ina=idrCopyR(initialForm,srcRing);
     1138#ifndef NDEBUG                 
     1139#ifdef gfan_DEBUG
     1140                        cout << "ina=";
     1141                        idShow(ina); cout << endl;
     1142#endif
    9911143#endif
    9921144        ideal H;
    9931145                        //H=kStd(ina,NULL,isHomog,NULL);        //we know it is homogeneous
    994         H=kStd(ina,NULL,testHomog,NULL);
     1146        H=kStd(ina,NULL,testHomog,NULL);        //This is \mathcal(G)_{>_-\alpha}(in_v(I))
    9951147        idSkipZeroes(H);
    996 #ifdef gfan_DEBUG
    997 //                      cout << "H="; idShow(H); cout << endl;
     1148#ifndef NDEBUG
     1149#ifdef gfan_DEBUG
     1150                        cout << "H="; idShow(H); cout << endl;
     1151#endif
    9981152#endif
    9991153        /*Substep 2.2
     
    10041158        ideal srcRing_HH;                       
    10051159        srcRing_H=idrCopyR(H,tmpRing);
    1006 #ifdef gfan_DEBUG
    1007 //                      cout << "srcRing_H = ";
    1008 //                      idShow(srcRing_H); cout << endl;
    1009 #endif
    1010         srcRing_HH=ffG(srcRing_H,this->gcBasis);               
    1011 #ifdef gfan_DEBUG
    1012 //                      cout << "srcRing_HH = ";
    1013 //                      idShow(srcRing_HH); cout << endl;
     1160#ifndef NDEBUG
     1161#ifdef gfan_DEBUG
     1162                        cout << "srcRing_H = ";
     1163                        idShow(srcRing_H); cout << endl;
     1164#endif
     1165#endif
     1166        srcRing_HH=ffG(srcRing_H,this->gcBasis);       
     1167#ifndef NDEBUG
     1168#ifdef gfan_DEBUG
     1169                        cout << "srcRing_HH = ";
     1170                        idShow(srcRing_HH); cout << endl;
     1171#endif
    10141172#endif
    10151173        /*Substep 2.2.1
     
    10291187        {
    10301188                poly aktpoly=(poly)srcRing_HH->m[ii];
    1031                 iPMatrixRows = iPMatrixRows+pLength(aktpoly)-1;
     1189                iPMatrixRows = iPMatrixRows+pLength(aktpoly);
    10321190        }
    10331191        /* additionally one row for the standard-simplex and another for a row that becomes 0 during
    10341192         * construction of the differences
    10351193         */
    1036         intPointMatrix = dd_CreateMatrix(iPMatrixRows+10,this->numVars+1); //iPMatrixRows+10;
     1194        intPointMatrix = dd_CreateMatrix(iPMatrixRows+2,this->numVars+1); //iPMatrixRows+10;
    10371195        intPointMatrix->numbtype=dd_Integer;    //NOTE: DO NOT REMOVE OR CHANGE TO dd_Rational
    1038                        
     1196       
    10391197        for (int ii=0;ii<IDELEMS(srcRing_HH);ii++)
    10401198        {
     
    10541212                        {
    10551213#ifdef gfan_DEBUG
    1056                                                 cout << src_ExpV[kk] << "," << dst_ExpV[kk] << endl;
     1214//                                              cout << src_ExpV[kk] << "," << dst_ExpV[kk] << endl;
    10571215#endif
    10581216                                if (src_ExpV[kk]!=dst_ExpV[kk])
     
    10661224                                markingsAreCorrect=TRUE; //everything is fine
    10671225#ifdef gfan_DEBUG
    1068                                                 cout << "correct markings" << endl;
     1226//                                              cout << "correct markings" << endl;
    10691227#endif
    10701228                        }//if (pHead(aktpoly)==pHead(H->m[jj])
    1071                         delete src_ExpV;
    1072                         delete dst_ExpV;
     1229//                      delete src_ExpV;
     1230//                      delete dst_ExpV;
     1231                        omFree(src_ExpV);
     1232                        omFree(dst_ExpV);
    10731233                }//for (int jj=0;jj<IDELEMS(H);jj++)
    10741234                               
     
    11081268                        aktrow +=1;
    11091269                }
    1110                 delete v;
    1111                 delete leadExpV;
     1270//              delete v;
     1271//              delete leadExpV;
     1272                omFree(v);
     1273                omFree(leadExpV);
    11121274        }//for (int ii=0;ii<IDELEMS(srcRing_HH);ii++)
    11131275        /*Now we add the constraint for the standard simplex*/
     
    12001362//      rDelete(dstRing);
    12011363}//void flip(ideal gb, facet *f)
     1364
     1365/** \brief Compute initial ideal
     1366 * Compute the initial ideal in_v(G) wrt a (possible) facet normal
     1367 * used in gcone::getFacetNormal in order to preprocess possible facet normals
     1368 * and in gcone::flip for obvious reasons.
     1369*/
     1370void gcone::computeInv(ideal &gb, ideal &initialForm, intvec &fNormal)
     1371{
     1372        intvec *check = new intvec(this->numVars);
     1373        poly initialFormElement[IDELEMS(gb)];
     1374        poly aktpoly;
     1375       
     1376        for (int ii=0;ii<IDELEMS(gb);ii++)
     1377        {
     1378                aktpoly = (poly)gb->m[ii];                                                             
     1379                int *v=(int *)omAlloc((this->numVars+1)*sizeof(int));
     1380                int *leadExpV=(int *)omAlloc((this->numVars+1)*sizeof(int));
     1381                pGetExpV(aktpoly,leadExpV);     //find the leading exponent in leadExpV[1],...,leadExpV[n], use pNext(p)
     1382                initialFormElement[ii]=pHead(aktpoly);
    12021383                               
     1384                while(pNext(aktpoly)!=NULL)     /*loop trough terms and check for parallelity*/
     1385                {
     1386                        aktpoly=pNext(aktpoly); //next term
     1387                        pSetm(aktpoly);
     1388                        pGetExpV(aktpoly,v);           
     1389                        /* Convert (int)v into (intvec)check */                 
     1390                        for (int jj=0;jj<this->numVars;jj++)
     1391                        {
     1392                                                //cout << "v["<<jj+1<<"]="<<v[jj+1]<<endl;
     1393                                                //cout << "leadExpV["<<jj+1<<"]="<<leadExpV[jj+1]<<endl;
     1394                                (*check)[jj]=v[jj+1]-leadExpV[jj+1];
     1395                        }
     1396#ifdef gfan_DEBUG
     1397//                                      cout << "check=";                       
     1398//                                      check->show();
     1399//                                      cout << endl;
     1400#endif
     1401                        if (isParallel(*check,fNormal)) //pass *check when
     1402                        {
     1403//                              cout << "Parallel vector found, adding to initialFormElement" << endl;                 
     1404                                initialFormElement[ii] = pAdd(pCopy(initialFormElement[ii]),(poly)pHead(aktpoly));
     1405                        }                                               
     1406                }//while
     1407#ifdef gfan_DEBUG
     1408//                              cout << "Initial Form=";                               
     1409//                              pWrite(initialFormElement[ii]);
     1410//                              cout << "---" << endl;
     1411#endif
     1412                /*Now initialFormElement must be added to (ideal)initialForm */
     1413                initialForm->m[ii]=initialFormElement[ii];
     1414                omFree(leadExpV);
     1415                omFree(v);             
     1416        }//for
     1417        delete check;
     1418}
     1419
    12031420/** \brief Compute the remainder of a polynomial by a given ideal
    12041421 *
     
    18012018       
    18022019        fAct = gcAct->facetPtr;
    1803         //NOTE Disabled until code works as expected
    1804         //gcAct->writeConeToFile(*gcAct);
     2020        //NOTE Disabled until code works as expected. Reenabled 2.11.2009
     2021        gcAct->writeConeToFile(*gcAct);
    18052022                       
    18062023        /*End of initialisation*/
     
    18102027          We always choose the first facet from fListPtr as facet to be flipped
    18112028        */                     
     2029        time_t tic, tac;
    18122030        while((SearchListAct!=NULL))// && counter<10)
    18132031        {//NOTE See to it that the cone is only changed after ALL facets have been flipped!                             
     
    18162034                while(fAct!=NULL)
    18172035                {       //Since SLA should only contain flippables there should be no need to check for that
     2036                        time(&tic);
    18182037                        gcAct->flip(gcAct->gcBasis,fAct);
     2038                        time(&tac);
     2039                        cout << "t_flip = " << difftime(tac,tic) << endl;
    18192040                        ring rTmp=rCopy(fAct->flipRing);
    18202041                        rComplete(rTmp);                       
     
    18312052//                      idDelete((ideal *)&fAct->flipGB);
    18322053//                      rDelete(fAct->flipRing);
     2054                        time(&tic);
    18332055                        gcTmp->getConeNormals(gcTmp->gcBasis, FALSE);                                   
     2056                        time(&tac);
     2057                        cout << "t_getConeNormals = " << difftime(tac,tic) << endl;
    18342058                        gcTmp->getCodim2Normals(*gcTmp);                                       
    18352059                        gcTmp->normalize();
     
    24102634        string UCNstr = ss.str();               
    24112635                       
    2412         string prefix="/tmp/cone";
     2636        string prefix="/tmp/cone";
     2637//      string prefix="./";     //crude hack -> run tests in separate directories
    24132638        string suffix=".sg";
    24142639        string filename;
     
    24162641        filename.append(UCNstr);
    24172642        filename.append(suffix);
    2418                                        
     2643       
     2644       
     2645//      int thisPID = getpid();
     2646//      ss << thisPID;
     2647//      string strPID = ss.str();
     2648//      string prefix="./";
     2649                                               
    24192650        ofstream gcOutputFile(filename.c_str());
    24202651        facet *fAct;
     
    26542885        gcInputFile.close();
    26552886        rChangeCurrRing(saveRing);
    2656 }       
     2887}
     2888       
     2889// static void gcone::idPrint(ideal &I)
     2890// {
     2891//      for(int ii=0;ii<IDELEMS(I);ii++)
     2892//      {
     2893//              cout << "_[" << ii << "]=" << I->m[ii] << endl;
     2894//      }
     2895// }
    26572896
    26582897
  • kernel/gfan.h

    r27bb97f r7c0ec6  
    33
    44$Author: monerjan $
    5 $Date: 2009-10-23 14:56:55 $
    6 $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.h,v 1.12 2009-10-23 14:56:55 monerjan Exp $
     5$Date: 2009/11/03 06:57:32 $
     6$Header: /usr/local/Singular/cvsroot/kernel/gfan.h,v 1.13 2009/11/03 06:57:32 monerjan Exp $
    77$Id$
    88*/
     
    153153                void showSLA(facet &f);
    154154                void idDebugPrint(ideal const &I);
     155                void invPrint(ideal const &I);
    155156                bool isMonomial(ideal const &I);
    156157                void setNumFacets();
     
    160161                void getCodim2Normals(gcone const &gc);
    161162                void flip(ideal gb, facet *f);
     163                void computeInv(ideal &gb, ideal &inv, intvec &f);
    162164                poly restOfDiv(poly const &f, ideal const &I);
    163165                ideal ffG(ideal const &H, ideal const &G);
     
    180182                void writeConeToFile(gcone const &gc, bool usingIntPoints=FALSE);
    181183                void readConeFromFile(int gcNum, gcone *gc);
     184//              static void gcone::idPrint(ideal &I);
    182185                friend class facet;     
    183186};
Note: See TracChangeset for help on using the changeset viewer.