Changeset f9db28 in git for kernel/gfan.cc
- Timestamp:
- Apr 27, 2009, 4:39:52 PM (15 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- c8e7d30a5e816b0f667c4b17450162f5f75dca54
- Parents:
- 99b3e4240d7eab99ea8b32817b9144e179f3f495
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gfan.cc
r99b3e42 rf9db28 2 2 Compute the Groebner fan of an ideal 3 3 $Author: monerjan $ 4 $Date: 2009-04-2 4 15:23:16$5 $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1. 39 2009-04-24 15:23:16monerjan Exp $6 $Id: gfan.cc,v 1. 39 2009-04-24 15:23:16monerjan Exp $4 $Date: 2009-04-27 14:39:52 $ 5 $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1.40 2009-04-27 14:39:52 monerjan Exp $ 6 $Id: gfan.cc,v 1.40 2009-04-27 14:39:52 monerjan Exp $ 7 7 */ 8 8 … … 112 112 } 113 113 114 /** Return the flipped GB*/ 115 ideal getFlipGB() 116 { 117 return this->flipGB; 118 } 119 114 120 /** Print the flipped GB*/ 115 121 void printFlipGB() … … 121 127 bool isIncoming; //Is the facet incoming or outgoing? 122 128 facet *next; //Pointer to next facet 129 130 friend class gcone; //Bad style 123 131 }; 124 132 … … 138 146 ring rootRing; //good to know this -> generic walk 139 147 ideal inputIdeal; //the original 148 /* TODO in order to save memory use pointers to rootRing and inputIdeal instead */ 140 149 public: 141 150 /** \brief Default constructor. … … 162 171 } 163 172 173 /** \brief Copy constructor 174 * 175 * Copies one cone, forgets about everything but the facetNormal 176 */ 177 gcone(gcone& gc) 178 { 179 this->next=NULL; 180 facet *f=this->facetPtr; 181 f->fNormal=gc.facetPtr->getFacetNormal(); 182 this->gcBasis=gc.facetPtr->getFlipGB(); 183 184 /*Reverse direction of the facet normal*/ 185 intvec *foo=f->getFacetNormal(); 186 for (int ii=0; ii<this->numVars;ii++) 187 { 188 (*foo)[ii]=-(*foo)[ii]; 189 //(*f).(*fNormal)[ii]=-( (*f).(*fNormal)[ii]); 190 } 191 f->setFacetNormal(foo); 192 } 193 194 /** \brief Default destructor */ 164 195 ~gcone(); //destructor 165 196 166 197 /** Pointer to the first facet */ 167 198 facet *facetPtr; //Will hold the adress of the first facet; set by gcone::getConeNormals 168 poly gcMarkedTerm; //marked terms of the cone's Groebner basis199 169 200 /** # of variables in the ring */ 170 201 int numVars; //#of variables in the ring … … 451 482 initialForm->m[ii]=initialFormElement[ii]; 452 483 }//for 453 f->setFlipGB(initialForm); //FIXME PROBABLY WRONG TO STORE HERE SINCE INA!=flibGB484 //f->setFlipGB(initialForm); //FIXME PROBABLY WRONG TO STORE HERE SINCE INA!=flibGB 454 485 #ifdef gfan_DEBUG 455 486 cout << "Initial ideal is: " << endl; 456 487 idShow(initialForm); 457 f->printFlipGB();488 //f->printFlipGB(); 458 489 cout << "===" << endl; 459 490 #endif … … 683 714 684 715 f->setFlipGB(dstRing_I);//store the flipped GB 716 #ifdef gfan_DEBUG 717 cout << "Flipped GB is: " << endl; 685 718 f->printFlipGB(); 719 #endif 686 720 687 721 }//void flip(ideal gb, facet *f) … … 798 832 }//void getGB 799 833 800 ideal GenGrbWlk(ideal, ideal); //Implementation of the Generic Groebner Walk. Needed for a) Computing the sink and b) finding search facets 834 /** \brief The Generic Groebner Walk due to FJLT 835 * Needed for computing the search facet 836 */ 837 ideal GenGrbWlk(ideal, ideal) 838 { 839 }//GGW 801 840 802 841 … … 961 1000 rootRing=rCopy0(currRing); 962 1001 rootRing->order[0]=ringorder_lp; 1002 //NOTE: Build ring accordiing to rCopyAndChangeWeight 963 1003 /*rootRing->order[0]=ringorder_a; 964 1004 rootRing->order[1]=ringorder_lp; … … 993 1033 /*Now it is time to compute the search facets, respectively start the reverse search. 994 1034 But since we are in the root all facets should be search facets. IS THIS TRUE? 995 MIND: AS OF NOW, THE LIST OF FACETS IS NOT PURGED OF NON-FLIPPAPLE FACETS1035 NOTE: Check for flippability is not very sophisticated 996 1036 */ 997 1037
Note: See TracChangeset
for help on using the changeset viewer.