1#include "gfanlib/gfanlib.h"
23 std::set<gfan::ZCone> tropVar;
26 int* expv = (
int*)
omAlloc((n+1)*
sizeof(int));
27 gfan::ZMatrix exponents = gfan::ZMatrix(0,n);
36 int l = exponents.getHeight();
37 gfan::ZVector lowerHalfSpaceCondition = gfan::ZVector(n);
38 lowerHalfSpaceCondition[0] = -1;
39 for (
int i=0;
i<
l;
i++)
41 for (
int j=
i+1;
j<
l;
j++)
43 gfan::ZMatrix equation = gfan::ZMatrix(0,n);
44 equation.appendRow(exponents[
i].toVector()-exponents[
j].toVector());
48 for (
int k=0;
k<
l;
k++)
51 if (zc.dimension()>=n-1)
68 int* expv = (
int*)
omAlloc((n+1)*
sizeof(int));
69 gfan::ZMatrix exponents = gfan::ZMatrix(0,n);
78 int l = exponents.getHeight();
79 gfan::ZVector lowerHalfSpaceCondition = gfan::ZVector(n);
80 lowerHalfSpaceCondition[0] = -1;
81 for (
int i=0;
i<
l;
i++)
83 for (
int j=
i+1;
j<
l;
j++)
85 gfan::ZMatrix equation = gfan::ZMatrix(0,n);
86 equation.appendRow(exponents[
i].toVector()-exponents[
j].toVector());
90 for (
int k=0;
k<
l;
k++)
91 if (
k!=
i &&
k!=
j)
inequalities.appendRow(exponents[
i].toVector()-exponents[
k].toVector());
93 if (zc.dimension()>=n-1)
BOOLEAN inequalities(leftv res, leftv args)
gfan::ZVector intStar2ZVector(const int d, const int *i)
bool restrictToLowerHalfSpace() const
returns true, if valuation non-trivial, false otherwise
const CanonicalForm int s
#define omFreeSize(addr, size)
static void p_GetExpV(poly p, int *ev, const ring r)
static short rVar(const ring r)
#define rVar(r) (r->N)
implementation of the class tropicalStrategy
std::set< gfan::ZCone > tropicalVariety(const poly g, const ring r, const tropicalStrategy *currentCase)
ZConesSortedByDimension tropicalVarietySortedByDimension(const poly g, const ring r, const tropicalStrategy *currentCase)
std::set< gfan::ZCone, ZConeCompareDimensionFirst > ZConesSortedByDimension