Changeset 3fe215 in git


Ignore:
Timestamp:
Jul 25, 2014, 12:54:08 PM (10 years ago)
Author:
Yue Ren <ren@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
441944f17f356b9a04c768f8a43754bc29364747
Parents:
fb1872063d432246ad1af6b42c33a4c083f68071
git-author:
Yue Ren <ren@mathematik.uni-kl.de>2014-07-25 12:54:08+02:00
git-committer:
Yue Ren <ren@mathematik.uni-kl.de>2015-02-06 13:47:04+01:00
Message:
chg: startingPoint algorithm

changed so that for principal ideals or ideals whose tropical variety is trivial,
the startingPoint machinery is no longer used, instead it will immediately return a point
Location:
Singular/dyn_modules/gfanlib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/dyn_modules/gfanlib/startingCone.cc

    rfb1872 r3fe215  
    99#include <tropicalCurves.h>
    1010#include <bbcone.h>
     11#include <tropicalVarietyOfPolynomials.h>
    1112#include <tropicalVariety.h>
    1213
     
    8485    ideal I = (ideal) u->Data();
    8586    tropicalStrategy currentStrategy(I,currRing);
    86     if (currentStrategy.getDimensionOfIdeal()==currentStrategy.getDimensionOfHomogeneitySpace())
    87     {
    88       gfan::ZCone homogSpace = currentStrategy.getHomogeneitySpace();
    89       gfan::ZMatrix homogSpaceGenerators = homogSpace.generatorsOfLinealitySpace();
    90       assume(homogSpaceGenerators.getHeight()>0);
     87    if (idSize(I)==1)
     88    {
     89      poly g = I->m[0];
     90      std::set<gfan::ZCone> Tg = tropicalVariety(g,currRing,currentStrategy);
     91      if (Tg.empty())
     92      {
     93        res->rtyp = BIGINTMAT_CMD;
     94        res->data = (void*) zVectorToBigintmat(gfan::ZVector(0));
     95        return FALSE;
     96      }
     97      gfan::ZCone C = *(Tg.begin());
     98      gfan::ZMatrix rays = C.extremeRays();
     99      if (rays.getHeight()==0)
     100      {
     101        gfan::ZMatrix lin = C.generatorsOfLinealitySpace();
     102        res->rtyp = BIGINTMAT_CMD;
     103        res->data = (void*) zVectorToBigintmat(lin[0]);
     104        return FALSE;
     105      }
    91106      res->rtyp = BIGINTMAT_CMD;
    92       res->data = (void*) zVectorToBigintmat(homogSpaceGenerators[0]);
     107      res->data = (void*) zVectorToBigintmat(rays[0]);
     108      return FALSE;
     109    }
     110    gfan::ZCone C0 = currentStrategy.getHomogeneitySpace();
     111    if (C0.dimension()==currentStrategy.getDimensionOfIdeal())
     112    {
     113      gfan::ZMatrix lin = C0.generatorsOfLinealitySpace();
     114      res->rtyp = BIGINTMAT_CMD;
     115      res->data = (void*) zVectorToBigintmat(lin[0]);
    93116      return FALSE;
    94117    }
  • Singular/dyn_modules/gfanlib/tropicalStrategy.h

    rfb1872 r3fe215  
    2121  number uniformizingParameter;
    2222  gfan::ZCone linealitySpace;
     23
    2324  bool onlyLowerHalfSpace;
    2425
Note: See TracChangeset for help on using the changeset viewer.