My Project
Loading...
Searching...
No Matches
Functions
tropicalTraversal.h File Reference
#include "groebnerCone.h"

Go to the source code of this file.

Functions

groebnerCones tropicalTraversalMinimizingFlips (const groebnerCone startingCone)
 
groebnerCones tropicalTraversal (const groebnerCone startingCone)
 
groebnerCones groebnerTraversal (const groebnerCone startingCone)
 

Function Documentation

◆ groebnerTraversal()

groebnerCones groebnerTraversal ( const groebnerCone  startingCone)

Pick a maximal Groebner cone from the working list and compute interior points on its facets as well as outer facet normals

Definition at line 141 of file tropicalTraversal.cc.

142{
143 const tropicalStrategy* currentStrategy = startingCone.getTropicalStrategy();
144
148 std::set<gfan::ZVector> finishedInteriorPoints;
149 bool onlyLowerHalfSpace = !currentStrategy->isValuationTrivial();
150
151 while(!workingList.empty())
152 {
153 /**
154 * Pick a maximal Groebner cone from the working list
155 * and compute interior points on its facets as well as outer facet normals
156 */
157 groebnerCone sigma=*(workingList.begin());
158 workingList.erase(workingList.begin());
159
160 std::pair<gfan::ZMatrix,gfan::ZMatrix> interiorPointsAndOuterFacetNormals = interiorPointsAndNormalsOfFacets(sigma.getPolyhedralCone(), finishedInteriorPoints, onlyLowerHalfSpace);
164
165 for (int i=0; i<interiorPoints.getHeight(); i++)
166 {
167 gfan::ZVector interiorPoint = interiorPoints[i];
168
169 if (needToFlip[i]==true)
170 {
171 groebnerCone neighbour = sigma.flipCone(interiorPoint,outerFacetNormals[i]);
173 }
175 }
176
177 sigma.deletePolynomialData();
179 if (printlevel > 0)
180 Print("cones finished: %lu cones in working list: %lu\n",
181 (unsigned long)groebnerFan.size(), (unsigned long)workingList.size());
182 }
183 return groebnerFan;
184}
std::pair< gfan::ZMatrix, gfan::ZMatrix > interiorPointsAndNormalsOfFacets(const gfan::ZCone zc, const std::set< gfan::ZVector > &exceptThesePoints, const bool onlyLowerHalfSpace)
Definition bbcone.cc:1853
int i
Definition cfEzgcd.cc:132
ListItem< T > * first
Definition ftmpl_list.h:54
void insert(const T &)
bool isValuationTrivial() const
#define Print
Definition emacs.cc:80
VAR int printlevel
Definition febase.cc:36
std::set< groebnerCone, groebnerCone_compare > groebnerCones
gfan::ZFan * groebnerFan(const tropicalStrategy currentStrategy)
std::vector< bool > checkNecessaryGroebnerFlips(const groebnerCones &groebnerFan, const groebnerCones &workingList, const gfan::ZMatrix &interiorPoints)

◆ tropicalTraversal()

groebnerCones tropicalTraversal ( const groebnerCone  startingCone)

◆ tropicalTraversalMinimizingFlips()

groebnerCones tropicalTraversalMinimizingFlips ( const groebnerCone  startingCone)

Pick an element the working list and compute interior points on its facets

For each interior point, compute the rays of the tropical star in that point

Definition at line 52 of file tropicalTraversal.cc.

53{
55 if (startingCone.isTrivial())
56 {
57 return tropicalVariety;
58 }
59
62 const tropicalStrategy* currentStrategy=startingCone.getTropicalStrategy();
63 std::set<gfan::ZVector> finishedInteriorPoints;
64 while(!workingList.empty())
65 {
66 /**
67 * Pick an element the working list and compute interior points on its facets
68 */
71
72 for (int i=0; i<interiorPoints.getHeight(); i++)
73 {
74 /**
75 * For each interior point, compute the rays of the tropical star in that point
76 */
77 gfan::ZVector interiorPoint = interiorPoints[i];
78 if (!(currentStrategy->restrictToLowerHalfSpace() && interiorPoint[0].sign()==0))
79 {
80 ideal inI = initial(sigma.getPolynomialIdeal(),sigma.getPolynomialRing(),interiorPoint);
81 ideal inISTD = gfanlib_satStd_wrapper(inI,sigma.getPolynomialRing());
82 id_Delete(&inI,sigma.getPolynomialRing());
84 sigma.getPolynomialRing(),
85 interiorPoint,
86 sigma.getTropicalStrategy());
87 id_Delete(&inISTD,sigma.getPolynomialRing());
88
90 for (int j=0; j<normalVectors.getHeight(); j++)
91 {
92 if (needToFlip[j])
93 {
94 groebnerCone neighbour = sigma.flipCone(interiorPoint,normalVectors[j]);
96 }
97 }
98 }
99 finishedInteriorPoints.insert(interiorPoint);
100 }
101
102 sigma.deletePolynomialData();
103 workingList.erase(sigma);
105 if (printlevel > 0)
106 Print("cones finished: %lu cones in working list: %lu\n",
107 (unsigned long)tropicalVariety.size(), (unsigned long)workingList.size());
108 }
109 return tropicalVariety;
110}
gfan::ZMatrix interiorPointsOfFacets(const gfan::ZCone &zc, const std::set< gfan::ZVector > &exceptThese)
Definition bbcone.cc:1799
bool restrictToLowerHalfSpace() const
returns true, if valuation non-trivial, false otherwise
int j
Definition facHensel.cc:110
poly initial(const poly p, const ring r, const gfan::ZVector &w)
Returns the initial form of p with respect to w.
Definition initial.cc:30
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
ideal gfanlib_satStd_wrapper(ideal I, ring r, tHomog h=testHomog)
gfan::ZMatrix raysOfTropicalStar(ideal I, const ring r, const gfan::ZVector &u, const tropicalStrategy *currentStrategy)
std::vector< bool > checkNecessaryTropicalFlips(const groebnerCones &tropicalVariety, const groebnerCones &workingList, const gfan::ZVector &interiorPoint, const gfan::ZMatrix &normalVectors)
BOOLEAN tropicalVariety(leftv res, leftv args)