Changeset ca02ab in git
- Timestamp:
- Jun 19, 2009, 1:22:06 PM (14 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 4c4979113300821a84ed183fecde7b3efce05832
- Parents:
- 0724284e35457907e97c6df4677bb5a0677b2501
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gfan.cc
r0724284 rca02ab 2 2 Compute the Groebner fan of an ideal 3 3 $Author: monerjan $ 4 $Date: 2009-06-1 6 15:49:43$5 $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1.6 2 2009-06-16 15:49:43monerjan Exp $6 $Id: gfan.cc,v 1.6 2 2009-06-16 15:49:43monerjan Exp $4 $Date: 2009-06-19 11:22:06 $ 5 $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1.63 2009-06-19 11:22:06 monerjan Exp $ 6 $Id: gfan.cc,v 1.63 2009-06-19 11:22:06 monerjan Exp $ 7 7 */ 8 8 … … 25 25 #include <fstream> //read-write cones to files 26 26 #include <gmp.h> 27 #include <string> 28 #include <sstream> 27 29 //#include <gmpxx.h> 28 30 … … 1623 1625 We always choose the first facet from fListPtr as facet to be flipped 1624 1626 */ 1625 while(SearchListAct->next!=NULL)1627 while(SearchListAct->next!=NULL) 1626 1628 {//NOTE See to it that the cone is only changed after ALL facets have been flipped! 1627 1629 //As of now this is not the case! 1628 1630 int flag=1; 1629 // while(fAct->next!=NULL)1630 // {1631 // gcAct->flip(gcAct->gcBasis,SearchListAct);1632 // ring rTmp=rCopy(SearchListAct->flipRing);1633 // //NOTE It is absolutely crucial to go to the new ring before constructing a new cone!1634 // rComplete(rTmp);1635 // rChangeCurrRing(rTmp);1636 // gcone *gcTmp = new gcone::gcone(*gcAct,*SearchListAct);1637 // gcTmp->getConeNormals(gcTmp->gcBasis, FALSE);1638 // gcTmp->getCodim2Normals(*gcTmp);1639 // /*add facets to SLA here*/1640 // rChangeCurrRing(gcAct->baseRing);1641 // gcPtr->next=gcTmp;1642 // if(flag==1)1643 // gcAct->next=gcTmp;1644 // gcPtr=gcPtr->next;1645 // fAct=fAct->next;1646 // flag++;1647 // }1648 //1649 // if(SearchListAct->getUCN()!=SearchListAct->next->getUCN())1650 // {1651 // ring r=rCopy(SearchListAct->flipRing);1652 // rComplete(r);1653 // rChangeCurrRing(r);1654 // gcAct = gcAct->next;1655 // }1656 // SearchListAct = SearchListAct->next;1657 1631 fAct = SearchListAct; 1658 while( (fAct->next!=NULL) && (fAct->getUCN()==fAct->next->getUCN() ) ) 1632 //while( ( (fAct->next!=NULL) && (fAct->getUCN()==fAct->next->getUCN() ) ) ) 1633 do 1659 1634 { 1660 1635 gcAct->flip(gcAct->gcBasis,fAct); … … 1671 1646 gcAct->next=gcTmp; 1672 1647 gcPtr=gcPtr->next; 1673 fAct=fAct->next; 1648 if(fAct->getUCN() == fAct->next->getUCN()) 1649 { 1650 fAct=fAct->next; 1651 } 1652 else 1653 break; 1674 1654 flag++; 1655 }while( ( (fAct->next!=NULL) && (fAct->getUCN()==fAct->next->getUCN() ) ) ); 1656 if (fAct->next!=NULL) 1657 { 1658 SearchListAct=fAct->next; 1659 ring r=rCopy(SearchListAct->flipRing); 1660 rComplete(r); 1661 rChangeCurrRing(r); 1662 gcAct = gcAct->next; 1675 1663 } 1676 SearchListAct=fAct->next; 1677 ring r=rCopy(SearchListAct->flipRing); 1678 rComplete(r); 1679 rChangeCurrRing(r); 1680 gcAct = gcAct->next; 1664 else 1665 { 1666 SearchListAct=NULL; 1667 } 1681 1668 1682 1669 } … … 1852 1839 void writeConeToFile(gcone const &gc, bool usingIntPoints=FALSE) 1853 1840 { 1854 ofstream gcOutputFile("/tmp/cone1.gc"); 1855 facet *fAct = new facet(); 1856 fAct = gc.facetPtr; 1841 int UCN=gc.UCN; 1842 stringstream ss; 1843 ss << UCN; 1844 string UCNstr = ss.str(); 1845 1846 char prefix[]="/tmp/cone"; 1847 char *UCNstring; 1848 strcpy(UCNstring,UCNstr.c_str()); 1849 char suffix[]=".sg"; 1850 char *filename=strcat(prefix,UCNstring); 1851 strcat(filename,suffix); 1852 1853 ofstream gcOutputFile(filename); 1854 facet *fAct = new facet(); //NOTE Why new? 1855 fAct = gc.facetPtr; 1857 1856 1858 1857 char *ringString = rString(currRing);
Note: See TracChangeset
for help on using the changeset viewer.