Changeset 2b3c62f in git
- Timestamp:
- Jul 2, 2009, 4:50:07 PM (14 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
- Children:
- d47d1f9a7d1ac2d3e103063187d2ec358274680b
- Parents:
- ae625f2a594a1db9f49dd5783b16e78893533168
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gfan.cc
rae625f r2b3c62f 2 2 Compute the Groebner fan of an ideal 3 3 $Author: monerjan $ 4 $Date: 2009-07-0 1 09:41:00$5 $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1. 69 2009-07-01 09:41:00monerjan Exp $6 $Id: gfan.cc,v 1. 69 2009-07-01 09:41:00monerjan Exp $4 $Date: 2009-07-02 14:50:07 $ 5 $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1.70 2009-07-02 14:50:07 monerjan Exp $ 6 $Id: gfan.cc,v 1.70 2009-07-02 14:50:07 monerjan Exp $ 7 7 */ 8 8 … … 96 96 bool isIncoming; //Is the facet incoming or outgoing? 97 97 facet *next; //Pointer to next facet 98 facet *prev; //Pointer to predecessor. Needed for the SearchList in noRevS 98 99 facet *codim2Ptr; //Pointer to (codim-2)-facet. Bit of recursion here ;-) 99 100 int numCodim2Facets; … … 113 114 this->flipGB=NULL; 114 115 this->isIncoming=FALSE; 115 this->next=NULL; 116 this->next=NULL; 117 this->prev=NULL; 116 118 this->flipRing=NULL; 117 119 } … … 133 135 this->isIncoming=FALSE; 134 136 this->next=NULL; 137 this->prev=NULL; 135 138 this->flipRing=NULL; 136 139 } … … 1684 1687 } 1685 1688 fAct = fAct->next; 1686 } 1689 } 1687 1690 1688 1691 SearchListAct = SearchListRoot; //Set to beginning of list 1692 /*Make SearchList doubly linked*/ 1693 while(SearchListAct!=NULL) 1694 { 1695 if(SearchListAct->next!=NULL) 1696 { 1697 SearchListAct->next->prev = SearchListAct; 1698 //SearchListAct = SearchListAct->next; 1699 } 1700 SearchListAct = SearchListAct->next; 1701 } 1702 SearchListAct = SearchListRoot; //Set to beginning of List 1689 1703 1690 1704 fAct = gcAct->facetPtr; … … 1713 1727 gcTmp->normalize(); 1714 1728 /*add facets to SLA here*/ 1715 gcTmp->enqueueNewFacets(*SearchListRoot);1729 SearchListRoot=gcTmp->enqueueNewFacets(*SearchListRoot); 1716 1730 gcTmp->showSLA(*SearchListRoot); 1717 1731 rChangeCurrRing(gcAct->baseRing); … … 1873 1887 /** 1874 1888 * Takes ptr to search list root 1875 */ 1876 void enqueueNewFacets(facet &f) 1877 { 1889 * Returns a pointer to new first element of Searchlist 1890 */ 1891 //void enqueueNewFacets(facet &f) 1892 facet * enqueueNewFacets(facet &f) 1893 { 1894 facet *slHead; 1895 slHead = &f; 1878 1896 facet *slAct; //called with f=SearchListRoot 1879 1897 slAct = &f; … … 1902 1920 doNotAdd=TRUE; 1903 1921 fNormal = fAct->getFacetNormal(); 1904 slAct = &f; //return to start of list1922 slAct = slHead; //return to start of list 1905 1923 codim2Act = fAct->codim2Ptr; 1906 1924 while(slAct!=slEndStatic->next) … … 1922 1940 if( !(areEqual(f2Normal,sl2Normal))) 1923 1941 { 1924 doNotAdd=FALSE; 1942 doNotAdd=FALSE; 1925 1943 break; 1926 1944 … … 1930 1948 if(doNotAdd==FALSE) 1931 1949 break; 1932 codim2Act = codim2Act->next; 1933 1950 codim2Act = codim2Act->next; 1934 1951 } 1935 //doNotAdd=FALSE; 1936 //break; 1952 if(doNotAdd==TRUE) 1953 {/*dequeue slAct*/ 1954 if(slAct->prev==NULL && slHead!=NULL) 1955 { 1956 slHead = slAct->next; 1957 slHead->prev = NULL; 1958 } 1959 else 1960 { 1961 slAct->prev->next = slAct->next; 1962 } 1963 //NOTE Memory leak above! 1964 break; 1965 } 1966 slAct = slAct->next; 1937 1967 } 1938 slAct = slAct->next; 1968 else 1969 { 1970 doNotAdd=FALSE; 1971 break; 1972 } 1973 //slAct = slAct->next; 1939 1974 1940 if(doNotAdd==FALSE)1941 break;1942 } 1975 //if(doNotAdd==FALSE) 1976 // break; 1977 }//while(slAct!=slEndStatic->next) 1943 1978 if(doNotAdd==FALSE) 1944 1979 { … … 1950 1985 fAct = fAct->next; 1951 1986 } 1987 return slHead; 1952 1988 // delete sl2Normal; 1953 1989 // delete slNormal;
Note: See TracChangeset
for help on using the changeset viewer.