- Timestamp:
- Mar 29, 2010, 1:36:02 PM (14 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd08f5f0bb3329b8ca19f23b74cb1473686415c3a')
- Children:
- 8ed8139c36ded402f5082052e87ee5a6955cfe5b
- Parents:
- e632baa90bd4ea0b69a79de808abf9f24c50b828
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gfan.cc
re632ba r590f813 145 145 facet::facet(const facet& f) 146 146 { 147 this->fNormal=iv Copy(f.fNormal);147 this->fNormal=iv64Copy(f.fNormal); 148 148 this->UCN=f.UCN; 149 149 this->isFlippable=f.isFlippable; 150 150 //Needed for flip2 151 151 //NOTE ONLY REFERENCE 152 this->interiorPoint=iv Copy(f.interiorPoint);//only referencing is prolly not the best thing to do in a copy constructor152 this->interiorPoint=iv64Copy(f.interiorPoint);//only referencing is prolly not the best thing to do in a copy constructor 153 153 facet* f2Copy; 154 154 f2Copy=f.codim2Ptr; … … 170 170 f2Act->prev = marker; 171 171 } 172 int vec *f2Normal;172 int64vec *f2Normal; 173 173 f2Normal = f2Copy->getFacetNormal(); 174 174 // f2Act->setFacetNormal(f2Copy->getFacetNormal()); … … 186 186 { 187 187 facet *res = new facet(); 188 res->fNormal=(int vec * const)f.fNormal;188 res->fNormal=(int64vec * const)f.fNormal; 189 189 res->UCN=f.UCN; 190 190 res->isFlippable=f.isFlippable; 191 res->interiorPoint=(int vec * const)f.interiorPoint;191 res->interiorPoint=(int64vec * const)f.interiorPoint; 192 192 res->codim2Ptr=(facet * const)f.codim2Ptr; 193 193 res->prev=NULL; … … 249 249 } 250 250 251 inline const int vec *facet::getRef2FacetNormal() const251 inline const int64vec *facet::getRef2FacetNormal() const 252 252 { 253 253 return(this->fNormal); … … 263 263 #endif 264 264 bool res = TRUE; 265 const int vec *fIntP = f->getRef2InteriorPoint();266 const int vec *gIntP = g->getRef2InteriorPoint();265 const int64vec *fIntP = f->getRef2InteriorPoint(); 266 const int64vec *gIntP = g->getRef2InteriorPoint(); 267 267 for(int ii=0;ii<pVariables;ii++) 268 268 { … … 286 286 * If so we check the extremal rays 287 287 * 288 * BEWARE: It would be better to use const int vec* but that will lead to call something like289 * int foo=((int vec*)f2Normal)->compare((intvec*)s2Normal) resulting in much higher memory usage288 * 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 290 290 */ 291 291 static bool areEqual(facet *f, facet *s) … … 299 299 int notParallelCtr=0; 300 300 int ctr=0; 301 const int vec* fNormal; //No new since ivCopy and therefore getFacetNormal return a new302 const int vec* sNormal;301 const int64vec* fNormal; //No new since iv64Copy and therefore getFacetNormal return a new 302 const int64vec* sNormal; 303 303 fNormal = f->getRef2FacetNormal();//->getFacetNormal(); 304 304 sNormal = s->getRef2FacetNormal();//->getFacetNormal(); … … 308 308 // notParallelCtr++; 309 309 // else//parallelity, so we check the codim2-facets 310 int vec *fNRef=const_cast<intvec*>(fNormal);311 int vec *sNRef=const_cast<intvec*>(sNormal);310 int64vec *fNRef=const_cast<int64vec*>(fNormal); 311 int64vec *sNRef=const_cast<int64vec*>(sNormal); 312 312 // if(isParallel(*fNormal,*sNormal)) 313 313 if(isParallel(*fNRef,*sNRef)) … … 320 320 while(f2Act!=NULL) 321 321 { 322 const int vec* f2Normal;322 const int64vec* f2Normal; 323 323 f2Normal = f2Act->getRef2FacetNormal();//->getFacetNormal(); 324 // int vec *f2Ref=const_cast<intvec*>(f2Normal);324 // int64vec *f2Ref=const_cast<int64vec*>(f2Normal); 325 325 s2Act = s->codim2Ptr; 326 326 while(s2Act!=NULL) 327 327 { 328 const int vec* s2Normal;328 const int64vec* s2Normal; 329 329 s2Normal = s2Act->getRef2FacetNormal();//->getFacetNormal(); 330 330 // bool foo=areEqual(f2Normal,s2Normal); 331 // int vec *s2Ref=const_cast<intvec*>(s2Normal);331 // int64vec *s2Ref=const_cast<int64vec*>(s2Normal); 332 332 int foo=f2Normal->compare(s2Normal); 333 333 if(foo==0) … … 356 356 #endif 357 357 return res; 358 // int vec *foo=ivNeg(sNormal);358 // int64vec *foo=ivNeg(sNormal); 359 359 // if(fNormal->compare(foo)!=0) //facet normals 360 360 // { … … 370 370 // while(f2Act!=NULL) 371 371 // { 372 // int vec* f2Normal;372 // int64vec* f2Normal; 373 373 // f2Normal = f2Act->getFacetNormal(); 374 374 // s2Act = s->codim2Ptr; 375 375 // while(s2Act!=NULL) 376 376 // { 377 // int vec* s2Normal;377 // int64vec* s2Normal; 378 378 // s2Normal = s2Act->getFacetNormal(); 379 379 // // bool foo=areEqual(f2Normal,s2Normal); … … 395 395 } 396 396 397 /** Stores the facet normal \param int vec*/398 inline void facet::setFacetNormal(int vec *iv)397 /** Stores the facet normal \param int64vec*/ 398 inline void facet::setFacetNormal(int64vec *iv) 399 399 { 400 400 if(this->fNormal!=NULL) 401 401 delete this->fNormal; 402 this->fNormal = iv Copy(iv);402 this->fNormal = iv64Copy(iv); 403 403 } 404 404 405 405 /** Hopefully returns the facet normal 406 * Mind: iv Copy returns a new intvec, so use this in the following way:407 * int vec *iv;406 * Mind: iv64Copy returns a new int64vec, so use this in the following way: 407 * int64vec *iv; 408 408 * iv = this->getFacetNormal(); 409 409 * [...] 410 410 * delete(iv); 411 411 */ 412 inline int vec *facet::getFacetNormal() const412 inline int64vec *facet::getFacetNormal() const 413 413 { 414 return iv Copy(this->fNormal);414 return iv64Copy(this->fNormal); 415 415 // return this->fNormal; 416 416 } … … 472 472 473 473 /** Store an interior point of the facet */ 474 inline void facet::setInteriorPoint(int vec *iv)474 inline void facet::setInteriorPoint(int64vec *iv) 475 475 { 476 476 if(this->interiorPoint!=NULL) 477 477 delete this->interiorPoint; 478 this->interiorPoint = iv Copy(iv);478 this->interiorPoint = iv64Copy(iv); 479 479 } 480 480 481 481 /** Returns a pointer to this->interiorPoint 482 * MIND: iv Copy returns a new intvec482 * MIND: iv64Copy returns a new int64vec 483 483 * @see facet::getFacetNormal 484 484 */ 485 inline int vec *facet::getInteriorPoint()486 { 487 return iv Copy(this->interiorPoint);488 } 489 490 inline const int vec *facet::getRef2InteriorPoint()485 inline int64vec *facet::getInteriorPoint() 486 { 487 return iv64Copy(this->interiorPoint); 488 } 489 490 inline const int64vec *facet::getRef2InteriorPoint() 491 491 { 492 492 return (this->interiorPoint); … … 500 500 facet *codim2Act; 501 501 codim2Act = this->codim2Ptr; 502 int vec *fNormal;502 int64vec *fNormal; 503 503 fNormal = this->getFacetNormal(); 504 504 printf("=======================\n"); … … 508 508 while(codim2Act!=NULL) 509 509 { 510 int vec *f2Normal;510 int64vec *f2Normal; 511 511 f2Normal = codim2Act->getFacetNormal(); 512 512 printf("(");f2Normal->show(1,0);printf(")\n"); … … 644 644 645 645 /** \brief Set the interior point of a cone */ 646 inline void gcone::setIntPoint(int vec *iv)646 inline void gcone::setIntPoint(int64vec *iv) 647 647 { 648 648 if(this->ivIntPt!=NULL) 649 649 delete this->ivIntPt; 650 this->ivIntPt=iv Copy(iv);650 this->ivIntPt=iv64Copy(iv); 651 651 } 652 652 653 653 /** \brief Returns either a physical copy the interior point of a cone or just a reference to it.*/ 654 inline int vec *gcone::getIntPoint(bool shallow)654 inline int64vec *gcone::getIntPoint(bool shallow) 655 655 { 656 656 if(shallow==TRUE) 657 657 return this->ivIntPt; 658 658 else 659 return iv Copy(this->ivIntPt);659 return iv64Copy(this->ivIntPt); 660 660 } 661 661 … … 677 677 while(f!=NULL) 678 678 { 679 int vec *iv;679 int64vec *iv; 680 680 iv = f->getFacetNormal(); 681 681 printf("(");iv->show(1,0); … … 713 713 while(fAct!=NULL) 714 714 { 715 int vec *fNormal;715 int64vec *fNormal; 716 716 fNormal=fAct->getFacetNormal(); 717 717 printf("(");fNormal->show(1,0); … … 725 725 while(codim2Act!=NULL) 726 726 { 727 int vec *f2Normal;727 int64vec *f2Normal; 728 728 f2Normal = codim2Act->getFacetNormal(); 729 729 printf("(");f2Normal->show(1,0);printf(") "); … … 887 887 */ 888 888 // ideal initialForm=idInit(IDELEMS(I),1); 889 // int vec *gamma=new intvec(this->numVars);889 // int64vec *gamma=new int64vec(this->numVars); 890 890 int falseGammaCounter=0; 891 891 int *redRowsArray=NULL; … … 896 896 ideal initialForm=idInit(IDELEMS(I),1); 897 897 //read row ii into gamma 898 doubletmp;899 int vec *gamma=new intvec(this->numVars);898 int64 tmp; 899 int64vec *gamma=new int64vec(this->numVars); 900 900 for(int jj=1;jj<=this->numVars;jj++) 901 901 { 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; 904 904 } 905 905 computeInv((ideal&)I,initialForm,*gamma); … … 995 995 for(int ii=0;ii<ddineq->rowsize;ii++) 996 996 { 997 int vec *ivPos = new intvec(this->numVars);997 int64vec *ivPos = new int64vec(this->numVars); 998 998 for(int jj=0;jj<this->numVars;jj++) 999 999 (*ivPos)[jj]=(int)mpq_get_d(ddineq->matrix[ii][jj+1]); … … 1002 1002 for(int jj=0;jj<this->numVars;jj++) 1003 1003 { 1004 int vec *ivCanonical = new intvec(this->numVars);1004 int64vec *ivCanonical = new int64vec(this->numVars); 1005 1005 jj==0 ? (*ivCanonical)[ivPos->length()-1]=1 : (*ivCanonical)[jj-1]=1; 1006 1006 if(dotProduct(*ivCanonical,*ivPos)!=0) … … 1053 1053 for (int kk = 0; kk<ddrows; kk++) 1054 1054 { 1055 int ggT=1;//NOTE Why does (int)mpq_get_d(ddineq->matrix[kk][1]) not work?1056 int vec *load = new intvec(this->numVars);//intvec to store a single facet normal that will then be stored via setFacetNormal1055 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 1057 1057 for (int jj = 1; jj <ddcols; jj++) 1058 1058 { 1059 1059 double foo; 1060 1060 foo = mpq_get_d(ddineq->matrix[kk][jj]); 1061 (*load)[jj-1] = (int )foo; //store typecasted entry at pos jj-1 of load1062 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); 1063 1063 }//for (int jj = 1; jj <ddcols; jj++) 1064 1064 if(ggT>1) … … 1076 1076 for(int jj = 0; jj<load->length(); jj++) 1077 1077 { 1078 // int vec *ivCanonical = new intvec(load->length());1078 // int64vec *ivCanonical = new int64vec(load->length()); 1079 1079 // (*ivCanonical)[jj]=1; 1080 1080 // if (dotProduct(*load,*ivCanonical)<0) … … 1169 1169 if (compIntPoint==TRUE) 1170 1170 { 1171 int vec *iv = new intvec(this->numVars);1171 int64vec *iv = new int64vec(this->numVars); 1172 1172 dd_MatrixPtr posRestr=dd_CreateMatrix(this->numVars,this->numVars+1); 1173 1173 int jj=1; … … 1257 1257 codim2Act = codim2Act->next; 1258 1258 } 1259 int vec *n = new intvec(this->numVars);1259 int64vec *n = new int64vec(this->numVars); 1260 1260 #ifdef gfanp 1261 1261 timeval t_mI_start, t_mI_end; … … 1282 1282 */ 1283 1283 //TODO It might be faster to compute jus the implied equations instead of a relative interior point 1284 // int vec *iv_intPoint = new intvec(this->numVars);1284 // int64vec *iv_intPoint = new int64vec(this->numVars); 1285 1285 // dd_MatrixPtr shiftMatrix; 1286 1286 // dd_MatrixPtr intPointMatrix; … … 1359 1359 * Figuring out whether a ray belongs to a given facet(normal) is done by 1360 1360 * checking whether the inner product of the ray with the normal is zero. 1361 * We use ivAdd here which returns a new int vec. Therefore we need to avoid1361 * We use ivAdd here which returns a new int64vec. Therefore we need to avoid 1362 1362 * a memory leak which would be cause by the line 1363 1363 * iv=ivAdd(iv,b) … … 1409 1409 #endif 1410 1410 /* Compute interior point on the fly*/ 1411 int vec *ivIntPointOfCone = new intvec(this->numVars);1411 int64vec *ivIntPointOfCone = new int64vec(this->numVars); 1412 1412 mpq_t *colSum = new mpq_t[this->numVars]; 1413 1413 int denom[this->numVars];//denominators of colSum 1414 1414 //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++) 1416 1416 { 1417 1417 mpq_init(colSum[jj]); … … 1449 1449 mpz_clear(kgV); 1450 1450 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]; 1453 1462 for (int ii=0;ii<(this->numVars);ii++) 1454 1463 { 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); 1460 1471 //Compute intgcd 1461 1472 ggT=intgcd(ggT,(*ivIntPointOfCone)[ii]); 1462 1473 } 1474 1463 1475 //Divide out a common gcd > 1 1464 1476 if(ggT>1) 1465 1477 { 1466 1478 for(int ii=0;ii<this->numVars;ii++) 1479 { 1467 1480 (*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); 1470 1485 delete [] colSum; 1471 1486 /*For homogeneous input (like Det3,3,5) the int points may be negative. So add a suitable multiple of (1,_,1)*/ 1472 1487 if(hasHomInput==TRUE && iv64isStrictlyPositive(ivIntPointOfCone)==FALSE) 1473 1488 { 1474 int vec *ivOne = new intvec(this->numVars);1489 int64vec *ivOne = new int64vec(this->numVars); 1475 1490 int maxNegEntry=0; 1476 1491 for(int ii=0;ii<this->numVars;ii++) … … 1483 1498 for(int ii=0;ii<this->numVars;ii++) 1484 1499 (*ivOne)[ii]=maxNegEntry; 1485 int vec *tmp=ivIntPointOfCone;1486 ivIntPointOfCone=iv Add(ivIntPointOfCone,ivOne);1500 int64vec *tmp=ivIntPointOfCone; 1501 ivIntPointOfCone=iv64Add(ivIntPointOfCone,ivOne); 1487 1502 delete(tmp); 1488 1503 // while( !iv64isStrictlyPositive(ivIntPointOfCone) ) 1489 1504 // { 1490 // int vec *tmp = ivIntPointOfCone;1505 // int64vec *tmp = ivIntPointOfCone; 1491 1506 // for(int jj=0;jj<this->numVars;jj++) 1492 1507 // (*ivOne)[jj] = (*ivOne)[jj] << 1; //times 2 … … 1495 1510 // } 1496 1511 delete ivOne; 1497 int ggT=(*ivIntPointOfCone)[0];1512 int64 ggT=(*ivIntPointOfCone)[0]; 1498 1513 for(int ii=0;ii<this->numVars;ii++) 1499 1514 ggT=intgcd( ggT, (*ivIntPointOfCone)[ii]); … … 1514 1529 facet *fAct=gc.facetPtr; 1515 1530 //Construct an array to hold the extremal rays of the cone 1516 this->gcRays = (int vec**)omAlloc0(sizeof(intvec*)*P->rowsize);1531 this->gcRays = (int64vec**)omAlloc0(sizeof(int64vec*)*P->rowsize); 1517 1532 for(int ii=0;ii<P->rowsize;ii++) 1518 1533 { 1519 int vec *rowvec = new intvec(this->numVars);1534 int64vec *rowvec = new int64vec(this->numVars); 1520 1535 makeInt(P,ii+1,*rowvec);//get an integer entry instead of rational, rowvec is primitve 1521 this->gcRays[ii] = iv Copy(rowvec);1536 this->gcRays[ii] = iv64Copy(rowvec); 1522 1537 delete rowvec; 1523 1538 } … … 1526 1541 while(fAct!=NULL) 1527 1542 { 1528 const int vec *fNormal;// = new intvec(this->numVars);1543 const int64vec *fNormal;// = new int64vec(this->numVars); 1529 1544 fNormal = fAct->getRef2FacetNormal();//->getFacetNormal(); 1530 int vec *ivIntPointOfFacet = new intvec(this->numVars);1545 int64vec *ivIntPointOfFacet = new int64vec(this->numVars); 1531 1546 for(int ii=0;ii<rows;ii++) 1532 1547 { 1533 1548 if(dotProduct(*fNormal,this->gcRays[ii])==0) 1534 1549 { 1535 int vec *tmp = ivIntPointOfFacet;//Prevent memleak1550 int64vec *tmp = ivIntPointOfFacet;//Prevent memleak 1536 1551 fAct->numCodim2Facets++; 1537 1552 facet *codim2Act; … … 1547 1562 } 1548 1563 //codim2Act->setFacetNormal(rowvec); 1549 //Rather just let codim2Act point to the corresponding int vec of gcRays1564 //Rather just let codim2Act point to the corresponding int64vec of gcRays 1550 1565 codim2Act->fNormal=this->gcRays[ii]; 1551 1566 fAct->numRays++; 1552 1567 //Memleak avoided via tmp 1553 ivIntPointOfFacet=iv Add(ivIntPointOfFacet,this->gcRays[ii]);1568 ivIntPointOfFacet=iv64Add(ivIntPointOfFacet,this->gcRays[ii]); 1554 1569 //Now tmp still points to the OLD address of ivIntPointOfFacet 1555 1570 delete(tmp); … … 1562 1577 if( !iv64isStrictlyPositive(ivIntPointOfFacet) && hasHomInput==TRUE) 1563 1578 { 1564 int vec *ivOne = new intvec(this->numVars);1579 int64vec *ivOne = new int64vec(this->numVars); 1565 1580 for(int ii=0;ii<this->numVars;ii++) 1566 1581 (*ivOne)[ii]=1; 1567 1582 while( !iv64isStrictlyPositive(ivIntPointOfFacet) ) 1568 1583 { 1569 int vec *tmp = ivIntPointOfFacet;1584 int64vec *tmp = ivIntPointOfFacet; 1570 1585 for(int jj=0;jj<this->numVars;jj++) 1571 1586 { 1572 1587 (*ivOne)[jj] = (*ivOne)[jj] << 1; //times 2 1573 1588 } 1574 ivIntPointOfFacet = iv Add(ivIntPointOfFacet/*diff*/,ivOne);1589 ivIntPointOfFacet = iv64Add(ivIntPointOfFacet/*diff*/,ivOne); 1575 1590 delete tmp; 1576 1591 } 1577 1592 delete ivOne; 1578 1593 } 1579 int ggT=(*ivIntPointOfFacet)[0];1594 int64 ggT=(*ivIntPointOfFacet)[0]; 1580 1595 for(int ii=0;ii<this->numVars;ii++) 1581 1596 ggT=intgcd(ggT,(*ivIntPointOfFacet)[ii]); … … 1644 1659 // while(codim2Act!=NULL) 1645 1660 // { 1646 // int vec *rayvec;1661 // int64vec *rayvec; 1647 1662 // rayvec = codim2Act->getFacetNormal();//Mind this is no normal but a ray! 1648 1663 // //int negCtr=0; … … 1669 1684 } 1670 1685 1671 inline bool gcone::iv64isStrictlyPositive(const int vec * iv64)1686 inline bool gcone::iv64isStrictlyPositive(const int64vec * iv64) 1672 1687 { 1673 1688 bool res=TRUE; … … 1702 1717 gettimeofday(&start, 0); 1703 1718 #endif 1704 int vec *fNormal;// = new intvec(this->numVars); //facet normal, check for parallelity1719 int64vec *fNormal;// = new int64vec(this->numVars); //facet normal, check for parallelity 1705 1720 fNormal = f->getFacetNormal(); //read this->fNormal; 1706 1721 #ifdef gfan_DEBUG … … 1739 1754 if( (srcRing->order[0]!=ringorder_a)) 1740 1755 { 1741 int vec *iv;// = new intvec(this->numVars);1742 iv = ivNeg(fNormal);//ivNeg uses iv Copy -> new1756 int64vec *iv;// = new int64vec(this->numVars); 1757 iv = ivNeg(fNormal);//ivNeg uses iv64Copy -> new 1743 1758 // tmpRing=rCopyAndAddWeight(srcRing,ivNeg(fNormal)); 1744 1759 tmpRing=rCopyAndAddWeight(srcRing,iv); … … 1947 1962 dd_FreeMatrix(posRestr); 1948 1963 1949 int vec *iv_weight = new intvec(this->numVars);1964 int64vec *iv_weight = new int64vec(this->numVars); 1950 1965 #ifdef gfanp 1951 1966 timeval t_dd_start, t_dd_end; … … 1975 1990 for(int ii=0;ii<P->rowsize;ii++) 1976 1991 { 1977 int vec *iv_row=new intvec(this->numVars);1992 int64vec *iv_row=new int64vec(this->numVars); 1978 1993 makeInt(P,ii+1,*iv_row); 1979 1994 iv_weight =ivAdd(iv_weight, iv_row); … … 2075 2090 gettimeofday(&start, 0); 2076 2091 #endif 2077 const int vec *fNormal;2092 const int64vec *fNormal; 2078 2093 fNormal = f->getRef2FacetNormal();/*->getFacetNormal();*/ //read this->fNormal; 2079 2094 #ifdef gfan_DEBUG … … 2093 2108 ring tmpRing; 2094 2109 2095 const int vec *intPointOfFacet;2110 const int64vec *intPointOfFacet; 2096 2111 intPointOfFacet=f->getInteriorPoint(); 2097 2112 //Now we need two blocks of ringorder_a! 2098 2113 //May assume the same situation as in flip() here 2099 if( (srcRing->order[0]!=ringorder_a ) && (srcRing->order[1]!=ringorder_a) )2100 { 2101 int vec *iv = new intvec(this->numVars);//init with 1s, since we do not need a 2nd block here but later2102 // int vec *iv_foo = new intvec(this->numVars,1);//placeholder2103 int vec *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)); 2104 2119 tmpRing=rCopyAndAddWeight2(srcRing,ivw/*intPointOfFacet*/,iv); 2105 2120 delete iv;delete ivw; 2106 2121 // delete iv_foo; 2107 2122 } 2108 else 2109 { 2110 int vec *iv=new intvec(this->numVars);2111 int vec *ivw=ivNeg(fNormal);2123 else 2124 { 2125 int64vec *iv=new int64vec(this->numVars); 2126 int64vec *ivw=ivNeg(const_cast<int64vec*>(fNormal)); 2112 2127 tmpRing=rCopyAndAddWeight2(srcRing,ivw,iv); 2113 2128 delete iv; delete ivw; … … 2169 2184 int *A1=(int *)omAlloc0(length*sizeof(int)); 2170 2185 int *A2=(int *)omAlloc0(length*sizeof(int)); 2171 const int vec *ivw=f->getRef2FacetNormal();2186 const int64vec *ivw=f->getRef2FacetNormal(); 2172 2187 for(int jj=0;jj<length;jj++) 2173 2188 { … … 2229 2244 * and in gcone::flip for obvious reasons. 2230 2245 */ 2231 inline void gcone::computeInv(const ideal &gb, ideal &initialForm, const int vec &fNormal)2246 inline void gcone::computeInv(const ideal &gb, ideal &initialForm, const int64vec &fNormal) 2232 2247 { 2233 2248 #ifdef gfanp … … 2244 2259 while(pNext(aktpoly)!=NULL) /*loop trough terms and check for parallelity*/ 2245 2260 { 2246 int vec *check = new intvec(this->numVars);2261 int64vec *check = new int64vec(this->numVars); 2247 2262 aktpoly=pNext(aktpoly); //next term 2248 2263 // pSetm(aktpoly); 2249 2264 int *v=(int *)omAlloc((this->numVars+1)*sizeof(int)); 2250 2265 pGetExpV(aktpoly,v); 2251 /* Convert (int)v into (int vec)check */2266 /* Convert (int)v into (int64vec)check */ 2252 2267 for (int jj=0;jj<this->numVars;jj++) 2253 2268 { … … 2255 2270 } 2256 2271 if (isParallel(*check,fNormal)) //pass *check when 2257 // if(isParallel((const int vec*)&check,(const intvec*)&fNormal))2272 // if(isParallel((const int64vec*)&check,(const int64vec*)&fNormal)) 2258 2273 // if(fNormal.compare(check)==0) 2259 2274 { … … 2335 2350 for(int ii=0;ii<ddineq->rowsize;ii++) 2336 2351 { 2337 int vec *iv = new intvec(this->numVars);2338 int vec *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) 2339 2354 int posCtr=0; 2340 2355 for(int jj=0;jj<this->numVars;jj++) … … 2363 2378 // for(int ii=0;ii<num_newRows-1;ii++) 2364 2379 // { 2365 // int vec *iv = new intvec(this->numVars);//1st vector to check against2380 // int64vec *iv = new int64vec(this->numVars);//1st vector to check against 2366 2381 // for(int jj=0;jj<this->numVars;jj++) 2367 2382 // (*iv)[jj]=(int)mpq_get_d(ddineq->matrix[ii][jj+1]); 2368 2383 // for(int jj=ii+1;jj</*ddineq->rowsize*/num_newRows;jj++) 2369 2384 // { 2370 // int vec *ivCheck = new intvec(this->numVars);//Checked against iv2385 // int64vec *ivCheck = new int64vec(this->numVars);//Checked against iv 2371 2386 // for(int kk=0;kk<this->numVars;kk++) 2372 2387 // (*ivCheck)[kk]=(int)mpq_get_d(ddineq->matrix[jj][kk+1]); … … 2419 2434 }//void getGB 2420 2435 2421 /** \brief Compute the negative of a given int vec2436 /** \brief Compute the negative of a given int64vec 2422 2437 */ 2423 static int vec* ivNeg(const intvec *iv)2424 { //Hm, switching to int vec const intvec does no longer work2425 int vec *res;// = new intvec(iv->length());2426 res=iv Copy(iv);2438 static 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); 2427 2442 *res *= (int)-1; 2428 2443 return res; … … 2433 2448 * 2434 2449 */ 2435 static int dotProduct(const int vec &iva, const intvec &ivb)2450 static int dotProduct(const int64vec &iva, const int64vec &ivb) 2436 2451 { 2437 2452 int res=0; … … 2439 2454 { 2440 2455 // #ifndef NDEBUG 2441 // (const_cast<int vec*>(&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); 2442 2457 // #endif 2443 2458 res = res+(iva[i]*ivb[i]); … … 2449 2464 * \f$ \alpha\parallel\beta\Leftrightarrow\langle\alpha,\beta\rangle^2=\langle\alpha,\alpha\rangle\langle\beta,\beta\rangle \f$ 2450 2465 */ 2451 static bool isParallel(const int vec &a,const intvec &b)2466 static bool isParallel(const int64vec &a,const int64vec &b) 2452 2467 { 2453 2468 /*#ifdef gfanp … … 2476 2491 2477 2492 /** \brief Compute an interior point of a given cone 2478 * Result will be written into int vec iv.2493 * Result will be written into int64vec iv. 2479 2494 * Any rational point is automatically converted into an integer. 2480 2495 */ 2481 void gcone::interiorPoint( dd_MatrixPtr &M, int vec &iv) //no const &M here since we want to remove redundant rows2496 void gcone::interiorPoint( dd_MatrixPtr &M, int64vec &iv) //no const &M here since we want to remove redundant rows 2482 2497 { 2483 2498 dd_LPPtr lp,lpInt; … … 2602 2617 // facet *f1 = this->facetPtr; 2603 2618 // facet *f2 = NULL; 2604 // int vec *intF1=NULL;2619 // int64vec *intF1=NULL; 2605 2620 // while(f1!=NULL) 2606 2621 // { … … 2610 2625 // while(f1Ray!=NULL) 2611 2626 // { 2612 // const int vec *check=f1Ray->getRef2FacetNormal();2627 // const int64vec *check=f1Ray->getRef2FacetNormal(); 2613 2628 // if(iv64isStrictlyPositive(check)) 2614 2629 // { 2615 // intF1=iv Copy(check);2630 // intF1=iv64Copy(check); 2616 2631 // break; 2617 2632 // } … … 2629 2644 // if(intF1==NULL && hasHomInput==TRUE) 2630 2645 // { 2631 // intF1 = new int vec(this->numVars);2646 // intF1 = new int64vec(this->numVars); 2632 2647 // for(int ii=0;ii<this->numVars;ii++) 2633 2648 // (*intF1)[ii]=1; 2634 2649 // } 2635 2650 // assert(f1); assert(f2); 2636 // int vec *intF2=f2->getInteriorPoint();2651 // int64vec *intF2=f2->getInteriorPoint(); 2637 2652 // mpq_t *qPosRay = new mpq_t[this->numVars];//The positive ray from above 2638 2653 // mpq_t *qIntPt = new mpq_t[this->numVars];//starting vector a+((b-a)/2) … … 2728 2743 // 2729 2744 // mpq_set_num(qkgV,kgV); 2730 // int vec *n=new intvec(this->numVars);2745 // int64vec *n=new int64vec(this->numVars); 2731 2746 // for (int ii=0;ii<this->numVars;ii++) 2732 2747 // { … … 2748 2763 * 2749 2764 */ 2750 ring gcone::rCopyAndAddWeight(const ring &r, int vec *ivw)2765 ring gcone::rCopyAndAddWeight(const ring &r, int64vec *ivw) 2751 2766 { 2752 2767 ring res=rCopy0(r); … … 2754 2769 2755 2770 omFree(res->order); 2756 res->order =(int *)omAlloc0(4*sizeof(int ));2771 res->order =(int *)omAlloc0(4*sizeof(int/*64*/)); 2757 2772 omFree(res->block0); 2758 res->block0=(int *)omAlloc0(4*sizeof(int ));2773 res->block0=(int *)omAlloc0(4*sizeof(int/*64*/)); 2759 2774 omFree(res->block1); 2760 res->block1=(int *)omAlloc0(4*sizeof(int ));2775 res->block1=(int *)omAlloc0(4*sizeof(int/*64*/)); 2761 2776 omfree(res->wvhdl); 2762 res->wvhdl =(int **)omAlloc0(4*sizeof(int **));2777 res->wvhdl =(int **)omAlloc0(4*sizeof(int/*64*/**)); 2763 2778 2764 res->order[0]=ringorder_a ;2779 res->order[0]=ringorder_a/*64*/; 2765 2780 res->block0[0]=1; 2766 res->block1[0]=res->N; ;2781 res->block1[0]=res->N; 2767 2782 res->order[1]=ringorder_dp; //basically useless, since that should never be used 2768 2783 res->block0[1]=1; 2769 res->block1[1]=res->N; ;2784 res->block1[1]=res->N; 2770 2785 res->order[2]=ringorder_C; 2771 2786 2772 2787 int length=ivw->length(); 2773 int *A=(int *)omAlloc0(length*sizeof(int));2788 int/*64*/ *A=(int/*64*/ *)omAlloc0(length*sizeof(int/*64*/)); 2774 2789 for (jj=0;jj<length;jj++) 2775 2790 { 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"); 2777 2793 } 2778 2794 res->wvhdl[0]=(int *)A; … … 2783 2799 }//rCopyAndAdd 2784 2800 2785 ring gcone::rCopyAndAddWeight2(const ring &r,const int vec *ivw, const intvec *fNormal)2801 ring gcone::rCopyAndAddWeight2(const ring &r,const int64vec *ivw, const int64vec *fNormal) 2786 2802 { 2787 2803 ring res=rCopy0(r); 2788 2804 2789 2805 omFree(res->order); 2790 res->order =(int *)omAlloc0(5*sizeof(int ));2806 res->order =(int *)omAlloc0(5*sizeof(int/*64*/)); 2791 2807 omFree(res->block0); 2792 res->block0=(int *)omAlloc0(5*sizeof(int ));2808 res->block0=(int *)omAlloc0(5*sizeof(int/*64*/)); 2793 2809 omFree(res->block1); 2794 res->block1=(int *)omAlloc0(5*sizeof(int ));2810 res->block1=(int *)omAlloc0(5*sizeof(int/*64*/)); 2795 2811 omfree(res->wvhdl); 2796 res->wvhdl =(int **)omAlloc0(5*sizeof(int **));2812 res->wvhdl =(int **)omAlloc0(5*sizeof(int/*64*/**)); 2797 2813 2798 res->order[0]=ringorder_a ;2814 res->order[0]=ringorder_a/*64*/; 2799 2815 res->block0[0]=1; 2800 2816 res->block1[0]=res->N; 2801 res->order[1]=ringorder_a ;2817 res->order[1]=ringorder_a/*64*/; 2802 2818 res->block0[1]=1; 2803 2819 res->block1[1]=res->N; … … 2810 2826 2811 2827 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*/)); 2814 2830 for (int jj=0;jj<length;jj++) 2815 2831 { 2816 2832 A1[jj]=(*ivw)[jj]; 2817 2833 A2[jj]=-(*fNormal)[jj]; 2834 if(A1[jj]>=INT_MAX || A2[jj]>=INT_MAX) WarnS("A[jj] exceeds INT_MAX in gcone::rCopyAndAddWeight2!\n"); 2818 2835 } 2819 2836 res->wvhdl[0]=(int *)A1; … … 2826 2843 2827 2844 //NOTE not needed anywhere 2828 // ring rCopyAndChangeWeight(ring const &r, int vec *ivw)2845 // ring rCopyAndChangeWeight(ring const &r, int64vec *ivw) 2829 2846 // { 2830 2847 // ring res=rCopy0(currRing); … … 2847 2864 /** \brief Check for equality of two intvecs 2848 2865 */ 2849 static bool ivAreEqual(const int vec &a, const intvec &b)2866 static bool ivAreEqual(const int64vec &a, const int64vec &b) 2850 2867 { 2851 2868 bool res=TRUE; … … 2980 2997 * Compute gcBasis and facets for the arbitrary starting cone. Store \f$(codim-1)\f$-facets as normals. 2981 2998 * 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 int vec and an integer matrix.2999 * Keep a list of facets as a linked list containing an int64vec and an integer matrix. 2983 3000 * Since a \f$(codim-1)\f$-facet belongs to exactly two full dimensional cones, we remove a facet from the list as 2984 3001 * soon as we compute this facet again. Comparison of facets is done by... … … 3054 3071 #else 3055 3072 /*End of shallow copy*/ 3056 int vec *fNormal;3073 int64vec *fNormal; 3057 3074 fNormal = fAct->getFacetNormal(); 3058 3075 if( ii==0 || (ii>0 && SearchListAct==NULL) ) //1st facet may be non-flippable … … 3070 3087 SearchListAct->isFlippable=TRUE; 3071 3088 //Copy int point as well 3072 int vec *ivIntPt;// = new intvec(this->numVars);3089 int64vec *ivIntPt;// = new int64vec(this->numVars); 3073 3090 ivIntPt = fAct->getInteriorPoint(); 3074 3091 SearchListAct->setInteriorPoint(ivIntPt); … … 3087 3104 // for(int jj=0;jj<fAct->numRays-1;jj++) 3088 3105 { 3089 int vec *f2Normal;3106 int64vec *f2Normal; 3090 3107 f2Normal = codim2Act->getFacetNormal(); 3091 3108 if(jj==0) … … 3296 3313 * We compute the lcm of the denominators and multiply with this to get integer values. 3297 3314 * If the gcd of the nominators > 1 we divide by the gcd => primitive vector. 3298 * Expects a new int vec as 3rd parameter3299 * \param dd_MatrixPtr,int vec3315 * Expects a new int64vec as 3rd parameter 3316 * \param dd_MatrixPtr,int64vec 3300 3317 */ 3301 void gcone::makeInt(const dd_MatrixPtr &M, const int line, int vec &n)3318 void gcone::makeInt(const dd_MatrixPtr &M, const int line, int64vec &n) 3302 3319 { 3303 3320 // mpz_t denom[this->numVars]; … … 3346 3363 { 3347 3364 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)); 3349 3366 // ggT=intgcd(ggT,n[ii]); 3350 3367 } 3351 int ggT=n[0];3368 int64 ggT=n[0]; 3352 3369 for(int ii=0;ii<this->numVars;ii++) 3353 3370 ggT=intgcd(ggT,n[ii]); … … 3379 3396 // while(fAct!=NULL) 3380 3397 // { 3381 // int vec *fNormal;3398 // int64vec *fNormal; 3382 3399 // fNormal = fAct->getFacetNormal(); 3383 3400 // int *ggT = new int; … … 3389 3406 // if(*ggT>1)//We only need to do this if the ggT is non-trivial 3390 3407 // { 3391 // // int vec *fCopy = fAct->getFacetNormal();3408 // // int64vec *fCopy = fAct->getFacetNormal(); 3392 3409 // for(int ii=0;ii<this->numVars;ii++) 3393 3410 // (*fNormal)[ii] = ((*fNormal)[ii])/(*ggT); … … 3399 3416 // while(codim2Act!=NULL) 3400 3417 // { 3401 // int vec *n;3418 // int64vec *n; 3402 3419 // n=codim2Act->getFacetNormal(); 3403 3420 // int *ggT=new int; … … 3484 3501 if(fAct->isFlippable==TRUE) 3485 3502 { 3486 int vec *fNormal=NULL;3503 int64vec *fNormal=NULL; 3487 3504 fNormal=fAct->getFacetNormal(); 3488 3505 slAct = slHead; … … 3516 3533 while(slAct!=NULL) 3517 3534 { 3518 int vec *slNormal=NULL;3535 int64vec *slNormal=NULL; 3519 3536 removalOccured=FALSE; 3520 3537 slNormal = slAct->getFacetNormal(); … … 3599 3616 slEnd->prev = marker; 3600 3617 //Copy codim2-facets 3601 //int vec *f2Normal=new intvec(this->numVars);3618 //int64vec *f2Normal=new int64vec(this->numVars); 3602 3619 while(f2Act!=NULL) 3603 3620 { 3604 int vec *f2Normal;3621 int64vec *f2Normal; 3605 3622 f2Normal=f2Act->getFacetNormal(); 3606 3623 if(slEndCodim2Root==NULL) … … 3788 3805 /*We assume we have (a(),a(),dp) here*/ 3789 3806 omFree(replacementRing->order); 3790 replacementRing->order =(int *)omAlloc0(4*sizeof(int ));3807 replacementRing->order =(int *)omAlloc0(4*sizeof(int/*64*/)); 3791 3808 omFree(replacementRing->block0); 3792 replacementRing->block0=(int *)omAlloc0(4*sizeof(int ));3809 replacementRing->block0=(int *)omAlloc0(4*sizeof(int/*64*/)); 3793 3810 omFree(replacementRing->block1); 3794 replacementRing->block1=(int *)omAlloc0(4*sizeof(int ));3811 replacementRing->block1=(int *)omAlloc0(4*sizeof(int/*64*/)); 3795 3812 omfree(replacementRing->wvhdl); 3796 replacementRing->wvhdl =(int **)omAlloc0(4*sizeof(int **));3813 replacementRing->wvhdl =(int **)omAlloc0(4*sizeof(int/*64*/**)); 3797 3814 3798 replacementRing->order[0]=ringorder_a ;3815 replacementRing->order[0]=ringorder_a/*64*/; 3799 3816 replacementRing->block0[0]=1; 3800 3817 replacementRing->block1[0]=replacementRing->N; … … 3806 3823 replacementRing->order[2]=ringorder_C; 3807 3824 3808 int vec *ivw = this->getIntPoint();3809 // assert(this->ivIntPt); 3825 int64vec *ivw = this->getIntPoint(); 3826 // assert(this->ivIntPt); 3810 3827 int length=ivw->length(); 3811 int *A=(int *)omAlloc0(length*sizeof(int));3828 int/*64*/ *A=(int/*64*/ *)omAlloc0(length*sizeof(int/*64*/)); 3812 3829 for (int jj=0;jj<length;jj++) 3830 { 3813 3831 A[jj]=(*ivw)[jj]; 3832 if(A[jj]>=INT_MAX) WarnS("A[jj] exceeds INT_MAX in gcone::replaceDouble_ringorder_a_ByASingleOne!\n"); 3833 } 3814 3834 delete ivw; 3815 3835 replacementRing->wvhdl[0]=(int *)A; … … 3831 3851 /** \brief Compute the gcd of two ints 3832 3852 */ 3833 static int intgcd(const int &a, const int&b)3853 static int intgcd(const int64 &a, const int64 &b) 3834 3854 { 3835 3855 int r, p=a, q=b; … … 3867 3887 // while(fAct!=NULL) 3868 3888 // { 3869 // int vec *comp;3889 // int64vec *comp; 3870 3890 // comp = fAct->getFacetNormal(); 3871 3891 // for(int ii=0;ii<this->numVars;ii++) … … 3943 3963 while(fAct!=NULL) 3944 3964 { 3945 const int vec *iv;3965 const int64vec *iv; 3946 3966 iv=fAct->getRef2FacetNormal();//->getFacetNormal(); 3947 3967 f2Act=fAct->codim2Ptr; … … 3960 3980 while(f2Act!=NULL) 3961 3981 { 3962 const int vec *iv2;3982 const int64vec *iv2; 3963 3983 iv2=f2Act->getRef2FacetNormal();//->getFacetNormal(); 3964 3984 for(int jj=0;jj<iv2->length();jj++) … … 4023 4043 strweight=line.substr(0,line.find_first_of(")")); 4024 4044 4025 int vec *iv=new intvec(this->numVars);//4045 int64vec *iv=new int64vec(this->numVars);// 4026 4046 for(int ii=0;ii<this->numVars;ii++) 4027 4047 { … … 4034 4054 4035 4055 ring newRing; 4036 if(currRing->order[0]!=ringorder_a )4056 if(currRing->order[0]!=ringorder_a/*64*/) 4037 4057 { 4038 4058 newRing=rCopyAndAddWeight(currRing,iv); … … 4176 4196 found = line.find("\t"); 4177 4197 string normalString=line.substr(0,found); 4178 int vec *fN = new intvec(this->numVars);4198 int64vec *fN = new int64vec(this->numVars); 4179 4199 for(int ii=0;ii<this->numVars;ii++) 4180 4200 { … … 4257 4277 4258 4278 l->m[2].rtyp=INTVEC_CMD; 4259 int vec iv=(gcAct->f2M(gcAct,gcAct->facetPtr));//NOTE memleak?4260 l->m[2].data=(void*)iv Copy(&iv);4279 int64vec iv=(gcAct->f2M(gcAct,gcAct->facetPtr));//NOTE memleak? 4280 l->m[2].data=(void*)iv64Copy(&iv); 4261 4281 4262 4282 l->m[3].rtyp=LIST_CMD; … … 4268 4288 { 4269 4289 lCodim2List->m[jj].rtyp=INTVEC_CMD; 4270 int vec ivC2=(gcAct->f2M(gcAct,fAct,2));4271 lCodim2List->m[jj].data=(void*)iv Copy(&ivC2);4290 int64vec ivC2=(gcAct->f2M(gcAct,fAct,2)); 4291 lCodim2List->m[jj].data=(void*)iv64Copy(&ivC2); 4272 4292 jj++; 4273 4293 fAct = fAct->next; … … 4287 4307 * f should always point to gc->facetPtr 4288 4308 * param n is used to determine whether it operates in codim 1 or 2 4289 * We have to cast the int64vecs to int vec due to issues with list structure4309 * We have to cast the int64vecs to int64vec due to issues with list structure 4290 4310 */ 4291 inline int vec gcone::f2M(gcone *gc, facet *f, int n)4311 inline int64vec gcone::f2M(gcone *gc, facet *f, int n) 4292 4312 { 4293 4313 facet *fAct; 4294 int vec *res;//=new intvec(this->numVars);4314 int64vec *res;//=new int64vec(this->numVars); 4295 4315 // int codim=n; 4296 4316 // int bound; … … 4298 4318 if(n==1) 4299 4319 { 4300 int vec *m1Res=new intvec(gc->numFacets,gc->numVars,0);4301 res = iv Copy(m1Res);4320 int64vec *m1Res=new int64vec(gc->numFacets,gc->numVars,0); 4321 res = iv64Copy(m1Res); 4302 4322 fAct = gc->facetPtr; 4303 4323 delete m1Res; … … 4307 4327 { 4308 4328 fAct = f->codim2Ptr; 4309 int vec *m2Res = new intvec(f->numCodim2Facets,gc->numVars,0);4310 res = iv Copy(m2Res);4329 int64vec *m2Res = new int64vec(f->numCodim2Facets,gc->numVars,0); 4330 res = iv64Copy(m2Res); 4311 4331 delete m2Res; 4312 4332 // bound = fAct->numCodim2Facets*(this->numVars); … … 4316 4336 while(fAct!=NULL )//&& ii < bound ) 4317 4337 { 4318 const int vec *fNormal;4338 const int64vec *fNormal; 4319 4339 fNormal = fAct->getRef2FacetNormal();//->getFacetNormal(); 4320 4340 for(int jj=0;jj<this->numVars;jj++) … … 4334 4354 int gcone::maxSize; 4335 4355 dd_MatrixPtr gcone::dd_LinealitySpace; 4336 int vec *gcone::hilbertFunction;4356 int64vec *gcone::hilbertFunction; 4337 4357 #ifdef gfanp 4338 4358 // int gcone::lengthOfSearchList=0; … … 4358 4378 int gcone::numVars; 4359 4379 bool gcone::hasHomInput=FALSE; 4360 int vec *gcone::ivZeroVector;4380 int64vec *gcone::ivZeroVector; 4361 4381 // ideal gfan(ideal inputIdeal, int h) 4362 4382 lists gfan(ideal inputIdeal, int h) … … 4396 4416 { 4397 4417 gcone::hasHomInput=TRUE; 4398 gcone::hilbertFunction=hHstdSeries(inputIdeal,NULL,NULL,NULL,currRing);4418 // gcone::hilbertFunction=hHstdSeries(inputIdeal,NULL,NULL,NULL,currRing); 4399 4419 } 4400 4420 else 4401 4421 { 4402 gcone::ivZeroVector = new int vec(pVariables);4422 gcone::ivZeroVector = new int64vec(pVariables); 4403 4423 for(int ii=0;ii<pVariables;ii++) 4404 4424 (*gcone::ivZeroVector)[ii]=0; … … 4451 4471 for(int jj=0;jj<5;jj++) 4452 4472 { 4453 int vec *iv=new intvec(pVariables);4473 int64vec *iv=new int64vec(pVariables); 4454 4474 fPtr->setFacetNormal(iv); 4455 4475 delete(iv);
Note: See TracChangeset
for help on using the changeset viewer.