Changeset 2e06300 in git
- Timestamp:
- Jan 4, 2010, 5:27:48 PM (13 years ago)
- Branches:
- (u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
- Children:
- 1fca0364b35f46a90cbfe6c56518e4c6d8425aeb
- Parents:
- b082fc7cb97483beeb73b16829cc2cac851c24f1
- Location:
- kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gfan.cc
rb082fc r2e06300 16 16 #include "polys.h" 17 17 #include "ideals.h" 18 // #include "kmatrix.h" 18 #include "kmatrix.h" 19 #include "GMPrat.h" 19 20 //#include "fast_maps.h" //Mapping of ideals 20 21 // #include "maps.h" … … 778 779 } 779 780 free(redRowsArray); 781 /*And now for the strictly positive rows 782 * Doesn't gain significant speedup 783 */ 784 /*int *posRowsArray=NULL; 785 num_alloc=0; 786 num_elts=0; 787 for(int ii=0;ii<ddineq->rowsize;ii++) 788 { 789 intvec *ivPos = new intvec(this->numVars); 790 for(int jj=0;jj<this->numVars;jj++) 791 (*ivPos)[jj]=(int)mpq_get_d(ddineq->matrix[ii][jj+1]); 792 bool isStrictlyPos=FALSE; 793 int posCtr=0; 794 for(int jj=0;jj<this->numVars;jj++) 795 { 796 intvec *ivCanonical = new intvec(this->numVars); 797 jj==0 ? (*ivCanonical)[ivPos->length()-1]=1 : (*ivCanonical)[jj-1]=1; 798 if(dotProduct(*ivCanonical,*ivPos)!=0) 799 { 800 if ((*ivPos)[jj]>=0) 801 { 802 posCtr++; 803 } 804 } 805 delete ivCanonical; 806 } 807 if(posCtr==ivPos->length()) 808 isStrictlyPos=TRUE; 809 if(isStrictlyPos==TRUE) 810 { 811 if(num_alloc==0) 812 num_alloc += 1; 813 else 814 num_alloc += 1; 815 void *tmp = realloc(posRowsArray,(num_alloc*sizeof(int))); 816 if(!tmp) 817 { 818 WerrorS("Woah dude! Couldn't realloc memory\n"); 819 exit(-1); 820 } 821 posRowsArray = (int*)tmp; 822 posRowsArray[num_elts]=ii; 823 num_elts++; 824 } 825 delete ivPos; 826 } 827 offset=0; 828 for(int ii=0;ii<num_elts;ii++) 829 { 830 dd_MatrixRowRemove(&ddineq,posRowsArray[ii]+1-offset); 831 offset++; 832 } 833 free(posRowsArray);*/ 780 834 #endif 781 835 … … 942 996 gettimeofday(&t_ddMC_start,0); 943 997 #endif 944 dd_MatrixCanonicalize(&ddakt, &impl_linset, &redset, &newpos, &err); 998 /*dd_MatrixCanonicalize(&ddakt, &impl_linset, &redset, &newpos, &err);*/ 945 999 // set_copy(LL,ddakt->linset); 946 1000 dd_PolyhedraPtr ddpolyh; … … 952 1006 gettimeofday(&t_ddMC_end,0); 953 1007 t_ddMC += (t_ddMC_end.tv_sec - t_ddMC_start.tv_sec + 1e-6*(t_ddMC_end.tv_usec - t_ddMC_start.tv_usec)); 954 #endif 1008 #endif 955 1009 /* We loop through each row of P normalize it by making all 956 1010 * entries integer ones and add the resulting vector to the 957 1011 * int matrix facet::codim2Facets */ 958 for (int jj=1;jj<= P->rowsize;jj++)1012 for (int jj=1;jj<=/*ddakt*/P->rowsize;jj++) 959 1013 { 960 1014 fAct->numCodim2Facets++; … … 975 1029 #endif 976 1030 makeInt(P,jj,*n); 1031 /*for(int kk=0;kk<this->numVars;kk++) 1032 { 1033 int foo; 1034 foo = (int)mpq_get_d(ddakt->matrix[ii][kk+1]); 1035 (*n)[kk]=foo; 1036 }*/ 977 1037 #ifdef gfanp 978 1038 gettimeofday(&t_mI_end,0); … … 984 1044 /*We check whether the facet spanned by the codim-2 facets 985 1045 * intersects with the positive orthant. Otherwise we define this 986 * facet to be non-flippable 1046 * facet to be non-flippable. Works since we set the appropriate 1047 * linearity for ddakt above. 987 1048 */ 988 1049 intvec *iv_intPoint = new intvec(this->numVars); … … 1001 1062 #endif 1002 1063 interiorPoint(intPointMatrix,*iv_intPoint); 1064 // dd_rowset impl_linste,lbasis; 1065 // dd_LPSolutionPtr lps=NULL; 1066 // dd_ErrorType err; 1067 // dd_FindRelativeInterior(intPointMatrix, &impl_linset, &lbasis, &lps, &err); 1003 1068 #ifdef gfanp 1004 1069 gettimeofday(&t_iP_end, 0); … … 1020 1085 delete iv_intPoint; 1021 1086 dd_FreeMatrix(P); 1022 set_free(impl_linset);1023 set_free(redset);1024 free(newpos);1087 // set_free(impl_linset); 1088 // set_free(redset); 1089 // free(newpos); 1025 1090 // set_free(LL); 1026 1091 }//for … … 1141 1206 * compute the difference accordingly 1142 1207 */ 1208 #ifdef gfanp 1209 timeval t_markings_start, t_markings_end; 1210 gettimeofday(&t_markings_start, 0); 1211 #endif 1143 1212 bool markingsAreCorrect=FALSE; 1144 1213 dd_MatrixPtr intPointMatrix; … … 1231 1300 omFree(leadExpV); 1232 1301 }//for (int ii=0;ii<IDELEMS(srcRing_HH);ii++) 1302 #ifdef gfanp 1303 gettimeofday(&t_markings_end, 0); 1304 t_markings += (t_markings_end.tv_sec - t_markings_start.tv_sec + 1e-6*(t_markings_end.tv_usec - t_markings_start.tv_usec)); 1305 #endif 1233 1306 /*Now it is safe to idDelete(H)*/ 1234 1307 idDelete(&H); 1235 /*Now we add the constraint for the standard simplex*/ 1308 /*Now we add the constraint for the standard simplex*/ 1309 // #ifdef gfanp 1310 // timeval t_dd_start, t_dd_end; 1311 // gettimeofday(&t_dd_start, 0); 1312 // #endif 1236 1313 dd_set_si(intPointMatrix->matrix[aktrow][0],-1); 1237 1314 for (int jj=1;jj<=this->numVars;jj++) … … 1241 1318 //Let's make sure we compute interior points from the positive orthant 1242 1319 dd_MatrixPtr posRestr=dd_CreateMatrix(this->numVars,this->numVars+1); 1320 1243 1321 int jj=1; 1244 1322 for (int ii=0;ii<this->numVars;ii++) … … 1249 1327 dd_MatrixAppendTo(&intPointMatrix,posRestr); 1250 1328 dd_FreeMatrix(posRestr); 1329 /*Insert preprocessing here. If it is before the dd_CreateMatrix things go pear shaped 1330 * Otherwise things will go pear shaped if called after the standard simplex constraints are added 1331 */ 1332 preprocessInequalities(intPointMatrix); 1251 1333 intvec *iv_weight = new intvec(this->numVars); 1334 #ifdef gfanp 1335 timeval t_dd_start, t_dd_end; 1336 gettimeofday(&t_dd_start, 0); 1337 #endif 1338 dd_ErrorType err; 1339 dd_rowset implLin, redrows; 1340 dd_rowindex newpos; 1341 1342 dd_MatrixCanonicalize(&intPointMatrix,&implLin,&redrows,&newpos,&err); 1343 // dd_MatrixCanonicalizeLinearity(&intPointMatrix,&implLin, &newpos,&err); 1344 //dd_MatrixRedundancyRemove is our time sink! 1345 // dd_MatrixRedundancyRemove(&intPointMatrix,&redrows,&newpos,&err); 1252 1346 interiorPoint(intPointMatrix, *iv_weight); //iv_weight now contains the interior point 1253 1347 dd_FreeMatrix(intPointMatrix); 1254 1348 /*Crude attempt for interior point */ 1349 /*dd_PolyhedraPtr ddpolyh; 1350 dd_ErrorType err; 1351 dd_rowset impl_linset,redset; 1352 dd_rowindex newpos; 1353 dd_MatrixCanonicalize(&intPointMatrix, &impl_linset, &redset, &newpos, &err); 1354 ddpolyh=dd_DDMatrix2Poly(intPointMatrix, &err); 1355 dd_MatrixPtr P; 1356 P=dd_CopyGenerators(ddpolyh); 1357 dd_FreePolyhedra(ddpolyh); 1358 for(int ii=0;ii<P->rowsize;ii++) 1359 { 1360 intvec *iv_row=new intvec(this->numVars); 1361 makeInt(P,ii+1,*iv_row); 1362 iv_weight =ivAdd(iv_weight, iv_row); 1363 delete iv_row; 1364 } 1365 dd_FreeMatrix(P); 1366 dd_FreeMatrix(intPointMatrix);*/ 1367 #ifdef gfanp 1368 gettimeofday(&t_dd_end, 0); 1369 t_dd += (t_dd_end.tv_sec - t_dd_start.tv_sec + 1e-6*(t_dd_end.tv_usec - t_dd_start.tv_usec)); 1370 #endif 1255 1371 /*Step 3 1256 1372 turn the minimal basis into a reduced one … … 1413 1529 return res; 1414 1530 } 1415 1531 1532 /** \brief Preprocessing of inequlities 1533 * Do some preprocessing on the matrix of inequalities 1534 * 1) Replace several constraints on the pos. orthants by just one for each orthant 1535 * 2) Remove duplicates of inequalities 1536 * 3) Remove inequalities that arise as sums of other inequalities 1537 */ 1538 void gcone::preprocessInequalities(dd_MatrixPtr &ddineq) 1539 { 1540 //Remove strictly positive rows 1541 // int *posRowsArray=NULL; 1542 // int num_alloc=0; 1543 // int num_elts=0; 1544 // for(int ii=0;ii<ddineq->rowsize;ii++) 1545 // { 1546 // intvec *ivPos = new intvec(pVariables); 1547 // for(int jj=0;jj<pVariables;jj++) 1548 // (*ivPos)[jj]=(int)mpq_get_d(ddineq->matrix[ii][jj+1]); 1549 // bool isStrictlyPos=FALSE; 1550 // int posCtr=0; 1551 // for(int jj=0;jj<pVariables;jj++) 1552 // { 1553 // intvec *ivCanonical = new intvec(pVariables); 1554 // jj==0 ? (*ivCanonical)[ivPos->length()-1]=1 : (*ivCanonical)[jj-1]=1; 1555 // if(dotProduct(*ivCanonical,*ivPos)!=0) 1556 // { 1557 // if ((*ivPos)[jj]>=0) 1558 // { 1559 // posCtr++; 1560 // } 1561 // } 1562 // delete ivCanonical; 1563 // } 1564 // if(posCtr==ivPos->length()) 1565 // isStrictlyPos=TRUE; 1566 // if(isStrictlyPos==TRUE) 1567 // { 1568 // if(num_alloc==0) 1569 // num_alloc += 1; 1570 // else 1571 // num_alloc += 1; 1572 // void *tmp = realloc(posRowsArray,(num_alloc*sizeof(int))); 1573 // if(!tmp) 1574 // { 1575 // WerrorS("Woah dude! Couldn't realloc memory\n"); 1576 // exit(-1); 1577 // } 1578 // posRowsArray = (int*)tmp; 1579 // posRowsArray[num_elts]=ii; 1580 // num_elts++; 1581 // } 1582 // delete ivPos; 1583 // } 1584 int offset=0; 1585 // for(int ii=0;ii<num_elts;ii++) 1586 // { 1587 // dd_MatrixRowRemove(&ddineq,posRowsArray[ii]+1-offset); 1588 // offset++; 1589 // } 1590 // free(posRowsArray); 1591 //Remove zeroes 1592 int rowsize=ddineq->rowsize; 1593 for(int ii=0;ii<ddineq->rowsize;ii++) 1594 { 1595 intvec *iv = new intvec(this->numVars); 1596 int posCtr=0; 1597 for(int jj=0;jj<this->numVars;jj++) 1598 { 1599 (*iv)[jj]=(int)mpq_get_d(ddineq->matrix[ii][jj+1]); 1600 if((*iv)[ii]>0) 1601 posCtr++; 1602 } 1603 if( (iv->compare(0)==0)) //|| (posCtr==iv->length()) ) 1604 { 1605 dd_MatrixRowRemove(&ddineq,ii+1); 1606 ii--; 1607 // rowsize=ddineq->rowsize; 1608 } 1609 delete iv; 1610 } 1611 //Remove duplicates of rows 1612 // posRowsArray=NULL; 1613 // num_alloc=0; 1614 // num_elts=0; 1615 // offset=0; 1616 // int num_newRows = ddineq->rowsize; 1617 // for(int ii=0;ii<ddineq->rowsize-1;ii++) 1618 // for(int ii=0;ii<num_newRows-1;ii++) 1619 // { 1620 // intvec *iv = new intvec(this->numVars);//1st vector to check against 1621 // for(int jj=0;jj<this->numVars;jj++) 1622 // (*iv)[jj]=(int)mpq_get_d(ddineq->matrix[ii][jj+1]); 1623 // for(int jj=ii+1;jj</*ddineq->rowsize*/num_newRows;jj++) 1624 // { 1625 // intvec *ivCheck = new intvec(this->numVars);//Checked against iv 1626 // for(int kk=0;kk<this->numVars;kk++) 1627 // (*ivCheck)[kk]=(int)mpq_get_d(ddineq->matrix[jj][kk+1]); 1628 // if (iv->compare(ivCheck)==0) 1629 // { 1630 // // cout << "=" << endl; 1631 // // num_alloc++; 1632 // // void *tmp=realloc(posRowsArray,(num_alloc*sizeof(int))); 1633 // // if(!tmp) 1634 // // { 1635 // // WerrorS("Woah dude! Couldn't realloc memory\n"); 1636 // // exit(-1); 1637 // // } 1638 // // posRowsArray = (int*)tmp; 1639 // // posRowsArray[num_elts]=jj; 1640 // // num_elts++; 1641 // dd_MatrixRowRemove(&ddineq,jj+1); 1642 // num_newRows = ddineq->rowsize; 1643 // } 1644 // delete ivCheck; 1645 // } 1646 // delete iv; 1647 // } 1648 // for(int ii=0;ii<num_elts;ii++) 1649 // { 1650 // dd_MatrixRowRemove(&ddineq,posRowsArray[ii]+1-offset); 1651 // offset++; 1652 // } 1653 // free(posRowsArray); 1654 //Apply Thm 2.1 of JOTA Vol 53 No 1 April 1987*/ 1655 }//preprocessInequalities 1656 1416 1657 /** \brief Compute a Groebner Basis 1417 1658 * … … 1484 1725 * Any rational point is automatically converted into an integer. 1485 1726 */ 1486 inline void gcone::interiorPoint( constdd_MatrixPtr &M, intvec &iv) //no const &M here since we want to remove redundant rows1727 inline void gcone::interiorPoint( dd_MatrixPtr &M, intvec &iv) //no const &M here since we want to remove redundant rows 1487 1728 { 1488 1729 dd_LPPtr lp,lpInt; … … 1491 1732 dd_LPSolutionPtr lpSol=NULL; 1492 1733 dd_rowset ddlinset,ddredrows; //needed for dd_FindRelativeInterior 1493 //dd_rowindex ddnewpos;1734 dd_rowindex ddnewpos; 1494 1735 dd_NumberType numb; 1495 //M->representation=dd_Inequality; 1496 //M->objective-dd_LPMin; //Not sure whether this is needed 1497 1498 //NOTE: Make this n-dimensional! 1499 //dd_set_si(M->rowvec[0],1);dd_set_si(M->rowvec[1],1);dd_set_si(M->rowvec[2],1); 1736 //M->representation=dd_Inequality; 1737 1738 //NOTE: Make this n-dimensional! 1739 //dd_set_si(M->rowvec[0],1);dd_set_si(M->rowvec[1],1);dd_set_si(M->rowvec[2],1); 1500 1740 1501 /*NOTE: Leave the following line commented out! 1502 * Otherwise it will cause interior points that are not strictly positive on some examples 1503 * 1504 */ 1505 //dd_MatrixCanonicalize(&M, &ddlinset, &ddredrows, &ddnewpos, &err); 1506 //if (err!=dd_NoError){cout << "Error during dd_MatrixCanonicalize" << endl;} 1507 //cout << "Tick 2" << endl; 1508 //dd_WriteMatrix(stdout,M); 1509 1741 /*NOTE: Leave the following line commented out! 1742 * Otherwise it will slow down computations a great deal 1743 * */ 1744 // dd_MatrixCanonicalizeLinearity(&M, &ddlinset, &ddnewpos, &err); 1745 //if (err!=dd_NoError){cout << "Error during dd_MatrixCanonicalize" << endl;} 1746 dd_MatrixPtr posRestr=dd_CreateMatrix(this->numVars,this->numVars+1); 1747 int jj=1; 1748 for (int ii=0;ii<this->numVars;ii++) 1749 { 1750 dd_set_si(posRestr->matrix[ii][jj],1); 1751 jj++; 1752 } 1753 dd_MatrixAppendTo(&M,posRestr); 1754 dd_FreeMatrix(posRestr); 1755 // dd_MatrixCanonicalizeLinearity(&M, &ddlinset, &ddnewpos, &err); 1510 1756 lp=dd_Matrix2LP(M, &err); 1511 1757 if (err!=dd_NoError){WerrorS("Error during dd_Matrix2LP in gcone::interiorPoint");} … … 1521 1767 #endif 1522 1768 1523 dd_FindRelativeInterior(M,&ddlinset,&ddredrows,&lpSol,&err);1769 // dd_FindRelativeInterior(M,&ddlinset,&ddredrows,&lpSol,&err); 1524 1770 if (err!=dd_NoError) 1525 1771 { … … 1528 1774 } 1529 1775 1530 //dd_LPSolve(lpInt,solver,&err); //This will not result in a point from the relative interior1531 if (err!=dd_NoError){WerrorS("Error during dd_LPSolve");}1776 dd_LPSolve(lpInt,solver,&err); //This will not result in a point from the relative interior 1777 // if (err!=dd_NoError){WerrorS("Error during dd_LPSolve");} 1532 1778 1533 //lpSol=dd_CopyLPSolution(lpInt);1534 if (err!=dd_NoError){WerrorS("Error during dd_CopyLPSolution");}1779 lpSol=dd_CopyLPSolution(lpInt); 1780 // if (err!=dd_NoError){WerrorS("Error during dd_CopyLPSolution");} 1535 1781 #ifdef gfan_DEBUG 1536 1782 cout << "Interior point: "; … … 1578 1824 dd_FreeLPData(lpInt); 1579 1825 dd_FreeLPData(lp); 1580 set_free(ddlinset);1581 set_free(ddredrows);1826 // set_free(ddlinset); 1827 // set_free(ddredrows); 1582 1828 1583 1829 }//void interiorPoint(dd_MatrixPtr const &M) 1584 1830 1831 inline void gcone::interiorPoint2(const dd_MatrixPtr &M, intvec &iv) 1832 { 1833 KMatrix<Rational> mMat(M->rowsize+1,M->colsize); 1834 for(int ii=0;ii<M->rowsize;ii++) 1835 { 1836 for(int jj=0;jj<M->colsize-1;jj++) 1837 { 1838 if(mpq_sgn(M->matrix[ii][jj+1])<-1) 1839 { 1840 mMat.set(ii,jj,-(Rational)mpq_get_d(M->matrix[ii][jj+1])); 1841 } 1842 else 1843 mMat.set(ii,jj,(Rational)mpq_get_d(M->matrix[ii][jj+1])); 1844 1845 // mMat.set(ii,jj,&(M->matrix[ii][jj+1]) ); 1846 cout << mpq_get_d(M->matrix[ii][jj+1]) << " "; 1847 // int val=(int)mMat.get(ii,jj); 1848 // cout << ii << "," << jj << endl;; 1849 // mpq_out_str (NULL, 10, (__mpq_struct)mMat.get(ii,jj)); 1850 } 1851 cout << endl; 1852 mMat.set(ii,M->colsize-1,1); 1853 } 1854 dd_WriteMatrix(stdout,M); 1855 // for(int ii=0;ii<M->rowsize;ii++) 1856 // { 1857 // cout << mMat.get(ii,ii+M->colsize) << " "; 1858 // if((ii+M->colsize)%M->colsize==0) 1859 // cout << endl; 1860 // } 1861 1862 Rational* mSol; 1863 int rank; 1864 int c; 1865 // dd_WriteMatrix(stdout,M); 1866 rank=mMat.solve(&mSol,&c); 1867 // for(int ii=0;ii<c;ii++) 1868 // iv[ii]=mSol[ii]; 1869 // cout << mSol[ii].get_den() << "/" << mSol[ii].get_num() << endl; 1870 int gcd=1; 1871 for(int ii=0;ii<c-1;ii++) 1872 gcd += intgcd(mSol[ii].get_den_si(),mSol[ii+1].get_den_si()); 1873 cout << gcd << endl; 1874 for(int ii=0;ii<iv.length();ii++) 1875 iv[ii]=(int)((mSol[ii].get_num_si()*gcd)/mSol[ii].get_den_si()); 1876 1877 } 1878 1879 1585 1880 /** \brief Copy a ring and add a weighted ordering in first place 1586 1881 * … … 1836 2131 idDelete((ideal*)&gcTmp->gcBasis);//Whonder why? 1837 2132 //If you use the following make sure it is uncommented in readConeFromFile 1838 //rDelete(gcTmp->baseRing);2133 // rDelete(gcTmp->baseRing); 1839 2134 } 1840 2135 #ifdef gfan_DEBUG … … 1874 2169 else if(gfanHeuristic==1) 1875 2170 { 2171 gcone *gcDel; 2172 gcDel = gcAct; 2173 gcAct = gcNext; 2174 // rDelete(gcDel->baseRing); 1876 2175 //Read st00f from file 1877 gcAct = gcNext;1878 2176 //implant the GB into gcAct 1879 2177 readConeFromFile(gcAct->getUCN(), gcAct); … … 2411 2709 2412 2710 if(line=="RING") 2413 { /*2414 getline(gcInputFile,line);2415 found = line.find("a(");2416 line.erase(0,found+2);2417 string strweight;2418 strweight=line.substr(0,line.find_first_of(")"));2419 intvec *iv=new intvec(this->numVars);2420 for(int ii=0;ii<this->numVars;ii++)2421 {2422 string weight;2423 weight=line.substr(0,line.find_first_of(",)"));2424 (*iv)[ii]=atoi(weight.c_str());2425 line.erase(0,line.find_first_of(",)")+1);2426 }2427 ring newRing;2428 if(currRing->order[0]!=ringorder_a)2429 {2430 newRing=rCopyAndAddWeight(currRing,iv);2431 }2432 else2433 {2434 newRing=rCopy0(currRing);2435 int length=this->numVars;2436 int *A=(int *)omAlloc0(length*sizeof(int));2437 for(int jj=0;jj<length;jj++)2438 {2439 A[jj]=-(*iv)[jj];2440 }2441 omFree(newRing->wvhdl[0]);2442 newRing->wvhdl[0]=(int*)A;2443 newRing->block1[0]=length;2444 }2445 delete iv;2446 rComplete(newRing);2447 gc->baseRing=rCopy(newRing);2448 if(currRing!=gc->baseRing)2449 rChangeCurrRing(gc->baseRing);*/ 2711 { 2712 // getline(gcInputFile,line); 2713 // found = line.find("a("); 2714 // line.erase(0,found+2); 2715 // string strweight; 2716 // strweight=line.substr(0,line.find_first_of(")")); 2717 // intvec *iv=new intvec(this->numVars); 2718 // for(int ii=0;ii<this->numVars;ii++) 2719 // { 2720 // string weight; 2721 // weight=line.substr(0,line.find_first_of(",)")); 2722 // (*iv)[ii]=atoi(weight.c_str()); 2723 // line.erase(0,line.find_first_of(",)")+1); 2724 // } 2725 // ring newRing; 2726 // if(currRing->order[0]!=ringorder_a) 2727 // { 2728 // newRing=rCopyAndAddWeight(currRing,iv); 2729 // } 2730 // else 2731 // { 2732 // newRing=rCopy0(currRing); 2733 // int length=this->numVars; 2734 // int *A=(int *)omAlloc0(length*sizeof(int)); 2735 // for(int jj=0;jj<length;jj++) 2736 // { 2737 // A[jj]=-(*iv)[jj]; 2738 // } 2739 // omFree(newRing->wvhdl[0]); 2740 // newRing->wvhdl[0]=(int*)A; 2741 // newRing->block1[0]=length; 2742 // } 2743 // delete iv; 2744 // rComplete(newRing); 2745 // gc->baseRing=rCopy(newRing); 2746 // if(currRing!=gc->baseRing) 2747 // rChangeCurrRing(gc->baseRing); 2450 2748 } 2451 2749 … … 2683 2981 float gcone::time_getCodim2Normals; 2684 2982 float gcone::time_flip; 2983 float gcone::t_markings; 2984 float gcone::t_dd; 2685 2985 float gcone::time_enqueue; 2686 2986 float gcone::time_computeInv; … … 2771 3071 cout << " t_iP:" << gcone::t_iP << endl; 2772 3072 cout << "t_Flip:" << gcone::time_flip << endl; 3073 cout << " t_markings:" << gcone::t_markings << endl; 3074 cout << " t_dd:" << gcone::t_dd << endl; 2773 3075 cout << "t_computeInv:" << gcone::time_computeInv << endl; 2774 3076 cout << "t_enqueue:" << gcone::time_enqueue << endl; -
kernel/gfan.h
rb082fc r2e06300 141 141 static float time_getCodim2Normals; 142 142 static float time_flip; 143 static float t_ffG; 144 static float t_markings; 145 static float t_dd; 146 static float t_kStd; 143 147 static float time_enqueue; 144 148 static float time_computeInv; … … 204 208 inline ideal ffG(const ideal &H, const ideal &G); 205 209 inline void getGB(ideal const &inputIdeal); 206 inline void interiorPoint(const dd_MatrixPtr &M, intvec &iv); 210 inline void interiorPoint( dd_MatrixPtr &M, intvec &iv); 211 inline void interiorPoint2(const dd_MatrixPtr &M, intvec &iv); 212 inline void preprocessInequalities(dd_MatrixPtr &M); 207 213 ring rCopyAndAddWeight(const ring &r, const intvec *ivw); 208 214 ring rCopyAndChangeWeight(const ring &r, intvec *ivw);
Note: See TracChangeset
for help on using the changeset viewer.