23 int* leadexpv = (
int*)
omAlloc((n+1)*
sizeof(int));
24 int* tailexpv = (
int*)
omAlloc((n+1)*
sizeof(int));
25 gfan::ZVector leadexpw = gfan::ZVector(n);
26 gfan::ZVector tailexpw = gfan::ZVector(n);
27 gfan::ZMatrix
equations = gfan::ZMatrix(0,n);
40 equations.appendRow(leadexpw-tailexpw);
47 return gfan::ZCone(gfan::ZMatrix(0, equations.getWidth()),equations);
74 ideal I = (ideal) u->
Data();
80 WerrorS(
"homogeneitySpace: unexpected parameters");
89 int* leadexpv = (
int*)
omAlloc((n+1)*
sizeof(int));
90 int* tailexpv = (
int*)
omAlloc((n+1)*
sizeof(int));
91 gfan::ZVector leadexpw = gfan::ZVector(n);
92 gfan::ZVector tailexpw = gfan::ZVector(n);
93 gfan::ZMatrix
equations = gfan::ZMatrix(0,n);
106 equations.appendRow(leadexpw-tailexpw);
112 gfan::ZVector lowerHalfSpaceCondition = gfan::ZVector(n);
113 lowerHalfSpaceCondition[0] = -1;
114 inequalities.appendRow(lowerHalfSpaceCondition);
118 return gfan::ZCone(inequalities,equations);
145 ideal I = (ideal) u->
Data();
151 WerrorS(
"lowerHomogeneitySpace: unexpected parameters");
160 int* leadexpv = (
int*)
omAlloc((n+1)*
sizeof(int));
161 int* tailexpv = (
int*)
omAlloc((n+1)*
sizeof(int));
162 gfan::ZVector leadexpw = gfan::ZVector(n);
163 gfan::ZVector tailexpw = gfan::ZVector(n);
178 inequalities.appendRow(leadexpw-tailexpw);
185 gfan::ZMatrix
equations = gfan::ZMatrix(0,n);
188 g = (
poly) inI->m[
i];
198 equations.appendRow(leadexpw-tailexpw);
207 return gfan::ZCone(inequalities,equations);
224 gfan::ZVector* weightVector;
245 catch (
const std::exception& ex)
247 Werror(
"ERROR: %s",ex.what());
259 ideal I = (ideal) u->
Data();
260 gfan::ZVector* weightVector;
279 catch (
const std::exception& ex)
281 Werror(
"ERROR: %s",ex.what());
286 WerrorS(
"groebnerCone: unexpected parameters");
295 int* leadexpv = (
int*)
omAlloc((n+1)*
sizeof(int));
296 int* tailexpv = (
int*)
omAlloc((n+1)*
sizeof(int));
297 gfan::ZVector leadexpw = gfan::ZVector(n);
298 gfan::ZVector tailexpw = gfan::ZVector(n);
309 inequalities.appendRow(leadexpw-tailexpw);
315 return gfan::ZCone(inequalities,gfan::ZMatrix(0, inequalities.getWidth()));
338 catch (
const std::exception& ex)
340 Werror(
"ERROR: %s",ex.what());
352 ideal I = (ideal) u->
Data();
357 catch (
const std::exception& ex)
359 Werror(
"ERROR: %s",ex.what());
364 WerrorS(
"maximalGroebnerCone: unexpected parameters");
378 gfan::ZVector* weightVector;
405 ideal I = (ideal) u->
Data();
406 gfan::ZVector* weightVector;
425 catch (
const std::exception& ex)
427 Werror(
"ERROR: %s",ex.what());
432 WerrorS(
"initial: unexpected parameters");
BOOLEAN negativeTropicalStartingPoint(leftv res, leftv args)
implementation of the class tropicalStrategy
BOOLEAN flipConeDebug(leftv res, leftv args)
Class used for (list of) interpreter objects.
gfan::ZCone homogeneitySpace(ideal I, ring r)
gfan::ZCone groebnerCone(const ideal I, const ring r, const gfan::ZVector &w)
BOOLEAN reduceInitiallyDebug(leftv res, leftv args)
gfan::ZFan * groebnerFan(const tropicalStrategy currentStrategy)
BOOLEAN positiveTropicalStartingPoint(leftv res, leftv args)
BOOLEAN nonPositiveTropicalStartingPoint(leftv res, leftv args)
void inpTranspose()
transpose in place
gfan::ZFan * groebnerComplex(const tropicalStrategy currentStrategy)
bigintmat * iv2bim(intvec *b, const coeffs C)
BOOLEAN computeFlipDebug(leftv res, leftv args)
static void p_GetExpV(poly p, int *ev, const ring r)
#define omFreeSize(addr, size)
static short rVar(const ring r)
#define rVar(r) (r->N)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
groebnerCone tropicalStartingCone(const tropicalStrategy ¤tStrategy)
void WerrorS(const char *s)
BOOLEAN computeWitnessDebug(leftv res, leftv args)
gfan::ZCone lowerHomogeneitySpace(ideal I, ring r)
gfan::ZCone maximalGroebnerCone(const ideal &I, const ring &r)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
BOOLEAN inequalities(leftv res, leftv args)
Coefficient rings, fields and other domains suitable for Singular polynomials.
BOOLEAN pReduceDebug(leftv res, leftv args)
gfan::ZVector intStar2ZVector(const int d, const int *i)
BOOLEAN ppreduceInitially3(leftv res, leftv args)
BOOLEAN tropicalVariety(leftv res, leftv args)
std::pair< gfan::ZVector, groebnerCone > tropicalStartingPoint(const ideal I, const ring r, const tropicalStrategy ¤tStrategy)
Computes a starting point outside the lineatliy space by traversing the Groebner fan, checking each cone whether it contains a ray in the tropical variety.
void tropical_setup(SModulFunctions *p)
void ptNormalize(poly *gStar, const number p, const ring r)
ideal idInit(int idsize, int rank)
initialise an ideal / module
const Variable & v
< [in] a sqrfree bivariate poly
BOOLEAN equations(leftv res, leftv args)
#define pGetExpV(p, e)
Gets a copy of (resp. set) the exponent vector, where e is assumed to point to (r->N +1)*sizeof(long)...
BOOLEAN initial(leftv res, leftv args)
static int idSize(const ideal id)
Count the effective size of an ideal (without the trailing allocated zero-elements) ...
BOOLEAN tropicalStarDebug(leftv res, leftv args)
int(* iiAddCproc)(const char *libname, const char *procname, BOOLEAN pstatic, BOOLEAN(*func)(leftv res, leftv v))
BOOLEAN nonNegativeTropicalStartingPoint(leftv res, leftv args)
void Werror(const char *fmt,...)
gfan::ZVector * bigintmatToZVector(const bigintmat &bim)