Changeset 305057 in git for kernel/gfan.cc


Ignore:
Timestamp:
Nov 27, 2010, 11:52:21 AM (13 years ago)
Author:
Martin Monerjan
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
97939e5ee5fff70c24cb3d9f9582523bf3efaf60
Parents:
43317d7c168dc7963686b32ca4150c8777e93843
Message:
grcone to compute a single cone. Needs wp ordering. Just a wrapper to call gfan in a special way. 
gfan has new third parameter which is by default FALSE
removed two cddlib frees in getConeNormals


git-svn-id: file:///usr/local/Singular/svn/trunk@13680 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/gfan.cc

    r43317d r305057  
    2020//#include "fast_maps.h"        //Mapping of ideals
    2121// #include "maps.h"
    22 // #include "ring.h"    //apparently not needed
     22#include "ring.h"       //apparently not needed
    2323// #include "structs.h"
    2424#include <Singular/lists.h>
     
    12071207        }       
    12081208        //Clean up but don't delete the return value!   
    1209         dd_FreeMatrix(ddineq); 
     1209        //dd_FreeMatrix(ddineq);       
    12101210        set_free(ddredrows);//check
    12111211        set_free(ddlinset);//check
    1212         free(ddnewpos);//<-- NOTE Here the crash occurs omAlloc issue?
     1212        //free(ddnewpos);//<-- NOTE Here the crash occurs omAlloc issue?
    12131213#ifdef gfanp
    12141214        gettimeofday(&end, 0);
     
    17081708        t_getExtremalRays += (end.tv_sec - start.tv_sec + 1e-6*(end.tv_usec - start.tv_usec));
    17091709#endif 
    1710 }               
     1710}
     1711
     1712/** Order the spanning rays in a lex way hopefully using qsort()*/
     1713void gcone::orderRays()
     1714{
     1715//   qsort(gcRays,sizeof(int64vec),int64vec::compare);
     1716}
    17111717       
    17121718inline bool gcone::iv64isStrictlyPositive(const int64vec * iv64)
     
    17231729        return res;
    17241730}
    1725        
     1731
    17261732/** \brief Compute the Groebner Basis on the other side of a shared facet
    17271733 *
     
    44134419int64vec *gcone::ivZeroVector;
    44144420// 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 */
     4424lists gfan(ideal inputIdeal, int h, bool singleCone=FALSE)
    44164425{
    44174426        lists lResList; //this is the object we return 
     
    44714480                        gcone::dd_LinealitySpace = gcAct->computeLinealitySpace();
    44724481                        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                        }                           
    44744486                        //Switch back to the ring the computation was started in
    44754487//                      rChangeCurrRing(inputRing);
     
    45504562}
    45514563
    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 */
     4568lists 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
Note: See TracChangeset for help on using the changeset viewer.