Changeset 590f813 in git for kernel


Ignore:
Timestamp:
Mar 29, 2010, 1:36:02 PM (14 years ago)
Author:
Martin Monerjan
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd08f5f0bb3329b8ca19f23b74cb1473686415c3a')
Children:
8ed8139c36ded402f5082052e87ee5a6955cfe5b
Parents:
e632baa90bd4ea0b69a79de808abf9f24c50b828
Message:
int64 and int64vec
Changed the way the interior points are computed. Much smaller now


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

Legend:

Unmodified
Added
Removed
  • kernel/gfan.cc

    re632ba r590f813  
    145145facet::facet(const facet& f)
    146146{
    147         this->fNormal=ivCopy(f.fNormal);
     147        this->fNormal=iv64Copy(f.fNormal);
    148148        this->UCN=f.UCN;
    149149        this->isFlippable=f.isFlippable;
    150150        //Needed for flip2
    151151        //NOTE ONLY REFERENCE
    152         this->interiorPoint=ivCopy(f.interiorPoint);//only referencing is prolly not the best thing to do in a copy constructor
     152        this->interiorPoint=iv64Copy(f.interiorPoint);//only referencing is prolly not the best thing to do in a copy constructor
    153153        facet* f2Copy;
    154154        f2Copy=f.codim2Ptr;
     
    170170                        f2Act->prev = marker;
    171171                }
    172                 intvec *f2Normal;
     172                int64vec *f2Normal;
    173173                f2Normal = f2Copy->getFacetNormal();
    174174//              f2Act->setFacetNormal(f2Copy->getFacetNormal());
     
    186186{
    187187        facet *res = new facet();
    188         res->fNormal=(intvec * const)f.fNormal;
     188        res->fNormal=(int64vec * const)f.fNormal;
    189189        res->UCN=f.UCN;
    190190        res->isFlippable=f.isFlippable;
    191         res->interiorPoint=(intvec * const)f.interiorPoint;
     191        res->interiorPoint=(int64vec * const)f.interiorPoint;
    192192        res->codim2Ptr=(facet * const)f.codim2Ptr;
    193193        res->prev=NULL;
     
    249249}
    250250               
    251 inline const intvec *facet::getRef2FacetNormal() const
     251inline const int64vec *facet::getRef2FacetNormal() const
    252252{
    253253        return(this->fNormal);
     
    263263#endif
    264264        bool res = TRUE;
    265         const intvec *fIntP = f->getRef2InteriorPoint();
    266         const intvec *gIntP = g->getRef2InteriorPoint();
     265        const int64vec *fIntP = f->getRef2InteriorPoint();
     266        const int64vec *gIntP = g->getRef2InteriorPoint();
    267267        for(int ii=0;ii<pVariables;ii++)
    268268        {
     
    286286* If so we check the extremal rays
    287287*
    288 * BEWARE: It would be better to use const intvec* but that will lead to call something like
    289 * int foo=((intvec*)f2Normal)->compare((intvec*)s2Normal) resulting in much higher memory usage
     288* BEWARE: It would be better to use const int64vec* but that will lead to call something like
     289* int foo=((int64vec*)f2Normal)->compare((int64vec*)s2Normal) resulting in much higher memory usage
    290290*/
    291291static bool areEqual(facet *f, facet *s)
     
    299299        int notParallelCtr=0;
    300300        int ctr=0;
    301         const intvec* fNormal; //No new since ivCopy and therefore getFacetNormal return a new
    302         const intvec* sNormal;
     301        const int64vec* fNormal; //No new since iv64Copy and therefore getFacetNormal return a new
     302        const int64vec* sNormal;
    303303        fNormal = f->getRef2FacetNormal();//->getFacetNormal();
    304304        sNormal = s->getRef2FacetNormal();//->getFacetNormal();
     
    308308 //             notParallelCtr++;
    309309//      else//parallelity, so we check the codim2-facets
    310         intvec *fNRef=const_cast<intvec*>(fNormal);
    311         intvec *sNRef=const_cast<intvec*>(sNormal);
     310        int64vec *fNRef=const_cast<int64vec*>(fNormal);
     311        int64vec *sNRef=const_cast<int64vec*>(sNormal);
    312312//      if(isParallel(*fNormal,*sNormal))       
    313313        if(isParallel(*fNRef,*sNRef))
     
    320320                while(f2Act!=NULL)
    321321                {
    322                         const intvec* f2Normal;
     322                        const int64vec* f2Normal;
    323323                        f2Normal = f2Act->getRef2FacetNormal();//->getFacetNormal();
    324 //                      intvec *f2Ref=const_cast<intvec*>(f2Normal);
     324//                      int64vec *f2Ref=const_cast<int64vec*>(f2Normal);
    325325                        s2Act = s->codim2Ptr;
    326326                        while(s2Act!=NULL)
    327327                        {
    328                                 const intvec* s2Normal;
     328                                const int64vec* s2Normal;
    329329                                s2Normal = s2Act->getRef2FacetNormal();//->getFacetNormal();
    330330//                              bool foo=areEqual(f2Normal,s2Normal);
    331 //                              intvec *s2Ref=const_cast<intvec*>(s2Normal);
     331//                              int64vec *s2Ref=const_cast<int64vec*>(s2Normal);
    332332                                int foo=f2Normal->compare(s2Normal);
    333333                                if(foo==0)
     
    356356#endif
    357357        return res;
    358 //      intvec *foo=ivNeg(sNormal);
     358//      int64vec *foo=ivNeg(sNormal);
    359359//      if(fNormal->compare(foo)!=0) //facet normals
    360360//      {
     
    370370//              while(f2Act!=NULL)
    371371//              {
    372 //                      intvec* f2Normal;
     372//                      int64vec* f2Normal;
    373373//                      f2Normal = f2Act->getFacetNormal();
    374374//                      s2Act = s->codim2Ptr;
    375375//                      while(s2Act!=NULL)
    376376//                      {
    377 //                              intvec* s2Normal;
     377//                              int64vec* s2Normal;
    378378//                              s2Normal = s2Act->getFacetNormal();
    379379// //                           bool foo=areEqual(f2Normal,s2Normal);
     
    395395}       
    396396               
    397 /** Stores the facet normal \param intvec*/
    398 inline void facet::setFacetNormal(intvec *iv)
     397/** Stores the facet normal \param int64vec*/
     398inline void facet::setFacetNormal(int64vec *iv)
    399399{
    400400        if(this->fNormal!=NULL)
    401401                delete this->fNormal;
    402         this->fNormal = ivCopy(iv);                     
     402        this->fNormal = iv64Copy(iv);                   
    403403}
    404404               
    405405/** Hopefully returns the facet normal
    406 * Mind: ivCopy returns a new intvec, so use this in the following way:
    407 * intvec *iv;
     406* Mind: iv64Copy returns a new int64vec, so use this in the following way:
     407* int64vec *iv;
    408408* iv = this->getFacetNormal();
    409409* [...]
    410410* delete(iv);
    411411*/
    412 inline intvec *facet::getFacetNormal() const
     412inline int64vec *facet::getFacetNormal() const
    413413{                               
    414         return ivCopy(this->fNormal);
     414        return iv64Copy(this->fNormal);
    415415//      return this->fNormal;
    416416}
     
    472472               
    473473/** Store an interior point of the facet */
    474 inline void facet::setInteriorPoint(intvec *iv)
     474inline void facet::setInteriorPoint(int64vec *iv)
    475475{
    476476        if(this->interiorPoint!=NULL)
    477477                delete this->interiorPoint;
    478         this->interiorPoint = ivCopy(iv);
     478        this->interiorPoint = iv64Copy(iv);
    479479}
    480480               
    481481/** Returns a pointer to this->interiorPoint
    482 * MIND: ivCopy returns a new intvec
     482* MIND: iv64Copy returns a new int64vec
    483483* @see facet::getFacetNormal
    484484*/
    485 inline intvec *facet::getInteriorPoint()
    486 {
    487         return ivCopy(this->interiorPoint);
    488 }
    489 
    490 inline const intvec *facet::getRef2InteriorPoint()
     485inline int64vec *facet::getInteriorPoint()
     486{
     487        return iv64Copy(this->interiorPoint);
     488}
     489
     490inline const int64vec *facet::getRef2InteriorPoint()
    491491{
    492492        return (this->interiorPoint);
     
    500500        facet *codim2Act;                       
    501501        codim2Act = this->codim2Ptr;
    502         intvec *fNormal;
     502        int64vec *fNormal;
    503503        fNormal = this->getFacetNormal();       
    504504        printf("=======================\n");
     
    508508        while(codim2Act!=NULL)
    509509        {
    510                 intvec *f2Normal;
     510                int64vec *f2Normal;
    511511                f2Normal = codim2Act->getFacetNormal();
    512512                printf("(");f2Normal->show(1,0);printf(")\n");
     
    644644       
    645645/** \brief Set the interior point of a cone */
    646 inline void gcone::setIntPoint(intvec *iv)
     646inline void gcone::setIntPoint(int64vec *iv)
    647647{
    648648        if(this->ivIntPt!=NULL)
    649649                delete this->ivIntPt;
    650         this->ivIntPt=ivCopy(iv);
     650        this->ivIntPt=iv64Copy(iv);
    651651}
    652652               
    653653/** \brief Returns either a physical copy the interior point of a cone or just a reference to it.*/
    654 inline intvec *gcone::getIntPoint(bool shallow)
     654inline int64vec *gcone::getIntPoint(bool shallow)
    655655{
    656656        if(shallow==TRUE)
    657657                return this->ivIntPt;
    658658        else
    659                 return ivCopy(this->ivIntPt);
     659                return iv64Copy(this->ivIntPt);
    660660}
    661661               
     
    677677        while(f!=NULL)
    678678        {
    679                 intvec *iv;
     679                int64vec *iv;
    680680                iv = f->getFacetNormal();
    681681                printf("(");iv->show(1,0);
     
    713713                while(fAct!=NULL)
    714714                {
    715                         intvec *fNormal;               
     715                        int64vec *fNormal;             
    716716                        fNormal=fAct->getFacetNormal();
    717717                        printf("(");fNormal->show(1,0);
     
    725725                        while(codim2Act!=NULL)
    726726                        {
    727                                 intvec *f2Normal;
     727                                int64vec *f2Normal;
    728728                                f2Normal = codim2Act->getFacetNormal();
    729729                                printf("(");f2Normal->show(1,0);printf(") ");
     
    887887        */
    888888//      ideal initialForm=idInit(IDELEMS(I),1);
    889 //      intvec *gamma=new intvec(this->numVars);
     889//      int64vec *gamma=new int64vec(this->numVars);
    890890        int falseGammaCounter=0;
    891891        int *redRowsArray=NULL;
     
    896896                ideal initialForm=idInit(IDELEMS(I),1);
    897897                //read row ii into gamma
    898                 double tmp;
    899                 intvec *gamma=new intvec(this->numVars);
     898                int64 tmp;
     899                int64vec *gamma=new int64vec(this->numVars);
    900900                for(int jj=1;jj<=this->numVars;jj++)
    901901                {
    902                         tmp=mpq_get_d(ddineq->matrix[ii][jj]);
    903                         (*gamma)[jj-1]=(int)tmp;
     902                        tmp=(int64)mpq_get_d(ddineq->matrix[ii][jj]);
     903                        (*gamma)[jj-1]=(int64)tmp;
    904904                }
    905905                computeInv((ideal&)I,initialForm,*gamma);
     
    995995        for(int ii=0;ii<ddineq->rowsize;ii++)
    996996        {
    997                 intvec *ivPos = new intvec(this->numVars);
     997                int64vec *ivPos = new int64vec(this->numVars);
    998998                for(int jj=0;jj<this->numVars;jj++)
    999999                        (*ivPos)[jj]=(int)mpq_get_d(ddineq->matrix[ii][jj+1]);
     
    10021002                for(int jj=0;jj<this->numVars;jj++)
    10031003                {
    1004                         intvec *ivCanonical = new intvec(this->numVars);
     1004                        int64vec *ivCanonical = new int64vec(this->numVars);
    10051005                        jj==0 ? (*ivCanonical)[ivPos->length()-1]=1 : (*ivCanonical)[jj-1]=1;
    10061006                        if(dotProduct(*ivCanonical,*ivPos)!=0)
     
    10531053        for (int kk = 0; kk<ddrows; kk++)
    10541054        {
    1055                 int ggT=1;//NOTE Why does (int)mpq_get_d(ddineq->matrix[kk][1]) not work?
    1056                 intvec *load = new intvec(this->numVars);//intvec to store a single facet normal that will then be stored via setFacetNormal
     1055                int64 ggT=1;//NOTE Why does (int)mpq_get_d(ddineq->matrix[kk][1]) not work?
     1056                int64vec *load = new int64vec(this->numVars);//int64vec to store a single facet normal that will then be stored via setFacetNormal
    10571057                for (int jj = 1; jj <ddcols; jj++)
    10581058                {
    10591059                        double foo;
    10601060                        foo = mpq_get_d(ddineq->matrix[kk][jj]);
    1061                         (*load)[jj-1] = (int)foo;       //store typecasted entry at pos jj-1 of load
    1062                         ggT = intgcd(ggT,(int&)foo);
     1061                        (*load)[jj-1] = (int64)foo;     //store typecasted entry at pos jj-1 of load
     1062                        ggT = intgcd(ggT,(int64&)foo);
    10631063                }//for (int jj = 1; jj <ddcols; jj++)
    10641064                if(ggT>1)
     
    10761076                        for(int jj = 0; jj<load->length(); jj++)
    10771077                        {
    1078 //                              intvec *ivCanonical = new intvec(load->length());
     1078//                              int64vec *ivCanonical = new int64vec(load->length());
    10791079//                              (*ivCanonical)[jj]=1;
    10801080//                              if (dotProduct(*load,*ivCanonical)<0)   
     
    11691169        if (compIntPoint==TRUE)
    11701170        {
    1171                 intvec *iv = new intvec(this->numVars);
     1171                int64vec *iv = new int64vec(this->numVars);
    11721172                dd_MatrixPtr posRestr=dd_CreateMatrix(this->numVars,this->numVars+1);
    11731173                int jj=1;
     
    12571257                                codim2Act = codim2Act->next;
    12581258                        }
    1259                         intvec *n = new intvec(this->numVars);
     1259                        int64vec *n = new int64vec(this->numVars);
    12601260#ifdef gfanp
    12611261                        timeval t_mI_start, t_mI_end;
     
    12821282                */
    12831283                //TODO It might be faster to compute jus the implied equations instead of a relative interior point
    1284 //              intvec *iv_intPoint = new intvec(this->numVars);
     1284//              int64vec *iv_intPoint = new int64vec(this->numVars);
    12851285//              dd_MatrixPtr shiftMatrix;
    12861286//              dd_MatrixPtr intPointMatrix;
     
    13591359* Figuring out whether a ray belongs to a given facet(normal) is done by
    13601360* checking whether the inner product of the ray with the normal is zero.
    1361 * We use ivAdd here which returns a new intvec. Therefore we need to avoid
     1361* We use ivAdd here which returns a new int64vec. Therefore we need to avoid
    13621362* a memory leak which would be cause by the line
    13631363* iv=ivAdd(iv,b)
     
    14091409#endif
    14101410        /* Compute interior point on the fly*/
    1411         intvec *ivIntPointOfCone = new intvec(this->numVars);
     1411        int64vec *ivIntPointOfCone = new int64vec(this->numVars);
    14121412        mpq_t *colSum = new mpq_t[this->numVars];
    14131413        int denom[this->numVars];//denominators of colSum
    14141414        //NOTE TODO need to gcd of rows and factor out! -> makeInt
    1415         for(int jj=0;jj<this->numVars;jj++)
     1415        /*for(int jj=0;jj<this->numVars;jj++)
    14161416        {
    14171417                mpq_init(colSum[jj]);           
     
    14491449        mpz_clear(kgV);
    14501450        mpz_clear(den);
    1451         mpz_clear(tmp);
    1452         int ggT=(*ivIntPointOfCone)[0];
     1451        mpz_clear(tmp);*/
     1452        for(int ii=0;ii<P->rowsize;ii++)
     1453        {
     1454                int64vec *foo = new int64vec(this->numVars);
     1455                int64vec *tmp = ivIntPointOfCone;
     1456                makeInt(P,ii+1,*foo);
     1457                ivIntPointOfCone = iv64Add(ivIntPointOfCone,foo);
     1458                delete tmp;
     1459                delete foo;
     1460        }
     1461        int64 ggT=(*ivIntPointOfCone)[0];
    14531462        for (int ii=0;ii<(this->numVars);ii++)
    14541463        {
    1455                 mpq_t product;
    1456                 mpq_init(product);
    1457                 mpq_mul(product,qkgV,colSum[ii]);
    1458                 (*ivIntPointOfCone)[ii]=(int)mpz_get_d(mpq_numref(product));
    1459                 mpq_clear(product);
     1464//              mpq_t product;
     1465//              mpq_init(product);
     1466//              mpq_mul(product,qkgV,colSum[ii]);
     1467//              (*ivIntPointOfCone)[ii]=(int64)mpz_get_d(mpq_numref(product));
     1468                if( (*ivIntPointOfCone)[ii]>INT_MAX )
     1469                        WarnS("Interior point exceeds INT_MAX!\n");
     1470//              mpq_clear(product);
    14601471                //Compute intgcd
    14611472                ggT=intgcd(ggT,(*ivIntPointOfCone)[ii]);
    14621473        }
     1474       
    14631475        //Divide out a common gcd > 1
    14641476        if(ggT>1)
    14651477        {
    14661478                for(int ii=0;ii<this->numVars;ii++)
     1479                {
    14671480                        (*ivIntPointOfCone)[ii] /= ggT;
    1468         }
    1469         mpq_clear(qkgV);
     1481                        if( (*ivIntPointOfCone)[ii]>INT_MAX ) WarnS("Interior point still exceeds INT_MAX after GCD!\n");
     1482                }
     1483        }
     1484//      mpq_clear(qkgV);
    14701485        delete [] colSum;
    14711486        /*For homogeneous input (like Det3,3,5) the int points may be negative. So add a suitable multiple of (1,_,1)*/
    14721487        if(hasHomInput==TRUE && iv64isStrictlyPositive(ivIntPointOfCone)==FALSE)
    14731488        {
    1474                 intvec *ivOne = new intvec(this->numVars);
     1489                int64vec *ivOne = new int64vec(this->numVars);
    14751490                int maxNegEntry=0;
    14761491                for(int ii=0;ii<this->numVars;ii++)
     
    14831498                for(int ii=0;ii<this->numVars;ii++)
    14841499                        (*ivOne)[ii]=maxNegEntry;
    1485                 intvec *tmp=ivIntPointOfCone;
    1486                 ivIntPointOfCone=ivAdd(ivIntPointOfCone,ivOne);
     1500                int64vec *tmp=ivIntPointOfCone;
     1501                ivIntPointOfCone=iv64Add(ivIntPointOfCone,ivOne);
    14871502                delete(tmp);
    14881503//              while( !iv64isStrictlyPositive(ivIntPointOfCone) )
    14891504//              {
    1490 //                      intvec *tmp = ivIntPointOfCone;
     1505//                      int64vec *tmp = ivIntPointOfCone;
    14911506//                      for(int jj=0;jj<this->numVars;jj++)
    14921507//                              (*ivOne)[jj] = (*ivOne)[jj] << 1; //times 2
     
    14951510//              }
    14961511                delete ivOne;
    1497                 int ggT=(*ivIntPointOfCone)[0];
     1512                int64 ggT=(*ivIntPointOfCone)[0];
    14981513                for(int ii=0;ii<this->numVars;ii++)
    14991514                        ggT=intgcd( ggT, (*ivIntPointOfCone)[ii]);
     
    15141529        facet *fAct=gc.facetPtr;
    15151530        //Construct an array to hold the extremal rays of the cone
    1516         this->gcRays = (intvec**)omAlloc0(sizeof(intvec*)*P->rowsize); 
     1531        this->gcRays = (int64vec**)omAlloc0(sizeof(int64vec*)*P->rowsize);     
    15171532        for(int ii=0;ii<P->rowsize;ii++)
    15181533        {
    1519                 intvec *rowvec = new intvec(this->numVars);
     1534                int64vec *rowvec = new int64vec(this->numVars);
    15201535                makeInt(P,ii+1,*rowvec);//get an integer entry instead of rational, rowvec is primitve
    1521                 this->gcRays[ii] = ivCopy(rowvec);
     1536                this->gcRays[ii] = iv64Copy(rowvec);
    15221537                delete rowvec;
    15231538        }       
     
    15261541        while(fAct!=NULL)
    15271542        {
    1528                 const intvec *fNormal;// = new intvec(this->numVars);
     1543                const int64vec *fNormal;// = new int64vec(this->numVars);
    15291544                fNormal = fAct->getRef2FacetNormal();//->getFacetNormal();
    1530                 intvec *ivIntPointOfFacet = new intvec(this->numVars);
     1545                int64vec *ivIntPointOfFacet = new int64vec(this->numVars);
    15311546                for(int ii=0;ii<rows;ii++)
    15321547                {                       
    15331548                        if(dotProduct(*fNormal,this->gcRays[ii])==0)
    15341549                        {
    1535                                 intvec *tmp = ivIntPointOfFacet;//Prevent memleak
     1550                                int64vec *tmp = ivIntPointOfFacet;//Prevent memleak
    15361551                                fAct->numCodim2Facets++;
    15371552                                facet *codim2Act;
     
    15471562                                }
    15481563                                //codim2Act->setFacetNormal(rowvec);
    1549                                 //Rather just let codim2Act point to the corresponding intvec of gcRays
     1564                                //Rather just let codim2Act point to the corresponding int64vec of gcRays
    15501565                                codim2Act->fNormal=this->gcRays[ii];
    15511566                                fAct->numRays++;                                 
    15521567                                //Memleak avoided via tmp
    1553                                 ivIntPointOfFacet=ivAdd(ivIntPointOfFacet,this->gcRays[ii]);
     1568                                ivIntPointOfFacet=iv64Add(ivIntPointOfFacet,this->gcRays[ii]);
    15541569                                //Now tmp still points to the OLD address of ivIntPointOfFacet
    15551570                                delete(tmp);
     
    15621577                if( !iv64isStrictlyPositive(ivIntPointOfFacet) && hasHomInput==TRUE)
    15631578                {
    1564                         intvec *ivOne = new intvec(this->numVars);
     1579                        int64vec *ivOne = new int64vec(this->numVars);
    15651580                        for(int ii=0;ii<this->numVars;ii++)
    15661581                                (*ivOne)[ii]=1;
    15671582                        while( !iv64isStrictlyPositive(ivIntPointOfFacet) )
    15681583                        {
    1569                                 intvec *tmp = ivIntPointOfFacet;
     1584                                int64vec *tmp = ivIntPointOfFacet;
    15701585                                for(int jj=0;jj<this->numVars;jj++)
    15711586                                {
    15721587                                        (*ivOne)[jj] = (*ivOne)[jj] << 1; //times 2
    15731588                                }
    1574                                 ivIntPointOfFacet = ivAdd(ivIntPointOfFacet/*diff*/,ivOne);
     1589                                ivIntPointOfFacet = iv64Add(ivIntPointOfFacet/*diff*/,ivOne);
    15751590                                delete tmp;                             
    15761591                        }
    15771592                        delete ivOne;
    15781593                }
    1579                 int ggT=(*ivIntPointOfFacet)[0];
     1594                int64 ggT=(*ivIntPointOfFacet)[0];
    15801595                for(int ii=0;ii<this->numVars;ii++)
    15811596                        ggT=intgcd(ggT,(*ivIntPointOfFacet)[ii]);
     
    16441659//                      while(codim2Act!=NULL)
    16451660//                      {
    1646 //                              intvec *rayvec;
     1661//                              int64vec *rayvec;
    16471662//                              rayvec = codim2Act->getFacetNormal();//Mind this is no normal but a ray!
    16481663//                              //int negCtr=0;
     
    16691684}               
    16701685       
    1671 inline bool gcone::iv64isStrictlyPositive(const intvec * iv64)
     1686inline bool gcone::iv64isStrictlyPositive(const int64vec * iv64)
    16721687{
    16731688        bool res=TRUE;
     
    17021717        gettimeofday(&start, 0);
    17031718#endif         
    1704         intvec *fNormal;// = new intvec(this->numVars); //facet normal, check for parallelity                   
     1719        int64vec *fNormal;// = new int64vec(this->numVars);     //facet normal, check for parallelity                   
    17051720        fNormal = f->getFacetNormal();  //read this->fNormal;
    17061721#ifdef gfan_DEBUG
     
    17391754        if( (srcRing->order[0]!=ringorder_a))
    17401755        {
    1741                 intvec *iv;// = new intvec(this->numVars);
    1742                 iv = ivNeg(fNormal);//ivNeg uses ivCopy -> new
     1756                int64vec *iv;// = new int64vec(this->numVars);
     1757                iv = ivNeg(fNormal);//ivNeg uses iv64Copy -> new
    17431758//              tmpRing=rCopyAndAddWeight(srcRing,ivNeg(fNormal));
    17441759                tmpRing=rCopyAndAddWeight(srcRing,iv);
     
    19471962        dd_FreeMatrix(posRestr);
    19481963
    1949         intvec *iv_weight = new intvec(this->numVars);
     1964        int64vec *iv_weight = new int64vec(this->numVars);
    19501965#ifdef gfanp
    19511966        timeval t_dd_start, t_dd_end;
     
    19751990        for(int ii=0;ii<P->rowsize;ii++)
    19761991        {
    1977                 intvec *iv_row=new intvec(this->numVars);
     1992                int64vec *iv_row=new int64vec(this->numVars);
    19781993                makeInt(P,ii+1,*iv_row);
    19791994                iv_weight =ivAdd(iv_weight, iv_row);
     
    20752090        gettimeofday(&start, 0);
    20762091#endif
    2077         const intvec *fNormal;
     2092        const int64vec *fNormal;
    20782093        fNormal = f->getRef2FacetNormal();/*->getFacetNormal();*/       //read this->fNormal;
    20792094#ifdef gfan_DEBUG
     
    20932108        ring tmpRing;
    20942109       
    2095         const intvec *intPointOfFacet;
     2110        const int64vec *intPointOfFacet;
    20962111        intPointOfFacet=f->getInteriorPoint();
    20972112        //Now we need two blocks of ringorder_a!
    20982113        //May assume the same situation as in flip() here                       
    2099         if( (srcRing->order[0]!=ringorder_a) && (srcRing->order[1]!=ringorder_a) )
    2100         {
    2101                 intvec *iv = new intvec(this->numVars);//init with 1s, since we do not need a 2nd block here but later
    2102 //              intvec *iv_foo = new intvec(this->numVars,1);//placeholder
    2103                 intvec *ivw = ivNeg(fNormal);           
     2114        if( (srcRing->order[0]!=ringorder_a/*64*/) && (srcRing->order[1]!=ringorder_a/*64*/) )
     2115        {
     2116                int64vec *iv = new int64vec(this->numVars);//init with 1s, since we do not need a 2nd block here but later
     2117//              int64vec *iv_foo = new int64vec(this->numVars,1);//placeholder
     2118                int64vec *ivw = ivNeg(const_cast<int64vec*>(fNormal));         
    21042119                tmpRing=rCopyAndAddWeight2(srcRing,ivw/*intPointOfFacet*/,iv);
    21052120                delete iv;delete ivw;
    21062121//              delete iv_foo;
    21072122        }
    2108         else
    2109         {
    2110                 intvec *iv=new intvec(this->numVars);
    2111                 intvec *ivw=ivNeg(fNormal);
     2123        else 
     2124        {
     2125                int64vec *iv=new int64vec(this->numVars);
     2126                int64vec *ivw=ivNeg(const_cast<int64vec*>(fNormal));
    21122127                tmpRing=rCopyAndAddWeight2(srcRing,ivw,iv);
    21132128                delete iv; delete ivw;
     
    21692184        int *A1=(int *)omAlloc0(length*sizeof(int));
    21702185        int *A2=(int *)omAlloc0(length*sizeof(int));
    2171         const intvec *ivw=f->getRef2FacetNormal();
     2186        const int64vec *ivw=f->getRef2FacetNormal();
    21722187        for(int jj=0;jj<length;jj++)
    21732188        {
     
    22292244 * and in gcone::flip for obvious reasons.
    22302245*/
    2231 inline void gcone::computeInv(const ideal &gb, ideal &initialForm, const intvec &fNormal)
     2246inline void gcone::computeInv(const ideal &gb, ideal &initialForm, const int64vec &fNormal)
    22322247{
    22332248#ifdef gfanp
     
    22442259                while(pNext(aktpoly)!=NULL)     /*loop trough terms and check for parallelity*/
    22452260                {
    2246                         intvec *check = new intvec(this->numVars);
     2261                        int64vec *check = new int64vec(this->numVars);
    22472262                        aktpoly=pNext(aktpoly); //next term
    22482263//                      pSetm(aktpoly);
    22492264                        int *v=(int *)omAlloc((this->numVars+1)*sizeof(int));
    22502265                        pGetExpV(aktpoly,v);           
    2251                         /* Convert (int)v into (intvec)check */                 
     2266                        /* Convert (int)v into (int64vec)check */                       
    22522267                        for (int jj=0;jj<this->numVars;jj++)
    22532268                        {
     
    22552270                        }
    22562271                        if (isParallel(*check,fNormal)) //pass *check when
    2257 //                      if(isParallel((const intvec*)&check,(const intvec*)&fNormal))
     2272//                      if(isParallel((const int64vec*)&check,(const int64vec*)&fNormal))
    22582273//                      if(fNormal.compare(check)==0)
    22592274                        {
     
    23352350        for(int ii=0;ii<ddineq->rowsize;ii++)
    23362351        {
    2337                 intvec *iv = new intvec(this->numVars);
    2338                 intvec *ivNull = new intvec(this->numVars);//Needed for intvec64::compare(*intvec)
     2352                int64vec *iv = new int64vec(this->numVars);
     2353                int64vec *ivNull = new int64vec(this->numVars);//Needed for intvec64::compare(*int64vec)
    23392354                int posCtr=0;
    23402355                for(int jj=0;jj<this->numVars;jj++)
     
    23632378//      for(int ii=0;ii<num_newRows-1;ii++)
    23642379//      {
    2365 //              intvec *iv = new intvec(this->numVars);//1st vector to check against
     2380//              int64vec *iv = new int64vec(this->numVars);//1st vector to check against
    23662381//              for(int jj=0;jj<this->numVars;jj++)
    23672382//                      (*iv)[jj]=(int)mpq_get_d(ddineq->matrix[ii][jj+1]);
    23682383//              for(int jj=ii+1;jj</*ddineq->rowsize*/num_newRows;jj++)
    23692384//              {
    2370 //                      intvec *ivCheck = new intvec(this->numVars);//Checked against iv
     2385//                      int64vec *ivCheck = new int64vec(this->numVars);//Checked against iv
    23712386//                      for(int kk=0;kk<this->numVars;kk++)
    23722387//                              (*ivCheck)[kk]=(int)mpq_get_d(ddineq->matrix[jj][kk+1]);
     
    24192434}//void getGB
    24202435               
    2421 /** \brief Compute the negative of a given intvec
     2436/** \brief Compute the negative of a given int64vec
    24222437        */             
    2423 static intvec* ivNeg(const intvec *iv)
    2424 {       //Hm, switching to intvec const intvec does no longer work
    2425         intvec *res;// = new intvec(iv->length());
    2426         res=ivCopy(iv);
     2438static int64vec* ivNeg(/*const*/int64vec *iv)
     2439{       //Hm, switching to int64vec const int64vec does no longer work
     2440        int64vec *res;// = new int64vec(iv->length());
     2441        res=iv64Copy(iv);
    24272442        *res *= (int)-1;                                               
    24282443        return res;
     
    24332448*
    24342449*/
    2435 static int dotProduct(const intvec &iva, const intvec &ivb)                             
     2450static int dotProduct(const int64vec &iva, const int64vec &ivb)                         
    24362451{                       
    24372452        int res=0;     
     
    24392454        {
    24402455// #ifndef NDEBUG
    2441 //      (const_cast<intvec*>(&iva))->show(1,0); (const_cast<intvec*>(&ivb))->show(1,0);
     2456//      (const_cast<int64vec*>(&iva))->show(1,0); (const_cast<int64vec*>(&ivb))->show(1,0);
    24422457// #endif
    24432458                res = res+(iva[i]*ivb[i]);
     
    24492464 * \f$ \alpha\parallel\beta\Leftrightarrow\langle\alpha,\beta\rangle^2=\langle\alpha,\alpha\rangle\langle\beta,\beta\rangle \f$
    24502465 */
    2451 static bool isParallel(const intvec &a,const intvec &b)
     2466static bool isParallel(const int64vec &a,const int64vec &b)
    24522467{       
    24532468/*#ifdef gfanp 
     
    24762491
    24772492/** \brief Compute an interior point of a given cone
    2478  * Result will be written into intvec iv.
     2493 * Result will be written into int64vec iv.
    24792494 * Any rational point is automatically converted into an integer.
    24802495 */
    2481 void gcone::interiorPoint( dd_MatrixPtr &M, intvec &iv) //no const &M here since we want to remove redundant rows
     2496void gcone::interiorPoint( dd_MatrixPtr &M, int64vec &iv) //no const &M here since we want to remove redundant rows
    24822497{
    24832498        dd_LPPtr lp,lpInt;
     
    26022617//      facet *f1 = this->facetPtr;
    26032618//      facet *f2 = NULL;
    2604 //      intvec *intF1=NULL;
     2619//      int64vec *intF1=NULL;
    26052620//      while(f1!=NULL)
    26062621//      {
     
    26102625//                      while(f1Ray!=NULL)
    26112626//                      {
    2612 //                              const intvec *check=f1Ray->getRef2FacetNormal();
     2627//                              const int64vec *check=f1Ray->getRef2FacetNormal();
    26132628//                              if(iv64isStrictlyPositive(check))
    26142629//                              {
    2615 //                                      intF1=ivCopy(check);
     2630//                                      intF1=iv64Copy(check);
    26162631//                                      break;
    26172632//                              }                               
     
    26292644//      if(intF1==NULL && hasHomInput==TRUE)
    26302645//      {
    2631 //              intF1 = new intvec(this->numVars);
     2646//              intF1 = new int64vec(this->numVars);
    26322647//              for(int ii=0;ii<this->numVars;ii++)
    26332648//                      (*intF1)[ii]=1;
    26342649//      }
    26352650//      assert(f1); assert(f2);
    2636 //      intvec *intF2=f2->getInteriorPoint();
     2651//      int64vec *intF2=f2->getInteriorPoint();
    26372652//      mpq_t *qPosRay = new mpq_t[this->numVars];//The positive ray from above
    26382653//      mpq_t *qIntPt = new mpq_t[this->numVars];//starting vector a+((b-a)/2)
     
    27282743//                             
    27292744//      mpq_set_num(qkgV,kgV);
    2730 //      intvec *n=new intvec(this->numVars);
     2745//      int64vec *n=new int64vec(this->numVars);
    27312746//      for (int ii=0;ii<this->numVars;ii++)
    27322747//      {
     
    27482763 *
    27492764 */
    2750 ring gcone::rCopyAndAddWeight(const ring &r, intvec *ivw)                               
     2765ring gcone::rCopyAndAddWeight(const ring &r, int64vec *ivw)                             
    27512766{
    27522767        ring res=rCopy0(r);
     
    27542769                       
    27552770        omFree(res->order);
    2756         res->order =(int *)omAlloc0(4*sizeof(int));
     2771        res->order =(int *)omAlloc0(4*sizeof(int/*64*/));
    27572772        omFree(res->block0);
    2758         res->block0=(int *)omAlloc0(4*sizeof(int));
     2773        res->block0=(int *)omAlloc0(4*sizeof(int/*64*/));
    27592774        omFree(res->block1);
    2760         res->block1=(int *)omAlloc0(4*sizeof(int));
     2775        res->block1=(int *)omAlloc0(4*sizeof(int/*64*/));
    27612776        omfree(res->wvhdl);
    2762         res->wvhdl =(int **)omAlloc0(4*sizeof(int**));
     2777        res->wvhdl =(int **)omAlloc0(4*sizeof(int/*64*/**));
    27632778                       
    2764         res->order[0]=ringorder_a;
     2779        res->order[0]=ringorder_a/*64*/;
    27652780        res->block0[0]=1;
    2766         res->block1[0]=res->N;;
     2781        res->block1[0]=res->N;
    27672782        res->order[1]=ringorder_dp;     //basically useless, since that should never be used                   
    27682783        res->block0[1]=1;
    2769         res->block1[1]=res->N;;
     2784        res->block1[1]=res->N;
    27702785        res->order[2]=ringorder_C;
    27712786
    27722787        int length=ivw->length();
    2773         int *A=(int *)omAlloc0(length*sizeof(int));
     2788        int/*64*/ *A=(int/*64*/ *)omAlloc0(length*sizeof(int/*64*/));
    27742789        for (jj=0;jj<length;jj++)
    27752790        {                               
    2776                 A[jj]=(*ivw)[jj];                               
     2791                A[jj]=(*ivw)[jj];
     2792                if(A[jj]>=INT_MAX) WarnS("A[jj] exceeds INT_MAX in gcone::rCopyAndAddWeight!\n");
    27772793        }                       
    27782794        res->wvhdl[0]=(int *)A;
     
    27832799}//rCopyAndAdd
    27842800               
    2785 ring gcone::rCopyAndAddWeight2(const ring &r,const intvec *ivw, const intvec *fNormal)                         
     2801ring gcone::rCopyAndAddWeight2(const ring &r,const int64vec *ivw, const int64vec *fNormal)                             
    27862802{
    27872803        ring res=rCopy0(r);
    27882804                       
    27892805        omFree(res->order);
    2790         res->order =(int *)omAlloc0(5*sizeof(int));
     2806        res->order =(int *)omAlloc0(5*sizeof(int/*64*/));
    27912807        omFree(res->block0);
    2792         res->block0=(int *)omAlloc0(5*sizeof(int));
     2808        res->block0=(int *)omAlloc0(5*sizeof(int/*64*/));
    27932809        omFree(res->block1);
    2794         res->block1=(int *)omAlloc0(5*sizeof(int));
     2810        res->block1=(int *)omAlloc0(5*sizeof(int/*64*/));
    27952811        omfree(res->wvhdl);
    2796         res->wvhdl =(int **)omAlloc0(5*sizeof(int**));
     2812        res->wvhdl =(int **)omAlloc0(5*sizeof(int/*64*/**));
    27972813                       
    2798         res->order[0]=ringorder_a;
     2814        res->order[0]=ringorder_a/*64*/;
    27992815        res->block0[0]=1;
    28002816        res->block1[0]=res->N;
    2801         res->order[1]=ringorder_a;
     2817        res->order[1]=ringorder_a/*64*/;
    28022818        res->block0[1]=1;
    28032819        res->block1[1]=res->N;
     
    28102826
    28112827        int length=ivw->length();
    2812         int *A1=(int *)omAlloc0(length*sizeof(int));
    2813         int *A2=(int *)omAlloc0(length*sizeof(int));
     2828        int/*64*/ *A1=(int/*64*/ *)omAlloc0(length*sizeof(int/*64*/));
     2829        int/*64*/ *A2=(int/*64*/ *)omAlloc0(length*sizeof(int/*64*/));
    28142830        for (int jj=0;jj<length;jj++)
    28152831        {                               
    28162832                A1[jj]=(*ivw)[jj];
    28172833                A2[jj]=-(*fNormal)[jj];
     2834                if(A1[jj]>=INT_MAX || A2[jj]>=INT_MAX) WarnS("A[jj] exceeds INT_MAX in gcone::rCopyAndAddWeight2!\n");
    28182835        }                       
    28192836        res->wvhdl[0]=(int *)A1;
     
    28262843               
    28272844//NOTE not needed anywhere
    2828 // ring rCopyAndChangeWeight(ring const &r, intvec *ivw)
     2845// ring rCopyAndChangeWeight(ring const &r, int64vec *ivw)
    28292846// {
    28302847//      ring res=rCopy0(currRing);
     
    28472864/** \brief Check for equality of two intvecs
    28482865 */
    2849 static bool ivAreEqual(const intvec &a, const intvec &b)
     2866static bool ivAreEqual(const int64vec &a, const int64vec &b)
    28502867{
    28512868        bool res=TRUE;
     
    29802997 * Compute gcBasis and facets for the arbitrary starting cone. Store \f$(codim-1)\f$-facets as normals.
    29812998 * In order to represent a facet uniquely compute also the \f$(codim-2)\f$-facets and norm by the gcd of the components.
    2982  * Keep a list of facets as a linked list containing an intvec and an integer matrix.
     2999 * Keep a list of facets as a linked list containing an int64vec and an integer matrix.
    29833000 * Since a \f$(codim-1)\f$-facet belongs to exactly two full dimensional cones, we remove a facet from the list as
    29843001 * soon as we compute this facet again. Comparison of facets is done by...
     
    30543071#else
    30553072                        /*End of shallow copy*/
    3056                         intvec *fNormal;
     3073                        int64vec *fNormal;
    30573074                        fNormal = fAct->getFacetNormal();
    30583075                        if( ii==0 || (ii>0 && SearchListAct==NULL) ) //1st facet may be non-flippable
     
    30703087                        SearchListAct->isFlippable=TRUE;
    30713088                        //Copy int point as well
    3072                         intvec *ivIntPt;// = new intvec(this->numVars);
     3089                        int64vec *ivIntPt;// = new int64vec(this->numVars);
    30733090                        ivIntPt = fAct->getInteriorPoint();
    30743091                        SearchListAct->setInteriorPoint(ivIntPt);
     
    30873104//                      for(int jj=0;jj<fAct->numRays-1;jj++)
    30883105                        {
    3089                                 intvec *f2Normal;
     3106                                int64vec *f2Normal;
    30903107                                f2Normal = codim2Act->getFacetNormal();
    30913108                                if(jj==0)
     
    32963313 * We compute the lcm of the denominators and multiply with this to get integer values.
    32973314 * If the gcd of the nominators > 1 we divide by the gcd => primitive vector.
    3298  * Expects a new intvec as 3rd parameter
    3299  * \param dd_MatrixPtr,intvec
     3315 * Expects a new int64vec as 3rd parameter
     3316 * \param dd_MatrixPtr,int64vec
    33003317 */
    3301 void gcone::makeInt(const dd_MatrixPtr &M, const int line, intvec &n)
     3318void gcone::makeInt(const dd_MatrixPtr &M, const int line, int64vec &n)
    33023319{                       
    33033320//      mpz_t denom[this->numVars];
     
    33463363        {
    33473364                mpq_mul(res,qkgV,M->matrix[line-1][ii+1]);
    3348                 n[ii]=(int)mpz_get_d(mpq_numref(res));
     3365                n[ii]=(int64)mpz_get_d(mpq_numref(res));
    33493366//              ggT=intgcd(ggT,n[ii]);
    33503367        }
    3351         int ggT=n[0];
     3368        int64 ggT=n[0];
    33523369        for(int ii=0;ii<this->numVars;ii++)
    33533370                ggT=intgcd(ggT,n[ii]); 
     
    33793396//      while(fAct!=NULL)
    33803397//      {
    3381 //              intvec *fNormal;
     3398//              int64vec *fNormal;
    33823399//              fNormal = fAct->getFacetNormal();
    33833400//              int *ggT = new int;
     
    33893406//              if(*ggT>1)//We only need to do this if the ggT is non-trivial
    33903407//              {
    3391 // //                   intvec *fCopy = fAct->getFacetNormal();
     3408// //                   int64vec *fCopy = fAct->getFacetNormal();
    33923409//                      for(int ii=0;ii<this->numVars;ii++)
    33933410//                              (*fNormal)[ii] = ((*fNormal)[ii])/(*ggT);
     
    33993416//              while(codim2Act!=NULL)
    34003417//              {                               
    3401 //                      intvec *n;
     3418//                      int64vec *n;
    34023419//                      n=codim2Act->getFacetNormal();
    34033420//                      int *ggT=new int;
     
    34843501                if(fAct->isFlippable==TRUE)
    34853502                {
    3486                         intvec *fNormal=NULL;
     3503                        int64vec *fNormal=NULL;
    34873504                        fNormal=fAct->getFacetNormal();                 
    34883505                        slAct = slHead;
     
    35163533                        while(slAct!=NULL)
    35173534                        {
    3518                                 intvec *slNormal=NULL;
     3535                                int64vec *slNormal=NULL;
    35193536                                removalOccured=FALSE;
    35203537                                slNormal = slAct->getFacetNormal();
     
    35993616                                slEnd->prev = marker;
    36003617                                //Copy codim2-facets
    3601                                 //intvec *f2Normal=new intvec(this->numVars);
     3618                                //int64vec *f2Normal=new int64vec(this->numVars);
    36023619                                while(f2Act!=NULL)
    36033620                                {
    3604                                         intvec *f2Normal;
     3621                                        int64vec *f2Normal;
    36053622                                        f2Normal=f2Act->getFacetNormal();
    36063623                                        if(slEndCodim2Root==NULL)
     
    37883805        /*We assume we have (a(),a(),dp) here*/
    37893806        omFree(replacementRing->order);
    3790         replacementRing->order =(int *)omAlloc0(4*sizeof(int));
     3807        replacementRing->order =(int *)omAlloc0(4*sizeof(int/*64*/));
    37913808        omFree(replacementRing->block0);
    3792         replacementRing->block0=(int *)omAlloc0(4*sizeof(int));
     3809        replacementRing->block0=(int *)omAlloc0(4*sizeof(int/*64*/));
    37933810        omFree(replacementRing->block1);
    3794         replacementRing->block1=(int *)omAlloc0(4*sizeof(int));
     3811        replacementRing->block1=(int *)omAlloc0(4*sizeof(int/*64*/));
    37953812        omfree(replacementRing->wvhdl);
    3796         replacementRing->wvhdl =(int **)omAlloc0(4*sizeof(int**));
     3813        replacementRing->wvhdl =(int **)omAlloc0(4*sizeof(int/*64*/**));
    37973814                       
    3798         replacementRing->order[0]=ringorder_a;
     3815        replacementRing->order[0]=ringorder_a/*64*/;
    37993816        replacementRing->block0[0]=1;
    38003817        replacementRing->block1[0]=replacementRing->N;
     
    38063823        replacementRing->order[2]=ringorder_C;
    38073824
    3808         intvec *ivw = this->getIntPoint();
    3809 //      assert(this->ivIntPt);
     3825        int64vec *ivw = this->getIntPoint();
     3826//      assert(this->ivIntPt); 
    38103827        int length=ivw->length();       
    3811         int *A=(int *)omAlloc0(length*sizeof(int));
     3828        int/*64*/ *A=(int/*64*/ *)omAlloc0(length*sizeof(int/*64*/));
    38123829        for (int jj=0;jj<length;jj++)
     3830        {
    38133831                A[jj]=(*ivw)[jj];
     3832                if(A[jj]>=INT_MAX) WarnS("A[jj] exceeds INT_MAX in gcone::replaceDouble_ringorder_a_ByASingleOne!\n");
     3833        }       
    38143834        delete ivw;
    38153835        replacementRing->wvhdl[0]=(int *)A;
     
    38313851/** \brief Compute the gcd of two ints
    38323852 */
    3833 static int intgcd(const int &a, const int &b)
     3853static int intgcd(const int64 &a, const int64 &b)
    38343854{
    38353855        int r, p=a, q=b;
     
    38673887//      while(fAct!=NULL)
    38683888//      {
    3869 //              intvec *comp;
     3889//              int64vec *comp;
    38703890//              comp = fAct->getFacetNormal();
    38713891//              for(int ii=0;ii<this->numVars;ii++)
     
    39433963                while(fAct!=NULL)
    39443964                {       
    3945                         const intvec *iv;
     3965                        const int64vec *iv;
    39463966                        iv=fAct->getRef2FacetNormal();//->getFacetNormal();
    39473967                        f2Act=fAct->codim2Ptr;
     
    39603980                        while(f2Act!=NULL)
    39613981                        {
    3962                                 const intvec *iv2;
     3982                                const int64vec *iv2;
    39633983                                iv2=f2Act->getRef2FacetNormal();//->getFacetNormal();   
    39643984                                for(int jj=0;jj<iv2->length();jj++)
     
    40234043                        strweight=line.substr(0,line.find_first_of(")"));
    40244044                                               
    4025                         intvec *iv=new intvec(this->numVars);//                         
     4045                        int64vec *iv=new int64vec(this->numVars);//                     
    40264046                        for(int ii=0;ii<this->numVars;ii++)
    40274047                        {
     
    40344054                       
    40354055                        ring newRing;
    4036                         if(currRing->order[0]!=ringorder_a)
     4056                        if(currRing->order[0]!=ringorder_a/*64*/)
    40374057                        {
    40384058                                        newRing=rCopyAndAddWeight(currRing,iv);
     
    41764196                                found = line.find("\t");
    41774197                                string normalString=line.substr(0,found);
    4178                                 intvec *fN = new intvec(this->numVars);
     4198                                int64vec *fN = new int64vec(this->numVars);
    41794199                                for(int ii=0;ii<this->numVars;ii++)
    41804200                                {
     
    42574277
    42584278                l->m[2].rtyp=INTVEC_CMD;
    4259                 intvec iv=(gcAct->f2M(gcAct,gcAct->facetPtr));//NOTE memleak?
    4260                 l->m[2].data=(void*)ivCopy(&iv);
     4279                int64vec iv=(gcAct->f2M(gcAct,gcAct->facetPtr));//NOTE memleak?
     4280                l->m[2].data=(void*)iv64Copy(&iv);
    42614281               
    42624282                l->m[3].rtyp=LIST_CMD;
     
    42684288                        {
    42694289                                lCodim2List->m[jj].rtyp=INTVEC_CMD;
    4270                                 intvec ivC2=(gcAct->f2M(gcAct,fAct,2));
    4271                                 lCodim2List->m[jj].data=(void*)ivCopy(&ivC2);
     4290                                int64vec ivC2=(gcAct->f2M(gcAct,fAct,2));
     4291                                lCodim2List->m[jj].data=(void*)iv64Copy(&ivC2);
    42724292                                jj++;
    42734293                                fAct = fAct->next;
     
    42874307* f should always point to gc->facetPtr
    42884308* param n is used to determine whether it operates in codim 1 or 2
    4289 * We have to cast the int64vecs to intvec due to issues with list structure
     4309* We have to cast the int64vecs to int64vec due to issues with list structure
    42904310*/
    4291 inline intvec gcone::f2M(gcone *gc, facet *f, int n)
     4311inline int64vec gcone::f2M(gcone *gc, facet *f, int n)
    42924312{
    42934313        facet *fAct;
    4294         intvec *res;//=new intvec(this->numVars);       
     4314        int64vec *res;//=new int64vec(this->numVars);   
    42954315//      int codim=n;
    42964316//      int bound;
     
    42984318        if(n==1)
    42994319        {
    4300                 intvec *m1Res=new intvec(gc->numFacets,gc->numVars,0);
    4301                 res = ivCopy(m1Res);
     4320                int64vec *m1Res=new int64vec(gc->numFacets,gc->numVars,0);
     4321                res = iv64Copy(m1Res);
    43024322                fAct = gc->facetPtr;
    43034323                delete m1Res;
     
    43074327        {
    43084328                fAct = f->codim2Ptr;
    4309                 intvec *m2Res = new intvec(f->numCodim2Facets,gc->numVars,0);
    4310                 res = ivCopy(m2Res);
     4329                int64vec *m2Res = new int64vec(f->numCodim2Facets,gc->numVars,0);
     4330                res = iv64Copy(m2Res);
    43114331                delete m2Res;   
    43124332//              bound = fAct->numCodim2Facets*(this->numVars);
     
    43164336        while(fAct!=NULL )//&& ii < bound )
    43174337        {
    4318                 const intvec *fNormal;
     4338                const int64vec *fNormal;
    43194339                fNormal = fAct->getRef2FacetNormal();//->getFacetNormal();
    43204340                for(int jj=0;jj<this->numVars;jj++)
     
    43344354int gcone::maxSize;
    43354355dd_MatrixPtr gcone::dd_LinealitySpace;
    4336 intvec *gcone::hilbertFunction;
     4356int64vec *gcone::hilbertFunction;
    43374357#ifdef gfanp
    43384358// int gcone::lengthOfSearchList=0;
     
    43584378int gcone::numVars;
    43594379bool gcone::hasHomInput=FALSE;
    4360 intvec *gcone::ivZeroVector;
     4380int64vec *gcone::ivZeroVector;
    43614381// ideal gfan(ideal inputIdeal, int h)
    43624382lists gfan(ideal inputIdeal, int h)
     
    43964416                        {
    43974417                                gcone::hasHomInput=TRUE;
    4398                                 gcone::hilbertFunction=hHstdSeries(inputIdeal,NULL,NULL,NULL,currRing);
     4418//                              gcone::hilbertFunction=hHstdSeries(inputIdeal,NULL,NULL,NULL,currRing);
    43994419                        }
    44004420                        else
    44014421                        {
    4402                                 gcone::ivZeroVector = new intvec(pVariables);
     4422                                gcone::ivZeroVector = new int64vec(pVariables);
    44034423                                for(int ii=0;ii<pVariables;ii++)
    44044424                                        (*gcone::ivZeroVector)[ii]=0;
     
    44514471                        for(int jj=0;jj<5;jj++)
    44524472                        {
    4453                                 intvec *iv=new intvec(pVariables);
     4473                                int64vec *iv=new int64vec(pVariables);
    44544474                                fPtr->setFacetNormal(iv);                               
    44554475                                delete(iv);
Note: See TracChangeset for help on using the changeset viewer.