 |
My Project
UNKNOWN_GIT_VERSION
|
Go to the documentation of this file.
39 if (startingPoint.size() > 0)
40 return std::make_pair(startingPoint,sigma);
46 workingList.insert(sigma);
47 while (!workingList.empty())
51 for (groebnerCones::iterator
tau = neighbours.begin();
tau!=neighbours.end();
tau++)
55 if (workingList.count(*
tau) == 0)
57 startingPoint =
tau->tropicalPoint();
58 if (startingPoint.size() > 0)
59 return std::make_pair(startingPoint,*
tau);
61 workingList.insert(*
tau);
65 workingList.erase(sigma);
69 gfan::ZVector emptyVector = gfan::ZVector(0);
71 return std::pair<gfan::ZVector,groebnerCone>(emptyVector,emptyCone);
86 if (startingPoint.size() > 0)
87 return std::make_pair(startingPoint,sigma);
93 workingList.insert(sigma);
94 while (!workingList.empty())
98 for (groebnerCones::iterator
tau = neighbours.begin();
tau!=neighbours.end();
tau++)
102 if (workingList.count(*
tau) == 0)
104 startingPoint =
tau->tropicalPoint();
105 if (startingPoint.size() > 0)
106 return std::make_pair(startingPoint,*
tau);
108 workingList.insert(*
tau);
112 workingList.erase(sigma);
116 gfan::ZVector emptyVector = gfan::ZVector(0);
118 return std::pair<gfan::ZVector,groebnerCone>(emptyVector,emptyCone);
126 ideal I = (ideal) u->
Data();
132 for (std::set<gfan::ZCone>::iterator zc=Tg.begin(); zc!=Tg.end(); zc++)
134 gfan::ZMatrix ray = zc->extremeRays();
135 for (
int i=0;
i<ray.getHeight();
i++)
137 if (ray[
i].toVector().isPositive())
149 WerrorS(
"positiveTropicalStartingPoint: ideal not principal");
152 WerrorS(
"positiveTropicalStartingPoint: unexpected parameters");
161 ideal I = (ideal) u->
Data();
167 for (std::set<gfan::ZCone>::iterator zc=Tg.begin(); zc!=Tg.end(); zc++)
169 gfan::ZMatrix ray = zc->extremeRays();
170 for (
int i=0;
i<ray.getHeight();
i++)
172 if (ray[
i].toVector().isNonNegative())
184 WerrorS(
"nonNegativeTropicalStartingPoint: ideal not principal");
187 WerrorS(
"nonNegativeTropicalStartingPoint: unexpected parameters");
196 ideal I = (ideal) u->
Data();
202 for (std::set<gfan::ZCone>::iterator zc=Tg.begin(); zc!=Tg.end(); zc++)
204 gfan::ZMatrix ray = zc->extremeRays();
205 for (
int i=0;
i<ray.getHeight();
i++)
207 gfan::ZVector negatedRay = gfan::Integer(-1)*ray[
i].toVector();
208 if (negatedRay.isPositive())
220 WerrorS(
"negativeTropicalStartingPoint: ideal not principal");
223 WerrorS(
"negativeTropicalStartingPoint: unexpected parameters");
232 ideal I = (ideal) u->
Data();
238 for (std::set<gfan::ZCone>::iterator zc=Tg.begin(); zc!=Tg.end(); zc++)
240 gfan::ZMatrix ray = zc->extremeRays();
241 for (
int i=0;
i<ray.getHeight();
i++)
243 gfan::ZVector negatedRay = gfan::Integer(-1)*ray[
i].toVector();
244 if (negatedRay.isNonNegative())
256 WerrorS(
"nonPositiveTropicalStartingPoint: ideal not principal");
259 WerrorS(
"nonPositiveTropicalStartingPoint: unexpected parameters");
268 ideal I = (ideal) u->
Data();
280 gfan::ZCone C = *(Tg.begin());
281 gfan::ZMatrix
rays = C.extremeRays();
282 if (
rays.getHeight()==0)
284 gfan::ZMatrix lin = C.generatorsOfLinealitySpace();
296 gfan::ZMatrix lin = C0.generatorsOfLinealitySpace();
302 gfan::ZVector startingPoint = startingData.first;
307 WerrorS(
"tropicalStartingPoint: unexpected parameters");
317 gfan::ZMatrix
equations = gfan::ZMatrix(0,n);
318 int* expv = (
int*)
omAlloc((n+1)*
sizeof(int));
320 for (
int i=0;
i<
k;
i++)
335 return gfan::ZCone(gfan::ZMatrix(0,n),
equations);
347 int h = startingPoints.getHeight();
349 s0->block0 = (
int*)
omAlloc0((
h+3)*
sizeof(int));
350 s0->block1 = (
int*)
omAlloc0((
h+3)*
sizeof(int));
351 s0->wvhdl = (
int**)
omAlloc0((
h+3)*
sizeof(
int**));
352 for (
int i=0;
i<
h;
i++)
378 currentStrategy.
reduce(I,r);
387 for (
int i=0;
i<
k;
i++)
421 gfan::ZVector startingPoint = startingData.first;
443 for (
int i=0;
i<
k;
i++)
449 for (
int i=0;
i<
k;
i++)
475 for (
int i=0;
i<
k;
i++)
505 gfan::ZVector startingPoint = startingData.first;
512 ideal inI =
initial(I,r,startingPoint);
520 ideal J =
lift(I,r,inJ,
s);
530 ring rShortcut =
rCopy0(r);
538 for (
int i=0;
i<
k;
i++)
563 inJShortcut =
initial(inJShortcut,sShortcut,interiorPoint);
564 inI =
initial(inI,r,interiorPoint);
578 for (
int i=0;
i<
k;
i++)
580 if(inJShortcut->m[
i]!=
NULL)
590 for (
int i=0;
i<
k;
i++)
596 for (
int i=0;
i<
k;
i++)
619 ideal I = (ideal) u->
CopyD();
623 number
p = (number)
v->Data();
631 res->data = (
char*) startingCone;
647 WerrorS(
"tropicalStartingCone: unexpected parameters");
bool isValuationTrivial() const
int idElem(const ideal F)
count non-zero elements
BOOLEAN negativeTropicalStartingPoint(leftv res, leftv args)
gfan::ZCone getHomogeneitySpace() const
returns the homogeneity space of the preimage ideal
BOOLEAN nonPositiveTropicalStartingPoint(leftv res, leftv args)
std::set< groebnerCone, groebnerCone_compare > groebnerCones
ideal lift(const ideal J, const ring r, const ideal inI, const ring s)
bool reduce(ideal I, const ring r) const
reduces the generators of an ideal I so that the inequalities and equations of the Groebner cone can ...
groebnerCone tropicalStartingCone(const tropicalStrategy ¤tStrategy)
int getExpectedDimension() const
returns the expected Dimension of the polyhedral output
bigintmat * zVectorToBigintmat(const gfan::ZVector &zv)
poly initial(const poly p, const ring r, const gfan::ZVector &w)
Returns the initial form of p with respect to w.
Class used for (list of) interpreter objects.
gfan::ZVector intStar2ZVector(const int d, const int *i)
ring rCopy0(const ring r, BOOLEAN copy_qideal, BOOLEAN copy_ordering)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
static short rVar(const ring r)
#define rVar(r) (r->N)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
poly p_PermPoly(poly p, const int *perm, const ring oldRing, const ring dst, nMapFunc nMap, const int *par_perm, int OldPar, BOOLEAN use_mult)
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
#define omFreeSize(addr, size)
gfan::ZMatrix tropicalStartingPoints
static gfan::ZCone linealitySpaceOfGroebnerFan(const ideal I, const ring r)
ideal getPolynomialIdeal() const
implementation of the class tropicalStrategy
int * ZVectorToIntStar(const gfan::ZVector &v, bool &overflow)
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
ring getShortcutRing() const
implementation of the class groebnerCone
ring getPolynomialRing() const
ring createTraversalStartingRing(const ring s, const gfan::ZMatrix &startingPoints, const tropicalStrategy ¤tStrategy)
BOOLEAN rays(leftv res, leftv args)
ideal gfanlib_kStd_wrapper(ideal I, ring r, tHomog h=testHomog)
static void p_GetExpV(poly p, int *ev, const ring r)
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,...
gfan::ZCone groebnerCone(const ideal I, const ring r, const gfan::ZVector &w)
gfan::ZFan * groebnerFan(const tropicalStrategy currentStrategy)
void rDelete(ring r)
unconditionally deletes fields in r
ring getStartingRing() const
returns the polynomial ring over the valuation ring
static void p_Delete(poly *p, const ring r)
static FORCE_INLINE coeffs nCopyCoeff(const coeffs r)
"copy" coeffs, i.e. increment ref
void tau(int **points, int sizePoints, int k)
ideal idInit(int idsize, int rank)
initialise an ideal / module
static number p_SetCoeff(poly p, number n, ring r)
std::pair< gfan::ZVector, groebnerCone > tropicalStartingDataViaGroebnerFan(const ideal I, const ring r, const tropicalStrategy ¤tStrategy)
Computes a starting point outside the lineatliy space by traversing the Groebner fan,...
void WerrorS(const char *s)
gfan::ZVector tropicalPoint() const
Returns a point in the tropical variety, if the groebnerCone contains one.
bool areIdealsEqual(ideal I, ring r, ideal J, ring s)
BOOLEAN equations(leftv res, leftv args)
const Variable & v
< [in] a sqrfree bivariate poly
gfan::ZVector getInteriorPoint() const
number getUniformizingParameter() const
returns the uniformizing parameter in the valuation ring
const CanonicalForm int s
groebnerCone groebnerStartingCone(const tropicalStrategy ¤tStrategy)
BOOLEAN nonNegativeTropicalStartingPoint(leftv res, leftv args)
BOOLEAN tropicalVariety(leftv res, leftv args)
poly checkForMonomialViaSuddenSaturation(const ideal I, const ring r)
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
gfan::ZCone getPolyhedralCone() const
BOOLEAN positiveTropicalStartingPoint(leftv res, leftv args)
ideal getStartingIdeal() const
returns the input ideal
void nKillChar(coeffs r)
undo all initialisations
groebnerCones groebnerNeighbours() const
Returns a complete list of neighboring Groebner cones.
BOOLEAN rComplete(ring r, int force)
this needs to be called whenever a new ring is created: new fields in ring are created (like VarOffse...