Changeset 305057 in git
- Timestamp:
- Nov 27, 2010, 11:52:21 AM (13 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 97939e5ee5fff70c24cb3d9f9582523bf3efaf60
- Parents:
- 43317d7c168dc7963686b32ca4150c8777e93843
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/extra.cc
r43317d r305057 3610 3610 ideal I=((ideal)h->Data()); 3611 3611 res->rtyp=LIST_CMD; 3612 res->data=(lists) gfan(I,heuristic );3612 res->data=(lists) gfan(I,heuristic,FALSE); 3613 3613 return FALSE; 3614 3614 } … … 3619 3619 } 3620 3620 } 3621 //Possibility to have only one Gröbner cone computed by specifying a weight vector FROM THE RELATIVE INTERIOR! 3622 //Needs wp as ordering! 3623 if(strcmp(sys_cmd,"grcone")==0) 3624 { 3625 if(h!=NULL && h->Typ()==IDEAL_CMD && h->next!=NULL && h->next->Typ()==INT_CMD) 3626 { 3627 ideal I=((ideal)h->Data()); 3628 res->rtyp=LIST_CMD; 3629 res->data=(lists)grcone_by_intvec(I); 3630 } 3631 } 3621 3632 else 3633 3622 3634 #endif 3623 3635 /*==================== Error =================*/ -
kernel/gfan.cc
r43317d r305057 20 20 //#include "fast_maps.h" //Mapping of ideals 21 21 // #include "maps.h" 22 //#include "ring.h" //apparently not needed22 #include "ring.h" //apparently not needed 23 23 // #include "structs.h" 24 24 #include <Singular/lists.h> … … 1207 1207 } 1208 1208 //Clean up but don't delete the return value! 1209 dd_FreeMatrix(ddineq);1209 //dd_FreeMatrix(ddineq); 1210 1210 set_free(ddredrows);//check 1211 1211 set_free(ddlinset);//check 1212 free(ddnewpos);//<-- NOTE Here the crash occurs omAlloc issue?1212 //free(ddnewpos);//<-- NOTE Here the crash occurs omAlloc issue? 1213 1213 #ifdef gfanp 1214 1214 gettimeofday(&end, 0); … … 1708 1708 t_getExtremalRays += (end.tv_sec - start.tv_sec + 1e-6*(end.tv_usec - start.tv_usec)); 1709 1709 #endif 1710 } 1710 } 1711 1712 /** Order the spanning rays in a lex way hopefully using qsort()*/ 1713 void gcone::orderRays() 1714 { 1715 // qsort(gcRays,sizeof(int64vec),int64vec::compare); 1716 } 1711 1717 1712 1718 inline bool gcone::iv64isStrictlyPositive(const int64vec * iv64) … … 1723 1729 return res; 1724 1730 } 1725 1731 1726 1732 /** \brief Compute the Groebner Basis on the other side of a shared facet 1727 1733 * … … 4413 4419 int64vec *gcone::ivZeroVector; 4414 4420 // ideal gfan(ideal inputIdeal, int h) 4415 lists gfan(ideal inputIdeal, int h) 4421 /** Main routine 4422 * The first and second parameter are mandatory. The third (and maybe fourth) parameter is for Janko :) 4423 */ 4424 lists gfan(ideal inputIdeal, int h, bool singleCone=FALSE) 4416 4425 { 4417 4426 lists lResList; //this is the object we return … … 4471 4480 gcone::dd_LinealitySpace = gcAct->computeLinealitySpace(); 4472 4481 gcAct->getExtremalRays(*gcAct); 4473 gcAct->noRevS(*gcAct); //Here we go! 4482 if(singleCone==FALSE)//Is Janko here? 4483 {//Compute the whole fan 4484 gcAct->noRevS(*gcAct); //Here we go! 4485 } 4474 4486 //Switch back to the ring the computation was started in 4475 4487 // rChangeCurrRing(inputRing); … … 4550 4562 } 4551 4563 4552 #endif 4564 /** Compute a single Gröbner cone by specifying an ideal and a weight vector. 4565 * NOTE: We do NOT check whether the vector is from the relative interior of the cone. 4566 * That is upon the user to assure. 4567 */ 4568 lists grcone_by_intvec(ideal inputIdeal) 4569 { 4570 if( (rRingOrder_t)currRing->order[0] == ringorder_wp) 4571 { 4572 lists lResList; 4573 lResList=gfan(inputIdeal, 0, TRUE); 4574 } 4575 else 4576 WerrorS("Need wp ordering"); 4577 } 4578 #endif -
kernel/gfan.h
r43317d r305057 23 23 extern int gfanHeuristic; 24 24 25 lists gfan(ideal inputIdeal, int heuristic); 25 lists gfan(ideal inputIdeal, int heuristic, bool singleCone); 26 lists grcone_by_intvec(ideal inputIdeal); 26 27 27 28 class facet … … 223 224 void getCodim2Normals(const gcone &gc); 224 225 void getExtremalRays(const gcone &gc); 226 void orderRays(); 225 227 void flip(ideal gb, facet *f); 226 228 void flip2(const ideal &gb, facet *f);
Note: See TracChangeset
for help on using the changeset viewer.