Changeset a355e47 in git
- Timestamp:
- Feb 5, 2010, 8:06:33 AM (13 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- 55587862408d1e92ee43d342befb2d834ea91635
- Parents:
- 4b3ef4b5fc9fc4028f935c1c66834052d01ef1d2
- Location:
- kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gfan.cc
r4b3ef4b ra355e47 13 13 #include "kstd1.h" 14 14 #include "kutil.h" //ksCreateSpoly 15 // #include "int vec.h"15 // #include "int64vec.h" 16 16 #include "polys.h" 17 17 #include "ideals.h" … … 133 133 facet::facet(const facet& f) 134 134 { 135 this->fNormal=iv Copy(f.fNormal);135 this->fNormal=iv64Copy(f.fNormal); 136 136 this->UCN=f.UCN; 137 137 this->isFlippable=f.isFlippable; … … 155 155 f2Act->prev = marker; 156 156 } 157 int vec *f2Normal;157 int64vec *f2Normal; 158 158 f2Normal = f2Copy->getFacetNormal(); 159 159 // f2Act->setFacetNormal(f2Copy->getFacetNormal()); … … 208 208 int notParallelCtr=0; 209 209 int ctr=0; 210 int vec* fNormal; //No new since ivCopy and therefore getFacetNormal return a new211 int vec* sNormal;210 int64vec* fNormal; //No new since iv64Copy and therefore getFacetNormal return a new 211 int64vec* sNormal; 212 212 fNormal = f->getFacetNormal(); 213 213 sNormal = s->getFacetNormal(); 214 214 //Do not need parallelity. Too time consuming 215 if(!isParallel( fNormal,sNormal))215 if(!isParallel(*fNormal,*sNormal)) 216 216 notParallelCtr++; 217 // int vec *foo=ivNeg(sNormal);217 // int64vec *foo=ivNeg(sNormal); 218 218 // if(fNormal->compare(foo)!=0) //facet normals 219 219 // return TRUE; … … 226 226 while(f2Act!=NULL) 227 227 { 228 int vec* f2Normal;228 int64vec* f2Normal; 229 229 f2Normal = f2Act->getFacetNormal(); 230 230 s2Act = s->codim2Ptr; 231 231 while(s2Act!=NULL) 232 232 { 233 int vec* s2Normal;233 int64vec* s2Normal; 234 234 s2Normal = s2Act->getFacetNormal(); 235 235 // bool foo=areEqual(f2Normal,s2Normal); … … 258 258 } 259 259 260 /** Stores the facet normal \param int vec*/261 inline void facet::setFacetNormal(int vec *iv)262 { 263 this->fNormal = iv Copy(iv);260 /** Stores the facet normal \param int64vec*/ 261 inline void facet::setFacetNormal(int64vec *iv) 262 { 263 this->fNormal = iv64Copy(iv); 264 264 } 265 265 266 266 /** Hopefully returns the facet normal 267 * Mind: iv Copy returns a new intvec, so use this in the following way:268 * int vec *iv;267 * Mind: iv64Copy returns a new int64vec, so use this in the following way: 268 * int64vec *iv; 269 269 * iv = this->getFacetNormal(); 270 270 * [...] 271 271 * delete(iv); 272 272 */ 273 inline int vec *facet::getFacetNormal()273 inline int64vec *facet::getFacetNormal() 274 274 { 275 return iv Copy(this->fNormal);275 return iv64Copy(this->fNormal); 276 276 // return this->fNormal; 277 277 } … … 318 318 { 319 319 if(this!=NULL)// && this!=(facet *)0xfbfbfbfbfbfbfbfb)// || this!=(facet *)0xfbfbfbfb) ) 320 // if(this!=NULL && ( this->fNormal!=(int vec *)0xfbfbfbfb || this->fNormal!=(intvec *)0xfbfbfbfbfbfbfbfb) )320 // if(this!=NULL && ( this->fNormal!=(int64vec *)0xfbfbfbfb || this->fNormal!=(int64vec *)0xfbfbfbfbfbfbfbfb) ) 321 321 return this->UCN; 322 322 else … … 325 325 326 326 /** Store an interior point of the facet */ 327 inline void facet::setInteriorPoint(int vec *iv)328 { 329 this->interiorPoint = iv Copy(iv);327 inline void facet::setInteriorPoint(int64vec *iv) 328 { 329 this->interiorPoint = iv64Copy(iv); 330 330 } 331 331 332 332 /** Returns a pointer to this->interiorPoint 333 * MIND: iv Copy returns a new intvec333 * MIND: iv64Copy returns a new int64vec 334 334 * @see facet::getFacetNormal 335 335 */ 336 inline int vec *facet::getInteriorPoint()337 { 338 return iv Copy(this->interiorPoint);336 inline int64vec *facet::getInteriorPoint() 337 { 338 return iv64Copy(this->interiorPoint); 339 339 } 340 340 … … 346 346 facet *codim2Act; 347 347 codim2Act = this->codim2Ptr; 348 int vec *fNormal;348 int64vec *fNormal; 349 349 fNormal = this->getFacetNormal(); 350 350 cout << "=======================" << endl; … … 356 356 while(codim2Act!=NULL) 357 357 { 358 int vec *f2Normal;358 int64vec *f2Normal; 359 359 f2Normal = codim2Act->getFacetNormal(); 360 360 cout << "("; … … 487 487 488 488 /** \brief Set the interior point of a cone */ 489 inline void gcone::setIntPoint(int vec *iv)490 { 491 this->ivIntPt=iv Copy(iv);489 inline void gcone::setIntPoint(int64vec *iv) 490 { 491 this->ivIntPt=iv64Copy(iv); 492 492 } 493 493 494 494 /** \brief Return the interior point */ 495 inline int vec *gcone::getIntPoint()496 { 497 return iv Copy(this->ivIntPt);495 inline int64vec *gcone::getIntPoint() 496 { 497 return iv64Copy(this->ivIntPt); 498 498 } 499 499 … … 524 524 while(f!=NULL) 525 525 { 526 int vec *iv;526 int64vec *iv; 527 527 iv = f->getFacetNormal(); 528 528 cout << "("; … … 561 561 while(fAct!=NULL) 562 562 { 563 int vec *fNormal;563 int64vec *fNormal; 564 564 fNormal=fAct->getFacetNormal(); 565 565 cout << "("; … … 574 574 while(codim2Act!=NULL) 575 575 { 576 int vec *f2Normal;576 int64vec *f2Normal; 577 577 f2Normal = codim2Act->getFacetNormal(); 578 578 cout << "("; … … 721 721 */ 722 722 // ideal initialForm=idInit(IDELEMS(I),1); 723 // int vec *gamma=new intvec(this->numVars);723 // int64vec *gamma=new int64vec(this->numVars); 724 724 int falseGammaCounter=0; 725 725 int *redRowsArray=NULL; … … 731 731 //read row ii into gamma 732 732 double tmp; 733 int vec *gamma=new intvec(this->numVars);733 int64vec *gamma=new int64vec(this->numVars); 734 734 for(int jj=1;jj<=this->numVars;jj++) 735 735 { … … 833 833 for(int ii=0;ii<ddineq->rowsize;ii++) 834 834 { 835 int vec *ivPos = new intvec(this->numVars);835 int64vec *ivPos = new int64vec(this->numVars); 836 836 for(int jj=0;jj<this->numVars;jj++) 837 837 (*ivPos)[jj]=(int)mpq_get_d(ddineq->matrix[ii][jj+1]); … … 840 840 for(int jj=0;jj<this->numVars;jj++) 841 841 { 842 int vec *ivCanonical = new intvec(this->numVars);842 int64vec *ivCanonical = new int64vec(this->numVars); 843 843 jj==0 ? (*ivCanonical)[ivPos->length()-1]=1 : (*ivCanonical)[jj-1]=1; 844 844 if(dotProduct(*ivCanonical,*ivPos)!=0) … … 891 891 for (int kk = 0; kk<ddrows; kk++) 892 892 { 893 int vec *load = new intvec(this->numVars);//intvec to store a single facet normal that will then be stored via setFacetNormal893 int64vec *load = new int64vec(this->numVars);//int64vec to store a single facet normal that will then be stored via setFacetNormal 894 894 for (int jj = 1; jj <ddcols; jj++) 895 895 { … … 908 908 for(int jj = 0; jj<load->length(); jj++) 909 909 { 910 int vec *ivCanonical = new intvec(load->length());910 int64vec *ivCanonical = new int64vec(load->length()); 911 911 (*ivCanonical)[jj]=1; 912 912 if (dotProduct(*load,*ivCanonical)<0) … … 996 996 if (compIntPoint==TRUE) 997 997 { 998 int vec *iv = new intvec(this->numVars);998 int64vec *iv = new int64vec(this->numVars); 999 999 dd_MatrixPtr posRestr=dd_CreateMatrix(this->numVars,this->numVars+1); 1000 1000 int jj=1; … … 1084 1084 codim2Act = codim2Act->next; 1085 1085 } 1086 int vec *n = new intvec(this->numVars);1086 int64vec *n = new int64vec(this->numVars); 1087 1087 #ifdef gfanp 1088 1088 timeval t_mI_start, t_mI_end; … … 1109 1109 */ 1110 1110 //TODO It might be faster to compute jus the implied equations instead of a relative interior point 1111 // int vec *iv_intPoint = new intvec(this->numVars);1111 // int64vec *iv_intPoint = new int64vec(this->numVars); 1112 1112 // dd_MatrixPtr shiftMatrix; 1113 1113 // dd_MatrixPtr intPointMatrix; … … 1207 1207 while(fAct!=NULL) 1208 1208 { 1209 int vec *fNormal;// = new intvec(this->numVars);1209 int64vec *fNormal;// = new int64vec(this->numVars); 1210 1210 fNormal = fAct->getFacetNormal(); 1211 1211 for(int ii=0;ii<rows;ii++) 1212 1212 { 1213 int vec *rowvec = new intvec(this->numVars);1213 int64vec *rowvec = new int64vec(this->numVars); 1214 1214 makeInt(P,ii+1,*rowvec);//get an integer entry instead of rational 1215 1215 if(dotProduct(*fNormal,*rowvec)==0) … … 1285 1285 { 1286 1286 containsStrictlyPosRay==TRUE; 1287 int vec *rayvec;1287 int64vec *rayvec; 1288 1288 rayvec = codim2Act->getFacetNormal();//Mind this is no normal but a ray! 1289 1289 int negCtr=0; … … 1335 1335 gettimeofday(&start, 0); 1336 1336 #endif 1337 int vec *fNormal;// = new intvec(this->numVars); //facet normal, check for parallelity1337 int64vec *fNormal;// = new int64vec(this->numVars); //facet normal, check for parallelity 1338 1338 fNormal = f->getFacetNormal(); //read this->fNormal; 1339 1339 … … 1373 1373 if( (srcRing->order[0]!=ringorder_a)) 1374 1374 { 1375 int vec *iv = new intvec(this->numVars);1375 int64vec *iv = new int64vec(this->numVars); 1376 1376 iv = ivNeg(fNormal); 1377 1377 // tmpRing=rCopyAndAddWeight(srcRing,ivNeg(fNormal)); … … 1580 1580 dd_FreeMatrix(posRestr); 1581 1581 1582 int vec *iv_weight = new intvec(this->numVars);1582 int64vec *iv_weight = new int64vec(this->numVars); 1583 1583 #ifdef gfanp 1584 1584 timeval t_dd_start, t_dd_end; … … 1603 1603 for(int ii=0;ii<P->rowsize;ii++) 1604 1604 { 1605 int vec *iv_row=new intvec(this->numVars);1605 int64vec *iv_row=new int64vec(this->numVars); 1606 1606 makeInt(P,ii+1,*iv_row); 1607 1607 iv_weight =ivAdd(iv_weight, iv_row); … … 1682 1682 * and in gcone::flip for obvious reasons. 1683 1683 */ 1684 inline void gcone::computeInv(ideal &gb, ideal &initialForm, int vec &fNormal)1684 inline void gcone::computeInv(ideal &gb, ideal &initialForm, int64vec &fNormal) 1685 1685 { 1686 1686 #ifdef gfanp … … 1697 1697 while(pNext(aktpoly)!=NULL) /*loop trough terms and check for parallelity*/ 1698 1698 { 1699 int vec *check = new intvec(this->numVars);1699 int64vec *check = new int64vec(this->numVars); 1700 1700 aktpoly=pNext(aktpoly); //next term 1701 1701 // pSetm(aktpoly); 1702 1702 int *v=(int *)omAlloc((this->numVars+1)*sizeof(int)); 1703 1703 pGetExpV(aktpoly,v); 1704 /* Convert (int)v into (int vec)check */1704 /* Convert (int)v into (int64vec)check */ 1705 1705 for (int jj=0;jj<this->numVars;jj++) 1706 1706 { … … 1786 1786 for(int ii=0;ii<ddineq->rowsize;ii++) 1787 1787 { 1788 intvec *iv = new intvec(this->numVars); 1788 int64vec *iv = new int64vec(this->numVars); 1789 int64vec *ivNull = new int64vec(this->numVars);//Needed for intvec64::compare(*intvec) 1789 1790 int posCtr=0; 1790 1791 for(int jj=0;jj<this->numVars;jj++) … … 1796 1797 } 1797 1798 // if( (iv->compare(0)==0) || (posCtr==iv->length()) ) 1798 if( (posCtr==iv->length()) || (iv->compare( 0)==0) )1799 if( (posCtr==iv->length()) || (iv->compare(ivNull)==0) ) 1799 1800 { 1800 1801 dd_MatrixRowRemove(&ddineq,ii+1); … … 1812 1813 // for(int ii=0;ii<num_newRows-1;ii++) 1813 1814 // { 1814 // int vec *iv = new intvec(this->numVars);//1st vector to check against1815 // int64vec *iv = new int64vec(this->numVars);//1st vector to check against 1815 1816 // for(int jj=0;jj<this->numVars;jj++) 1816 1817 // (*iv)[jj]=(int)mpq_get_d(ddineq->matrix[ii][jj+1]); 1817 1818 // for(int jj=ii+1;jj</*ddineq->rowsize*/num_newRows;jj++) 1818 1819 // { 1819 // int vec *ivCheck = new intvec(this->numVars);//Checked against iv1820 // int64vec *ivCheck = new int64vec(this->numVars);//Checked against iv 1820 1821 // for(int kk=0;kk<this->numVars;kk++) 1821 1822 // (*ivCheck)[kk]=(int)mpq_get_d(ddineq->matrix[jj][kk+1]); … … 1868 1869 }//void getGB 1869 1870 1870 /** \brief Compute the negative of a given int vec1871 /** \brief Compute the negative of a given int64vec 1871 1872 */ 1872 inline int vec *gcone::ivNeg(const intvec *iv)1873 { 1873 inline int64vec *gcone::ivNeg(int64vec *iv) 1874 { //Hm, switching to int64vec const int64vec does no longer work 1874 1875 //NOTE: Can't this be done without new? 1875 int vec *res;// = new intvec(iv->length());1876 res=iv Copy(iv);1876 int64vec *res;// = new int64vec(iv->length()); 1877 res=iv64Copy(iv); 1877 1878 *res *= (int)-1; 1878 1879 return res; … … 1883 1884 * 1884 1885 */ 1885 inline int gcone::dotProduct( const intvec &iva, const intvec &ivb)1886 inline int gcone::dotProduct(int64vec &iva, int64vec &ivb) 1886 1887 { 1887 1888 int res=0; … … 1897 1898 * \f$ \alpha\parallel\beta\Leftrightarrow\langle\alpha,\beta\rangle^2=\langle\alpha,\alpha\rangle\langle\beta,\beta\rangle \f$ 1898 1899 */ 1899 inline bool gcone::isParallel( const intvec &a, const intvec &b)1900 inline bool gcone::isParallel(int64vec &a, int64vec &b) 1900 1901 { 1901 1902 int lhs,rhs; … … 1916 1917 1917 1918 /** \brief Compute an interior point of a given cone 1918 * Result will be written into int vec iv.1919 * Result will be written into int64vec iv. 1919 1920 * Any rational point is automatically converted into an integer. 1920 1921 */ 1921 inline void gcone::interiorPoint( dd_MatrixPtr &M, int vec &iv) //no const &M here since we want to remove redundant rows1922 inline void gcone::interiorPoint( dd_MatrixPtr &M, int64vec &iv) //no const &M here since we want to remove redundant rows 1922 1923 { 1923 1924 dd_LPPtr lp,lpInt; … … 2018 2019 }//void interiorPoint(dd_MatrixPtr const &M) 2019 2020 2020 inline void gcone::interiorPoint2(const dd_MatrixPtr &M, int vec &iv)2021 inline void gcone::interiorPoint2(const dd_MatrixPtr &M, int64vec &iv) 2021 2022 { 2022 2023 KMatrix<Rational> mMat(M->rowsize+1,M->colsize); … … 2070 2071 * 2071 2072 */ 2072 ring gcone::rCopyAndAddWeight(const ring &r, const intvec *ivw)2073 ring gcone::rCopyAndAddWeight(const ring &r, int64vec *ivw) 2073 2074 { 2074 2075 ring res=rCopy0(r); … … 2105 2106 }//rCopyAndAdd 2106 2107 2107 ring rCopyAndChangeWeight(ring const &r, int vec *ivw)2108 ring rCopyAndChangeWeight(ring const &r, int64vec *ivw) 2108 2109 { 2109 2110 ring res=rCopy0(currRing); … … 2126 2127 /** \brief Check for equality of two intvecs 2127 2128 */ 2128 inline bool gcone::areEqual( const intvec &a, const intvec &b)2129 inline bool gcone::areEqual(int64vec &a, int64vec &b) 2129 2130 { 2130 2131 bool res=TRUE; … … 2262 2263 * Compute gcBasis and facets for the arbitrary starting cone. Store \f$(codim-1)\f$-facets as normals. 2263 2264 * In order to represent a facet uniquely compute also the \f$(codim-2)\f$-facets and norm by the gcd of the components. 2264 * Keep a list of facets as a linked list containing an int vec and an integer matrix.2265 * Keep a list of facets as a linked list containing an int64vec and an integer matrix. 2265 2266 * Since a \f$(codim-1)\f$-facet belongs to exactly two full dimensional cones, we remove a facet from the list as 2266 2267 * soon as we compute this facet again. Comparison of facets is done by... … … 2329 2330 if(fAct->isFlippable==TRUE) 2330 2331 { 2331 int vec *fNormal;2332 int64vec *fNormal; 2332 2333 fNormal = fAct->getFacetNormal(); 2333 2334 if( ii==0 || (ii>0 && SearchListAct==NULL) ) //1st facet may be non-flippable … … 2353 2354 // for(int jj=0;jj<fAct->numRays-1;jj++) 2354 2355 { 2355 int vec *f2Normal;2356 int64vec *f2Normal; 2356 2357 f2Normal = codim2Act->getFacetNormal(); 2357 2358 if(jj==0) … … 2511 2512 * 2512 2513 * We compute the lcm of the denominators and multiply with this to get integer values. 2513 * \param dd_MatrixPtr,int vec2514 * \param dd_MatrixPtr,int64vec 2514 2515 */ 2515 inline void gcone::makeInt(const dd_MatrixPtr &M, const int line, int vec &n)2516 inline void gcone::makeInt(const dd_MatrixPtr &M, const int line, int64vec &n) 2516 2517 { 2517 2518 // mpz_t denom[this->numVars]; … … 2582 2583 while(fAct!=NULL) 2583 2584 { 2584 int vec *fNormal;2585 int64vec *fNormal; 2585 2586 fNormal = fAct->getFacetNormal(); 2586 2587 for(int ii=0;ii<this->numVars;ii++) … … 2595 2596 while(codim2Act!=NULL) 2596 2597 { 2597 int vec *n;2598 int64vec *n; 2598 2599 n=codim2Act->getFacetNormal(); 2599 2600 for(int ii=0;ii<this->numVars;ii++) … … 2673 2674 } 2674 2675 /*1st step: compare facetNormals*/ 2675 // int vec *fNormal=NULL;gcone::2676 // int vec *slNormal=NULL;2676 // int64vec *fNormal=NULL;gcone:: 2677 // int64vec *slNormal=NULL; 2677 2678 2678 2679 while(fAct!=NULL) … … 2680 2681 if(fAct->isFlippable==TRUE) 2681 2682 { 2682 int vec *fNormal=NULL;2683 // int vec *slNormal=NULL;2683 int64vec *fNormal=NULL; 2684 // int64vec *slNormal=NULL; 2684 2685 fNormal=fAct->getFacetNormal(); 2685 2686 slAct = slHead; … … 2711 2712 //while(slAct!=slEndStatic->next) 2712 2713 { 2713 int vec *slNormal=NULL;2714 int64vec *slNormal=NULL; 2714 2715 removalOccured=FALSE; 2715 2716 slNormal = slAct->getFacetNormal(); … … 2797 2798 slEnd->prev = marker; 2798 2799 //Copy codim2-facets 2799 // int vec *f2Normal=new intvec(this->numVars);2800 // int64vec *f2Normal=new int64vec(this->numVars); 2800 2801 while(f2Act!=NULL) 2801 2802 { 2802 int vec *f2Normal;2803 int64vec *f2Normal; 2803 2804 f2Normal=f2Act->getFacetNormal(); 2804 2805 if(slEndCodim2Root==NULL) … … 2894 2895 while(fAct!=NULL) 2895 2896 { 2896 int vec *comp;2897 int64vec *comp; 2897 2898 comp = fAct->getFacetNormal(); 2898 2899 for(int ii=0;ii<this->numVars;ii++) … … 2969 2970 while(fAct!=NULL) 2970 2971 { 2971 int vec *iv;2972 int64vec *iv; 2972 2973 iv=fAct->getFacetNormal(); 2973 2974 f2Act=fAct->codim2Ptr; … … 2986 2987 while(f2Act!=NULL) 2987 2988 { 2988 int vec *iv2;2989 int64vec *iv2; 2989 2990 iv2=f2Act->getFacetNormal(); 2990 2991 for(int jj=0;jj<iv2->length();jj++) … … 3057 3058 // string strweight; 3058 3059 // strweight=line.substr(0,line.find_first_of(")")); 3059 // int vec *iv=new intvec(this->numVars);3060 // int64vec *iv=new int64vec(this->numVars); 3060 3061 // for(int ii=0;ii<this->numVars;ii++) 3061 3062 // { … … 3259 3260 3260 3261 l->m[2].rtyp=INTVEC_CMD; 3261 int vec iv=(gcAct->f2M(gcAct,gcAct->facetPtr));3262 l->m[2].data=(void*)iv Copy(&iv);3262 int64vec iv=(gcAct->f2M(gcAct,gcAct->facetPtr)); 3263 l->m[2].data=(void*)iv64Copy(&iv); 3263 3264 3264 3265 l->m[3].rtyp=LIST_CMD; … … 3270 3271 { 3271 3272 lCodim2List->m[jj].rtyp=INTVEC_CMD; 3272 int vec ivC2=(gcAct->f2M(gcAct,fAct,2));3273 lCodim2List->m[jj].data=(void*)iv Copy(&ivC2);3273 int64vec ivC2=(gcAct->f2M(gcAct,fAct,2)); 3274 lCodim2List->m[jj].data=(void*)iv64Copy(&ivC2); 3274 3275 jj++; 3275 3276 fAct = fAct->next; … … 3291 3292 * 3292 3293 */ 3293 inline int vec gcone::f2M(gcone *gc, facet *f, int n)3294 inline int64vec gcone::f2M(gcone *gc, facet *f, int n) 3294 3295 { 3295 3296 facet *fAct; 3296 int vec *res;//=new intvec(this->numVars);3297 int64vec *res;//=new int64vec(this->numVars); 3297 3298 // int codim=n; 3298 3299 // int bound; … … 3300 3301 if(n==1) 3301 3302 { 3302 int vec *m1Res=new intvec(gc->numFacets,gc->numVars,0);3303 res = iv Copy(m1Res);3303 int64vec *m1Res=new int64vec(gc->numFacets,gc->numVars,0); 3304 res = iv64Copy(m1Res); 3304 3305 fAct = gc->facetPtr; 3305 3306 delete m1Res; … … 3309 3310 { 3310 3311 fAct = f->codim2Ptr; 3311 int vec *m2Res = new intvec(f->numCodim2Facets,gc->numVars,0);3312 res = iv Copy(m2Res);3312 int64vec *m2Res = new int64vec(f->numCodim2Facets,gc->numVars,0); 3313 res = iv64Copy(m2Res); 3313 3314 delete m2Res; 3314 3315 // bound = fAct->numCodim2Facets*(this->numVars); … … 3318 3319 while(fAct!=NULL )//&& ii < bound ) 3319 3320 { 3320 int vec *fNormal;3321 int64vec *fNormal; 3321 3322 fNormal = fAct->getFacetNormal(); 3322 3323 for(int jj=0;jj<this->numVars;jj++) -
kernel/gfan.h
r4b3ef4b ra355e47 13 13 14 14 #include "intvec.h" 15 #include "int64vec.h" 15 16 16 17 #define p800 … … 34 35 lists gfan(ideal inputIdeal, int heuristic); 35 36 36 //int dotProduct(int vec a, intvec b);37 //bool isParallel(int vec a, intvec b);37 //int dotProduct(int64vec a, int64vec b); 38 //bool isParallel(int64vec a, int64vec b); 38 39 39 40 class facet … … 41 42 private: 42 43 /** \brief Inner normal of the facet, describing it uniquely up to isomorphism */ 43 int vec *fNormal;44 int64vec *fNormal; 44 45 45 46 /** \brief An interior point of the facet*/ 46 int vec *interiorPoint;47 int64vec *interiorPoint; 47 48 48 49 /** \brief Universal Cone Number … … 89 90 /** \brief Comparison of facets*/ 90 91 inline bool areEqual(facet *f, facet *g); 91 /** Stores the facet normal \param int vec*/92 inline void setFacetNormal(int vec *iv);92 /** Stores the facet normal \param int64vec*/ 93 inline void setFacetNormal(int64vec *iv); 93 94 /** Hopefully returns the facet normal */ 94 inline int vec *getFacetNormal();95 inline int64vec *getFacetNormal(); 95 96 /** Method to print the facet normal*/ 96 97 inline void printNormal(); … … 108 109 inline int getUCN(); 109 110 /** Store an interior point of the facet */ 110 inline void setInteriorPoint(int vec *iv);111 inline int vec *getInteriorPoint();111 inline void setInteriorPoint(int64vec *iv); 112 inline int64vec *getInteriorPoint(); 112 113 /** \brief Debugging function 113 114 * prints the facet normal an all (codim-2)-facets that belong to it … … 130 131 ideal inputIdeal; //the original 131 132 ring baseRing; //the basering of the cone 132 int vec *ivIntPt; //an interior point of the cone133 int64vec *ivIntPt; //an interior point of the cone 133 134 int UCN; //unique number of the cone 134 135 int pred; //UCN of the cone this one is derived from … … 188 189 inline int getCounter(); 189 190 inline ring getBaseRing(); 190 inline void setIntPoint(int vec *iv);191 inline int vec *getIntPoint();191 inline void setIntPoint(int64vec *iv); 192 inline int64vec *getIntPoint(); 192 193 inline void showIntPoint(); 193 194 inline void setNumFacets(); … … 200 201 inline void invPrint(const ideal &I); 201 202 inline bool isMonomial(const ideal &I); 202 inline int vec *ivNeg(const intvec *iv);203 inline int dotProduct( const intvec &iva, const intvec &ivb);204 inline bool isParallel( const intvec &a, const intvec &b);205 inline bool areEqual( const intvec &a, const intvec &b);203 inline int64vec *ivNeg(int64vec *iv); 204 inline int dotProduct(int64vec &iva, int64vec &ivb); 205 inline bool isParallel(int64vec &a, int64vec &b); 206 inline bool areEqual(int64vec &a, int64vec &b); 206 207 inline bool areEqual(facet *f, facet *g); 207 208 inline int intgcd(int a, int b); 208 209 inline void writeConeToFile(const gcone &gc, bool usingIntPoints=FALSE); 209 210 inline void readConeFromFile(int gcNum, gcone *gc); 210 inline int vec f2M(gcone *gc, facet *f, int n=1);211 inline int64vec f2M(gcone *gc, facet *f, int n=1); 211 212 inline void sortRays(gcone *gc); 212 213 //The real stuff … … 215 216 inline void getExtremalRays(const gcone &gc); 216 217 inline void flip(ideal gb, facet *f); 217 inline void computeInv(ideal &gb, ideal &inv, int vec &f);218 inline void computeInv(ideal &gb, ideal &inv, int64vec &f); 218 219 // poly restOfDiv(poly const &f, ideal const &I); removed with r12286 219 220 inline ideal ffG(const ideal &H, const ideal &G); 220 221 inline void getGB(ideal const &inputIdeal); 221 inline void interiorPoint( dd_MatrixPtr &M, int vec &iv);222 inline void interiorPoint2(const dd_MatrixPtr &M, int vec &iv);222 inline void interiorPoint( dd_MatrixPtr &M, int64vec &iv); 223 inline void interiorPoint2(const dd_MatrixPtr &M, int64vec &iv); 223 224 inline void preprocessInequalities(dd_MatrixPtr &M); 224 ring rCopyAndAddWeight(const ring &r, const intvec *ivw);225 ring rCopyAndChangeWeight(const ring &r, int vec *ivw);225 ring rCopyAndAddWeight(const ring &r, int64vec *ivw); 226 ring rCopyAndChangeWeight(const ring &r, int64vec *ivw); 226 227 // void reverseSearch(gcone *gcAct); //NOTE both removed from r12286 227 228 // bool isSearchFacet(gcone &gcTmp, facet *testfacet); 228 229 void noRevS(gcone &gcRoot, bool usingIntPoint=FALSE); 229 inline void makeInt(const dd_MatrixPtr &M, const int line, int vec &n);230 inline void makeInt(const dd_MatrixPtr &M, const int line, int64vec &n); 230 231 inline void normalize(); 231 232 facet * enqueueNewFacets(facet *f);
Note: See TracChangeset
for help on using the changeset viewer.