Changeset 54248e in git for kernel/gfan.cc
- Timestamp:
- Mar 26, 2009, 11:30:21 AM (14 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- a9431ce0768900f372ea152334160e89ebab527c
- Parents:
- 9f9b142893198e383bb306d720e6dcb4e2da44ce
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gfan.cc
r9f9b142 r54248e 2 2 Compute the Groebner fan of an ideal 3 3 $Author: monerjan $ 4 $Date: 2009-03-2 5 19:55:50$5 $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1.2 1 2009-03-25 19:55:50monerjan Exp $6 $Id: gfan.cc,v 1.2 1 2009-03-25 19:55:50monerjan Exp $4 $Date: 2009-03-26 10:30:21 $ 5 $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1.22 2009-03-26 10:30:21 monerjan Exp $ 6 $Id: gfan.cc,v 1.22 2009-03-26 10:30:21 monerjan Exp $ 7 7 */ 8 8 … … 19 19 20 20 //Hacks for different working places 21 #define HOME21 #define ITWM 22 22 23 23 #ifdef UNI … … 51 51 private: 52 52 /** inner normal, describing the facet uniquely */ 53 intvec fNormal;53 intvec *fNormal; 54 54 public: 55 55 /** The default constructor. Do I need a constructor of type facet(intvec)? */ 56 56 facet() 57 57 { 58 //fNormal = FN;59 58 // Pointer to next facet. */ 60 59 /* Defaults to NULL. This way there is no need to check explicitly */ … … 65 64 ~facet(){;} 66 65 67 void setFacetNormal(intvec iv){ 66 /** Stores the facet normal \param intvec*/ 67 void setFacetNormal(intvec *iv){ 68 68 fNormal = iv; 69 return; 69 //return; 70 } 71 72 /** Method to print the facet normal*/ 73 void printNormal() 74 { 75 fNormal->show(); 70 76 } 71 77 … … 88 94 89 95 public: 96 gcone() 97 { 98 this->next=NULL; 99 this->facetPtr=NULL; 100 } 90 101 gcone(int); //constructor with dimension 91 102 ~gcone(); //destructor 103 facet *facetPtr; //Will hold the adress of the first facet 92 104 poly gcMarkedTerm; //marked terms of the cone's Groebner basis 93 105 ideal gcBasis; //GB of the cone … … 249 261 250 262 251 /*Write the normals into class facet 252 How do I get the #rows in ddineq? \exists s.th. like dd_NumRows? dd_get_si(ddineq->matrix[i][j]) ? 253 Strange enough: facet *f=new facet(intvec(2,3)) does work for the constructor facet(intvec FN){fNormal = FN;} 254 */ 263 /*Write the normals into class facet*/ 255 264 #ifdef gfan_DEBUG 256 265 cout << "Creating list of normals" << endl; … … 264 273 for (int kk = 0; kk<ddrows; kk++) 265 274 { 266 intvec load; //intvec to sto275 intvec *load = new intvec(numvar); //intvec to store a single facet normal that will then be stored via setFacetNormal 267 276 for (int jj = 1; jj <ddcols; jj++) 268 277 { … … 273 282 #endif 274 283 /*next two lines commented out. How to store values into intvec? */ 275 //load[jj] = (int)*foo; //store typecasted entry at pos jjof load284 (*load)[jj-1] = (int)*foo; //store typecasted entry at pos jj-1 of load 276 285 //fAct->setFacetNormal(load); 277 286 //check for flipability here … … 281 290 fAct = fAct->next; //scary :) 282 291 } 283 } 292 }//for jj<ddcols 293 /*Now load should be full and we can call setFacetNormal*/ 294 fAct->setFacetNormal(load); 295 fAct->printNormal(); 284 296 } 285 297 /* … … 304 316 ideal gfan(ideal inputIdeal) 305 317 { 318 int numvar = pVariables; 319 306 320 #ifdef gfan_DEBUG 307 321 cout << "Now in subroutine gfan" << endl; 308 322 #endif 309 323 ring rootRing; // The ring associated to the target ordering 324 rRingOrder_t t=ringorder_dp; 325 310 326 ideal res; 311 327 matrix ineq; //Matrix containing the boundary inequalities … … 314 330 315 331 rootRing=rCopy0(currRing); 332 rootRing=rInit(0,numvar,t); 316 333 rComplete(rootRing); 317 334 rChangeCurrRing(rootRing);
Note: See TracChangeset
for help on using the changeset viewer.