Changeset 7379a77 in git
- Timestamp:
- Jul 1, 2009, 11:41:00 AM (14 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
- Children:
- c4c127743ed450cab07372ff8921b84b9a15e6db
- Parents:
- 2126c0d13d7a85352b229c0bd8232fb6cd6d726d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gfan.cc
r2126c0d r7379a77 2 2 Compute the Groebner fan of an ideal 3 3 $Author: monerjan $ 4 $Date: 2009-0 6-29 14:46:58$5 $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1.6 8 2009-06-29 14:46:58monerjan Exp $6 $Id: gfan.cc,v 1.6 8 2009-06-29 14:46:58monerjan Exp $4 $Date: 2009-07-01 09:41:00 $ 5 $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1.69 2009-07-01 09:41:00 monerjan Exp $ 6 $Id: gfan.cc,v 1.69 2009-07-01 09:41:00 monerjan Exp $ 7 7 */ 8 8 … … 587 587 588 588 #ifdef gfan_DEBUG 589 cout << "The inequality matrix is" << endl;590 dd_WriteMatrix(stdout, ddineq);589 // cout << "The inequality matrix is" << endl; 590 // dd_WriteMatrix(stdout, ddineq); 591 591 #endif 592 592 … … 608 608 ddcols = ddineq->colsize; 609 609 #ifdef gfan_DEBUG 610 cout << "Having removed redundancies, the normals now read:" << endl;611 dd_WriteMatrix(stdout,ddineq);612 cout << "Rows = " << ddrows << endl;613 cout << "Cols = " << ddcols << endl;610 // cout << "Having removed redundancies, the normals now read:" << endl; 611 // dd_WriteMatrix(stdout,ddineq); 612 // cout << "Rows = " << ddrows << endl; 613 // cout << "Cols = " << ddcols << endl; 614 614 #endif 615 615 … … 655 655 { 656 656 #ifdef gfan_DEBUG 657 cout << "Ignoring facet" ;657 cout << "Ignoring facet" << endl; 658 658 load->show(); 659 cout << endl; 659 660 //fAct->next=NULL; 660 661 #endif … … 721 722 void getCodim2Normals(gcone const &gc) 722 723 { 723 //this->facetPtr->codim2Ptr = new facet(2); //instantiate a (codim-2)-facet 724 //this->facetPtr->codim2Ptr = new facet(2); //instantiate a (codim-2)-facet 725 facet *fAct; 726 fAct = this->facetPtr; 724 727 facet *codim2Act; 725 728 //codim2Act = this->facetPtr->codim2Ptr; … … 737 740 dd_PolyhedraPtr ddpolyh; 738 741 for (int ii=0; ii<this->numFacets; ii++) 742 //while(fAct!=NULL) 739 743 { 740 744 ddakt = dd_CopyMatrix(ddineq); … … 750 754 P=dd_CopyGenerators(ddpolyh); 751 755 #ifdef gfan_DEBUG 752 // dd_WriteMatrix(stdout,P); 756 // cout << "Codim2 facet:" << endl; 757 // dd_WriteMatrix(stdout,P); 758 // cout << endl; 753 759 #endif 754 760 … … 759 765 for (int jj=1;jj<=P->rowsize;jj++) 760 766 { 761 this->facetPtr->numCodim2Facets++; 762 if(this->facetPtr->numCodim2Facets==1) 767 //this->facetPtr->numCodim2Facets++; 768 fAct->numCodim2Facets++; 769 if(fAct->numCodim2Facets==1) 770 //if(this->facetPtr->numCodim2Facets==1) 763 771 { 764 this->facetPtr->codim2Ptr = new facet(2); 765 codim2Act = this->facetPtr->codim2Ptr; 772 //this->facetPtr->codim2Ptr = new facet(2); 773 fAct->codim2Ptr = new facet(2); 774 //codim2Act = this->facetPtr->codim2Ptr; 775 codim2Act = fAct->codim2Ptr; 766 776 } 767 777 else … … 782 792 delete n;*/ 783 793 } 784 794 fAct = fAct->next; 785 795 dd_FreeMatrix(ddakt); 786 796 dd_FreePolyhedra(ddpolyh); 787 } 797 }//while 788 798 } 789 799 … … 1378 1388 } 1379 1389 #ifdef gfan_DEBUG 1380 iv.show();1381 cout << endl;1390 // iv.show(); 1391 // cout << endl; 1382 1392 #endif 1383 1393 mpq_clear(qkgV); … … 1395 1405 1396 1406 /** \brief Copy a ring and add a weighted ordering in first place 1397 * Kudos to walkSupport.cc1407 * 1398 1408 */ 1399 1409 ring rCopyAndAddWeight(ring const &r, intvec const *ivw) … … 1720 1730 { 1721 1731 if( gcNext->getUCN() == UCNcounter+1 ) 1722 { //NOTE THIS IS BUGGY. Apparently changes to the wrong ring1732 { 1723 1733 gcAct = gcNext; 1724 1734 rAct=rCopy(gcAct->baseRing); … … 1842 1852 (*n)[ii] = ((*n)[ii])/ggT; 1843 1853 } 1854 codim2Act->setFacetNormal(n); 1844 1855 codim2Act = codim2Act->next; 1845 1856 } … … 1868 1879 slAct = &f; 1869 1880 facet *slEnd; //Pointer to end of SLA 1870 slEnd = &f; 1881 slEnd = &f; 1882 facet *slEndStatic; //marks the end before a new facet is added 1871 1883 facet *fAct; 1872 1884 fAct = this->facetPtr; … … 1880 1892 slEnd=slEnd->next; 1881 1893 } 1894 slEndStatic = slEnd; 1882 1895 /*1st step: compare facetNormals*/ 1883 1896 intvec *fNormal = new intvec(this->numVars); … … 1887 1900 while(fAct!=NULL) 1888 1901 { 1889 doNotAdd= FALSE;1902 doNotAdd=TRUE; 1890 1903 fNormal = fAct->getFacetNormal(); 1891 1904 slAct = &f; //return to start of list 1892 while(slAct!=NULL) 1905 codim2Act = fAct->codim2Ptr; 1906 while(slAct!=slEndStatic->next) 1893 1907 { 1894 1908 slNormal = slAct->getFacetNormal(); … … 1898 1912 { 1899 1913 //NOTE check codim2facets here 1900 // while(codim2Act!=NULL) 1901 // { 1902 // f2Normal = codim2Act->getFacetNormal(); 1903 // sl2Act = f.codim2Ptr; 1904 // while(sl2Act!=NULL) 1905 // { 1906 // sl2Normal = sl2Act->getFacetNormal(); 1907 // if(!isParallel(f2Normal,sl2Normal)) 1908 // { 1909 // doNotAdd=FALSE; 1910 // break; 1911 // } 1912 // sl2Act = sl2Act->next; 1913 // } 1914 // if(doNotAdd==FALSE) 1915 // break; 1916 // codim2Act = codim2Act->next; 1917 // 1918 // } 1919 doNotAdd=FALSE; 1920 break; 1914 codim2Act = fAct->codim2Ptr; 1915 while(codim2Act!=NULL) 1916 { 1917 f2Normal = codim2Act->getFacetNormal(); 1918 sl2Act = f.codim2Ptr; 1919 while(sl2Act!=NULL) 1920 { 1921 sl2Normal = sl2Act->getFacetNormal(); 1922 if( !(areEqual(f2Normal,sl2Normal))) 1923 { 1924 doNotAdd=FALSE; 1925 break; 1926 1927 } 1928 sl2Act = sl2Act->next; 1929 } 1930 if(doNotAdd==FALSE) 1931 break; 1932 codim2Act = codim2Act->next; 1933 1934 } 1935 //doNotAdd=FALSE; 1936 //break; 1921 1937 } 1922 1938 slAct = slAct->next; 1939 1940 if(doNotAdd==FALSE) 1941 break; 1923 1942 } 1924 1943 if(doNotAdd==FALSE)
Note: See TracChangeset
for help on using the changeset viewer.