Loading...
Searching...
No Matches
groebnerCone Class Reference

`#include <groebnerCone.h>`

## Public Member Functions

| groebnerCone ()
| groebnerCone (const ideal I, const ring r, const tropicalStrategy &currentCase)
| groebnerCone (const ideal I, const ring r, const gfan::ZVector &w, const tropicalStrategy &currentCase)
| groebnerCone (const ideal I, const ring r, const gfan::ZVector &u, const gfan::ZVector &w, const tropicalStrategy &currentCase)
| groebnerCone (const ideal I, const ideal inI, const ring r, const tropicalStrategy &currentCase)
| groebnerCone (const groebnerCone &sigma)
| ~groebnerCone ()
groebnerCone & | operator= (const groebnerCone &sigma)
void | deletePolynomialData ()
ideal | getPolynomialIdeal () const
ring | getPolynomialRing () const
gfan::ZCone | getPolyhedralCone () const
gfan::ZVector | getInteriorPoint () const
const tropicalStrategy * | getTropicalStrategy () const
bool | isTrivial () const
bool | contains (const gfan::ZVector &w) const
| Returns true if Groebner cone contains w, false otherwise.
gfan::ZVector | tropicalPoint () const
| Returns a point in the tropical variety, if the groebnerCone contains one.
groebnerCone | flipCone (const gfan::ZVector &interiorPoint, const gfan::ZVector &facetNormal) const
| Given an interior point on the facet and the outer normal factor on the facet, returns the adjacent groebnerCone sharing that facet.
groebnerCones | groebnerNeighbours () const
| Returns a complete list of neighboring Groebner cones.
groebnerCones | tropicalNeighbours () const
| Returns a complete list of neighboring Groebner cones in the tropical variety.
bool | pointsOutwards (const gfan::ZVector w) const
| Return 1 if w points is in the dual of the polyhedral cone, 0 otherwise.
bool | checkFlipConeInput (const gfan::ZVector interiorPoint, const gfan::ZVector facetNormal) const
| Debug tools.

## Private Attributes

ideal | polynomialIdeal
| ideal to which this Groebner cone belongs to
ring | polynomialRing
| ring in which the ideal exists
gfan::ZCone | polyhedralCone
gfan::ZVector | interiorPoint
const tropicalStrategy * | currentStrategy

## Friends

struct | groebnerCone_compare

## Detailed Description

Definition at line 27 of file groebnerCone.h.

## Constructor & Destructor Documentation

## groebnerCone() [1/6]

groebnerCone::groebnerCone | ( |  | ) |

Definition at line 69 of file groebnerCone.cc.

:
polynomialIdeal(NULL),
polynomialRing(NULL),
polyhedralCone(gfan::ZCone(0)),
interiorPoint(gfan::ZVector(0)),
currentStrategy(NULL)
{
}
groebnerCone::currentStrategy
const tropicalStrategy * currentStrategy
Definition groebnerCone.h:41
groebnerCone::interiorPoint
gfan::ZVector interiorPoint
Definition groebnerCone.h:40
groebnerCone::polynomialIdeal
ideal polynomialIdeal
ideal to which this Groebner cone belongs to
Definition groebnerCone.h:34
groebnerCone::polyhedralCone
gfan::ZCone polyhedralCone
Definition groebnerCone.h:39
groebnerCone::polynomialRing
ring polynomialRing
ring in which the ideal exists
Definition groebnerCone.h:38
NULL
#define NULL
Definition omList.c:12

## groebnerCone() [2/6]

groebnerCone::groebnerCone | ( | const ideal | I,
|  | const ring | r,
|  | const tropicalStrategy & | currentCase )

Definition at line 78 of file groebnerCone.cc.

:
polynomialIdeal(NULL),
polynomialRing(NULL),
currentStrategy(&currentCase)
{
assume(checkPolynomialInput(I,r));
if (r) polynomialRing = rCopy(r);
if (I)
{
polynomialIdeal = id_Copy(I,r);
currentCase.pReduce(polynomialIdeal,polynomialRing);
currentCase.reduce(polynomialIdeal,polynomialRing);
}
int n = rVar(polynomialRing);
poly g = NULL;
int* leadexpv = (int*) omAlloc((n+1)*sizeof(int));
int* tailexpv = (int*) omAlloc((n+1)*sizeof(int));
gfan::ZVector leadexpw = gfan::ZVector(n);
gfan::ZVector tailexpw = gfan::ZVector(n);
gfan::ZMatrix inequalities = gfan::ZMatrix(0,n);
for (int i=0; i<IDELEMS(polynomialIdeal); i++)
{
g = polynomialIdeal->m[i];
if (g)
{
p_GetExpV(g,leadexpv,r);
leadexpw = expvToZVector(n, leadexpv);
pIter(g);
while (g)
{
p_GetExpV(g,tailexpv,r);
tailexpw = expvToZVector(n, tailexpv);
inequalities.appendRow(leadexpw-tailexpw);
pIter(g);
}
}
}
omFreeSize(leadexpv,(n+1)*sizeof(int));
omFreeSize(tailexpv,(n+1)*sizeof(int));
// if (currentStrategy->restrictToLowerHalfSpace())
// {
// gfan::ZVector lowerHalfSpaceCondition = gfan::ZVector(n);
// lowerHalfSpaceCondition[0] = -1;
// inequalities.appendRow(lowerHalfSpaceCondition);
// }
polyhedralCone = gfan::ZCone(inequalities,gfan::ZMatrix(0, inequalities.getWidth()));
polyhedralCone.canonicalize();
interiorPoint = polyhedralCone.getRelativeInteriorPoint();
assume(checkOrderingAndCone(polynomialRing,polyhedralCone));
}
inequalities
BOOLEAN inequalities(leftv res, leftv args)
Definition bbcone.cc:560
expvToZVector
gfan::ZVector expvToZVector(const int n, const int *expv)
Definition callgfanlib_conversion.cc:94
i
int i
Definition cfEzgcd.cc:132
g
g
Definition cfModGcd.cc:4098
tropicalStrategy::reduce
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 ...
Definition tropicalStrategy.cc:414
tropicalStrategy::pReduce
void pReduce(ideal I, const ring r) const
Definition tropicalStrategy.cc:430
id_Copy
ideal id_Copy(ideal h1, const ring r)
copy an ideal
Definition simpleideals.cc:542
assume
#define assume(x)
Definition mod2.h:389
pIter
#define pIter(p)
Definition monomials.h:37
omFreeSize
#define omFreeSize(addr, size)
Definition omAllocDecl.h:260
omAlloc
#define omAlloc(size)
Definition omAllocDecl.h:210
p_GetExpV
static void p_GetExpV(poly p, int *ev, const ring r)
Definition p_polys.h:1541
rCopy
ring rCopy(ring r)
Definition ring.cc:1737
rVar
static short rVar(const ring r)
define rVar(r) (r->N)
Definition ring.h:598
IDELEMS
#define IDELEMS(i)
Definition simpleideals.h:23
checkOrderingAndCone
bool checkOrderingAndCone(const ring r, const gfan::ZCone zc)
Definition tropicalDebug.cc:90
checkPolynomialInput
bool checkPolynomialInput(const ideal I, const ring r)
Definition tropicalDebug.cc:110

## groebnerCone() [3/6]

groebnerCone::groebnerCone | ( | const ideal | I,
|  | const ring | r,
|  | const gfan::ZVector & | w,
|  | const tropicalStrategy & | currentCase )

Definition at line 131 of file groebnerCone.cc.

:
polynomialIdeal(NULL),
polynomialRing(NULL),
currentStrategy(&currentCase)
{
assume(checkPolynomialInput(I,r));
if (r) polynomialRing = rCopy(r);
if (I)
{
polynomialIdeal = id_Copy(I,r);
currentCase.pReduce(polynomialIdeal,polynomialRing);
currentCase.reduce(polynomialIdeal,polynomialRing);
}
int n = rVar(polynomialRing);
gfan::ZMatrix inequalities = gfan::ZMatrix(0,n);
gfan::ZMatrix equations = gfan::ZMatrix(0,n);
int* expv = (int*) omAlloc((n+1)*sizeof(int));
for (int i=0; i<IDELEMS(polynomialIdeal); i++)
{
poly g = polynomialIdeal->m[i];
if (g)
{
p_GetExpV(g,expv,polynomialRing);
gfan::ZVector leadexpv = intStar2ZVector(n,expv);
long d = wDeg(g,polynomialRing,w);
for (pIter(g); g; pIter(g))
{
p_GetExpV(g,expv,polynomialRing);
gfan::ZVector tailexpv = intStar2ZVector(n,expv);
if (wDeg(g,polynomialRing,w)==d)
equations.appendRow(leadexpv-tailexpv);
else
{
assume(wDeg(g,polynomialRing,w)<d);
inequalities.appendRow(leadexpv-tailexpv);
}
}
}
}
omFreeSize(expv,(n+1)*sizeof(int));
// if (currentStrategy->restrictToLowerHalfSpace())
// {
// gfan::ZVector lowerHalfSpaceCondition = gfan::ZVector(n);
// lowerHalfSpaceCondition[0] = -1;
// inequalities.appendRow(lowerHalfSpaceCondition);
// }
polyhedralCone = gfan::ZCone(inequalities,equations);
polyhedralCone.canonicalize();
interiorPoint = polyhedralCone.getRelativeInteriorPoint();
assume(checkOrderingAndCone(polynomialRing,polyhedralCone));
}
equations
BOOLEAN equations(leftv res, leftv args)
Definition bbcone.cc:577
intStar2ZVector
gfan::ZVector intStar2ZVector(const int d, const int *i)
Definition callgfanlib_conversion.cc:86
w
const CanonicalForm & w
Definition facAbsFact.cc:51
wDeg
long wDeg(const poly p, const ring r, const gfan::ZVector &w)
various functions to compute the initial form of polynomials and ideals
Definition initial.cc:6

## groebnerCone() [4/6]

groebnerCone::groebnerCone | ( | const ideal | I,
|  | const ring | r,
|  | const gfan::ZVector & | u,
|  | const gfan::ZVector & | w,
|  | const tropicalStrategy & | currentCase )

Definition at line 189 of file groebnerCone.cc.

:
polynomialIdeal(NULL),
polynomialRing(NULL),
currentStrategy(&currentCase)
{
assume(checkWeightVector(I,r,u));
assume(checkPolynomialInput(I,r));
if (r) polynomialRing = rCopy(r);
if (I)
{
polynomialIdeal = id_Copy(I,r);
currentCase.pReduce(polynomialIdeal,polynomialRing);
currentCase.reduce(polynomialIdeal,polynomialRing);
}
int n = rVar(polynomialRing);
gfan::ZMatrix inequalities = gfan::ZMatrix(0,n);
gfan::ZMatrix equations = gfan::ZMatrix(0,n);
int* expv = (int*) omAlloc((n+1)*sizeof(int));
for (int i=0; i<IDELEMS(polynomialIdeal); i++)
{
poly g = polynomialIdeal->m[i];
if (g)
{
p_GetExpV(g,expv,polynomialRing);
gfan::ZVector leadexpv = intStar2ZVector(n,expv);
long d1 = wDeg(g,polynomialRing,u);
long d2 = wDeg(g,polynomialRing,w);
for (pIter(g); g; pIter(g))
{
p_GetExpV(g,expv,polynomialRing);
gfan::ZVector tailexpv = intStar2ZVector(n,expv);
if (wDeg(g,polynomialRing,u)==d1 && wDeg(g,polynomialRing,w)==d2)
equations.appendRow(leadexpv-tailexpv);
else
{
assume(wDeg(g,polynomialRing,u)<d1 || wDeg(g,polynomialRing,w)<d2);
inequalities.appendRow(leadexpv-tailexpv);
}
}
}
}
omFreeSize(expv,(n+1)*sizeof(int));
// if (currentStrategy->restrictToLowerHalfSpace())
// {
// gfan::ZVector lowerHalfSpaceCondition = gfan::ZVector(n);
// lowerHalfSpaceCondition[0] = -1;
// inequalities.appendRow(lowerHalfSpaceCondition);
// }
polyhedralCone = gfan::ZCone(inequalities,equations);
polyhedralCone.canonicalize();
interiorPoint = polyhedralCone.getRelativeInteriorPoint();
assume(checkOrderingAndCone(polynomialRing,polyhedralCone));
}
checkWeightVector
bool checkWeightVector(const ideal I, const ring r, const gfan::ZVector &weightVector, bool checkBorder)
Definition tropicalDebug.cc:74

## groebnerCone() [5/6]

groebnerCone::groebnerCone | ( | const ideal | I,
|  | const ideal | inI,
|  | const ring | r,
|  | const tropicalStrategy & | currentCase )

Definition at line 246 of file groebnerCone.cc.

:
polynomialIdeal(id_Copy(I,r)),
polynomialRing(rCopy(r)),
currentStrategy(&currentCase)
{
assume(checkPolynomialInput(I,r));
assume(checkPolynomialInput(inI,r));
currentCase.pReduce(polynomialIdeal,polynomialRing);
currentCase.reduce(polynomialIdeal,polynomialRing);
int n = rVar(r);
gfan::ZMatrix equations = gfan::ZMatrix(0,n);
int* expv = (int*) omAlloc((n+1)*sizeof(int));
for (int i=0; i<IDELEMS(inI); i++)
{
poly g = inI->m[i];
if (g)
{
p_GetExpV(g,expv,r);
gfan::ZVector leadexpv = intStar2ZVector(n,expv);
for (pIter(g); g; pIter(g))
{
p_GetExpV(g,expv,r);
gfan::ZVector tailexpv = intStar2ZVector(n,expv);
equations.appendRow(leadexpv-tailexpv);
}
}
}
gfan::ZMatrix inequalities = gfan::ZMatrix(0,n);
for (int i=0; i<IDELEMS(polynomialIdeal); i++)
{
poly g = polynomialIdeal->m[i];
if (g)
{
p_GetExpV(g,expv,r);
gfan::ZVector leadexpv = intStar2ZVector(n,expv);
for (pIter(g); g; pIter(g))
{
p_GetExpV(g,expv,r);
gfan::ZVector tailexpv = intStar2ZVector(n,expv);
inequalities.appendRow(leadexpv-tailexpv);
}
}
}
omFreeSize(expv,(n+1)*sizeof(int));
if (currentStrategy->restrictToLowerHalfSpace())
{
gfan::ZVector lowerHalfSpaceCondition = gfan::ZVector(n);
lowerHalfSpaceCondition[0] = -1;
inequalities.appendRow(lowerHalfSpaceCondition);
}
polyhedralCone = gfan::ZCone(inequalities,equations);
polyhedralCone.canonicalize();
interiorPoint = polyhedralCone.getRelativeInteriorPoint();
assume(checkOrderingAndCone(polynomialRing,polyhedralCone));
}

## groebnerCone() [6/6]

groebnerCone::groebnerCone | ( | const groebnerCone & | sigma | ) |

Definition at line 305 of file groebnerCone.cc.

:
polynomialIdeal(NULL),
polynomialRing(NULL),
polyhedralCone(gfan::ZCone(sigma.getPolyhedralCone())),
interiorPoint(gfan::ZVector(sigma.getInteriorPoint())),
currentStrategy(sigma.getTropicalStrategy())
{
assume(checkPolynomialInput(sigma.getPolynomialIdeal(),sigma.getPolynomialRing()));
assume(checkOrderingAndCone(sigma.getPolynomialRing(),sigma.getPolyhedralCone()));
assume(checkPolyhedralInput(sigma.getPolyhedralCone(),sigma.getInteriorPoint()));
if (sigma.getPolynomialIdeal()) polynomialIdeal = id_Copy(sigma.getPolynomialIdeal(),sigma.getPolynomialRing());
if (sigma.getPolynomialRing()) polynomialRing = rCopy(sigma.getPolynomialRing());
}
groebnerCone::getTropicalStrategy
const tropicalStrategy * getTropicalStrategy() const
Definition groebnerCone.h:66
groebnerCone::getPolyhedralCone
gfan::ZCone getPolyhedralCone() const
Definition groebnerCone.h:64
groebnerCone::getPolynomialIdeal
ideal getPolynomialIdeal() const
Definition groebnerCone.h:62
groebnerCone::getPolynomialRing
ring getPolynomialRing() const
Definition groebnerCone.h:63
groebnerCone::getInteriorPoint
gfan::ZVector getInteriorPoint() const
Definition groebnerCone.h:65
checkPolyhedralInput
bool checkPolyhedralInput(const gfan::ZCone zc, const gfan::ZVector p)
Definition tropicalDebug.cc:117

## ~groebnerCone()

groebnerCone::~groebnerCone | ( |  | ) |

Definition at line 319 of file groebnerCone.cc.

{
assume(checkPolynomialInput(polynomialIdeal,polynomialRing));
assume(checkOrderingAndCone(polynomialRing,polyhedralCone));
assume(checkPolyhedralInput(polyhedralCone,interiorPoint));
if (polynomialIdeal) id_Delete(&polynomialIdeal,polynomialRing);
if (polynomialRing) rDelete(polynomialRing);
}
rDelete
void rDelete(ring r)
unconditionally deletes fields in r
Definition ring.cc:454
id_Delete
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
Definition simpleideals.cc:123

## Member Function Documentation

## checkFlipConeInput()

bool groebnerCone::checkFlipConeInput | ( | const gfan::ZVector | interiorPoint,
|  | const gfan::ZVector | facetNormal ) const

Debug tools.

Definition at line 23 of file groebnerCone.cc.

{
/* check first whether interiorPoint lies on the boundary of the cone */
if (!polyhedralCone.contains(interiorPoint))
{
std::cout << "ERROR: interiorPoint is not contained in the Groebner cone!" << std::endl
<< "cone: " << std::endl
<< toString(&polyhedralCone)
<< "interiorPoint:" << std::endl
<< interiorPoint << std::endl;
return false;
}
if (polyhedralCone.containsRelatively(interiorPoint))
{
std::cout << "ERROR: interiorPoint is contained in the interior of the maximal Groebner cone!" << std::endl
<< "cone: " << std::endl
<< toString(&polyhedralCone)
<< "interiorPoint:" << std::endl
<< interiorPoint << std::endl;
return false;
}
gfan::ZCone hopefullyAFacet = polyhedralCone.faceContaining(interiorPoint);
if (hopefullyAFacet.dimension()!=(polyhedralCone.dimension()-1))
{
std::cout << "ERROR: interiorPoint is not contained in the interior of a facet!" << std::endl
<< "cone: " << std::endl
<< toString(&polyhedralCone)
<< "interiorPoint:" << std::endl
<< interiorPoint << std::endl;
return false;
}
/* check whether facet normal points outwards */
gfan::ZCone dual = polyhedralCone.dualCone();
if(dual.containsRelatively(facetNormal))
{
std::cout << "ERROR: facetNormal is not pointing outwards!" << std::endl
<< "cone: " << std::endl
<< toString(&polyhedralCone)
<< "facetNormal:" << std::endl
<< facetNormal << std::endl;
return false;
}
return true;
}
toString
std::string toString(const gfan::ZCone *const c)
Definition bbcone.cc:27

## contains()

bool groebnerCone::contains | ( | const gfan::ZVector & | w | ) | const

Returns true if Groebner cone contains w, false otherwise.

Definition at line 344 of file groebnerCone.cc.

{
return polyhedralCone.contains(w);
}

## deletePolynomialData()

void groebnerCone::deletePolynomialData | ( |  | ) |

inline

Definition at line 53 of file groebnerCone.h.

{
assume ((!polynomialIdeal) || (polynomialIdeal && polynomialRing));
if (polynomialIdeal) id_Delete(&polynomialIdeal,polynomialRing);
if (polynomialRing) rDelete(polynomialRing);
polynomialIdeal = NULL;
polynomialRing = NULL;
}

## flipCone()

groebnerCone groebnerCone::flipCone | ( | const gfan::ZVector & | interiorPoint,
|  | const gfan::ZVector & | facetNormal ) const

Given an interior point on the facet and the outer normal factor on the facet, returns the adjacent groebnerCone sharing that facet.

Definition at line 383 of file groebnerCone.cc.

{
assume(this->checkFlipConeInput(interiorPoint,facetNormal));
assume(checkWeightVector(polynomialIdeal,polynomialRing,interiorPoint));
/* Note: the polynomial ring created will have a weighted ordering with respect to interiorPoint
* and with a weighted ordering with respect to facetNormal as tiebreaker.
* Hence it is sufficient to compute the initial form with respect to facetNormal,
* to obtain an initial form with respect to interiorPoint+e*facetNormal,
* for e>0 sufficiently small */
std::pair<ideal,ring> flipped = currentStrategy->computeFlip(polynomialIdeal,polynomialRing,interiorPoint,facetNormal);
assume(checkPolynomialInput(flipped.first,flipped.second));
groebnerCone flippedCone(flipped.first, flipped.second, interiorPoint, facetNormal, *currentStrategy);
id_Delete(&flipped.first,flipped.second);
rDelete(flipped.second);
return flippedCone;
}
groebnerCone::groebnerCone
groebnerCone()
Definition groebnerCone.cc:69
groebnerCone::checkFlipConeInput
bool checkFlipConeInput(const gfan::ZVector interiorPoint, const gfan::ZVector facetNormal) const
Debug tools.
Definition groebnerCone.cc:23

## getInteriorPoint()

gfan::ZVector groebnerCone::getInteriorPoint | ( |  | ) | const

inline

Definition at line 65 of file groebnerCone.h.

{ return interiorPoint; };

## getPolyhedralCone()

gfan::ZCone groebnerCone::getPolyhedralCone | ( |  | ) | const

inline

Definition at line 64 of file groebnerCone.h.

{ return polyhedralCone; };

## getPolynomialIdeal()

ideal groebnerCone::getPolynomialIdeal | ( |  | ) | const

inline

Definition at line 62 of file groebnerCone.h.

{ return polynomialIdeal; };

## getPolynomialRing()

ring groebnerCone::getPolynomialRing | ( |  | ) | const

inline

Definition at line 63 of file groebnerCone.h.

{ return polynomialRing; };

## getTropicalStrategy()

const tropicalStrategy * groebnerCone::getTropicalStrategy | ( |  | ) | const

inline

Definition at line 66 of file groebnerCone.h.

{ return currentStrategy; };

## groebnerNeighbours()

groebnerCones groebnerCone::groebnerNeighbours | ( |  | ) | const

Returns a complete list of neighboring Groebner cones.

Definition at line 404 of file groebnerCone.cc.

{
std::pair<gfan::ZMatrix, gfan::ZMatrix> facetsData = interiorPointsAndNormalsOfFacets(polyhedralCone);
gfan::ZMatrix interiorPoints = facetsData.first;
gfan::ZMatrix facetNormals = facetsData.second;
groebnerCones neighbours;
for (int i=0; i<interiorPoints.getHeight(); i++)
{
gfan::ZVector w = interiorPoints[i];
gfan::ZVector v = facetNormals[i];
if (currentStrategy->restrictToLowerHalfSpace())
{
assume(w[0].sign()<=0);
if (w[0].sign()==0 && v[0].sign()>0)
continue;
}
neighbours.insert(flipCone(w,v));
}
return neighbours;
}
interiorPointsAndNormalsOfFacets
std::pair< gfan::ZMatrix, gfan::ZMatrix > interiorPointsAndNormalsOfFacets(const gfan::ZCone zc, const std::set< gfan::ZVector > &exceptThesePoints, const bool onlyLowerHalfSpace)
Definition bbcone.cc:1853
groebnerCone::flipCone
groebnerCone flipCone(const gfan::ZVector &interiorPoint, const gfan::ZVector &facetNormal) const
Given an interior point on the facet and the outer normal factor on the facet, returns the adjacent g...
Definition groebnerCone.cc:383
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition facBivar.h:39
groebnerCones
std::set< groebnerCone, groebnerCone_compare > groebnerCones
Definition groebnerCone.h:24
sign
static int sign(int x)
Definition ring.cc:3504

## isTrivial()

bool groebnerCone::isTrivial | ( |  | ) | const

inline

Definition at line 69 of file groebnerCone.h.

{
bool b = (polynomialRing==NULL);
return b;
}
b
CanonicalForm b
Definition cfModGcd.cc:4111

## operator=()

groebnerCone & groebnerCone::operator= | ( | const groebnerCone & | sigma | ) |

Definition at line 328 of file groebnerCone.cc.

{
assume(checkPolynomialInput(sigma.getPolynomialIdeal(),sigma.getPolynomialRing()));
assume(checkOrderingAndCone(sigma.getPolynomialRing(),sigma.getPolyhedralCone()));
assume(checkPolyhedralInput(sigma.getPolyhedralCone(),sigma.getInteriorPoint()));
if (sigma.getPolynomialIdeal()) polynomialIdeal = id_Copy(sigma.getPolynomialIdeal(),sigma.getPolynomialRing());
if (sigma.getPolynomialRing()) polynomialRing = rCopy(sigma.getPolynomialRing());
polyhedralCone = sigma.getPolyhedralCone();
interiorPoint = sigma.getInteriorPoint();
currentStrategy = sigma.getTropicalStrategy();
return *this;
}

## pointsOutwards()

bool groebnerCone::pointsOutwards | ( | const gfan::ZVector | w | ) | const

Return 1 if w points is in the dual of the polyhedral cone, 0 otherwise.

Definition at line 428 of file groebnerCone.cc.

{
gfan::ZCone dual = polyhedralCone.dualCone();
return (!dual.contains(w));
}

## tropicalNeighbours()

groebnerCones groebnerCone::tropicalNeighbours | ( |  | ) | const

Returns a complete list of neighboring Groebner cones in the tropical variety.

Definition at line 438 of file groebnerCone.cc.

{
gfan::ZMatrix interiorPoints = interiorPointsOfFacets(polyhedralCone);
groebnerCones neighbours;
for (int i=0; i<interiorPoints.getHeight(); i++)
{
if (!(currentStrategy->restrictToLowerHalfSpace() && interiorPoints[i][0].sign()==0))
{
ideal initialIdeal = initial(polynomialIdeal,polynomialRing,interiorPoints[i]);
gfan::ZMatrix ray = raysOfTropicalStar(initialIdeal,polynomialRing,interiorPoints[i],currentStrategy);
for (int j=0; j<ray.getHeight(); j++)
if (pointsOutwards(ray[j]))
{
groebnerCone neighbour = flipCone(interiorPoints[i],ray[j]);
neighbours.insert(neighbour);
}
id_Delete(&initialIdeal,polynomialRing);
}
}
return neighbours;
}
interiorPointsOfFacets
gfan::ZMatrix interiorPointsOfFacets(const gfan::ZCone &zc, const std::set< gfan::ZVector > &exceptThese)
Definition bbcone.cc:1799
groebnerCone::pointsOutwards
bool pointsOutwards(const gfan::ZVector w) const
Return 1 if w points is in the dual of the polyhedral cone, 0 otherwise.
Definition groebnerCone.cc:428
j
int j
Definition facHensel.cc:110
initial
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
raysOfTropicalStar
gfan::ZMatrix raysOfTropicalStar(ideal I, const ring r, const gfan::ZVector &u, const tropicalStrategy *currentStrategy)
Definition tropicalCurves.cc:243

## tropicalPoint()

gfan::ZVector groebnerCone::tropicalPoint | ( |  | ) | const

Returns a point in the tropical variety, if the groebnerCone contains one.

Returns an empty vector otherwise.

Definition at line 354 of file groebnerCone.cc.

{
assume(checkOrderingAndCone(polynomialRing,polyhedralCone));
ideal I = polynomialIdeal;
ring r = polynomialRing;
gfan::ZCone coneToCheck = polyhedralCone;
gfan::ZMatrix R = coneToCheck.extremeRays();
for (int i=0; i<R.getHeight(); i++)
{
assume(!currentStrategy->restrictToLowerHalfSpace() || R[i][0].sign()<=0);
if (currentStrategy->restrictToLowerHalfSpace() && R[i][0].sign()==0)
continue;
std::pair<poly,int> s = currentStrategy->checkInitialIdealForMonomial(I,r,R[i]);
if (s.first==NULL)
{
if (s.second<0)
// if monomial was initialized, delete it
p_Delete(&s.first,r);
return R[i];
}
}
return gfan::ZVector();
}
s
const CanonicalForm int s
Definition facAbsFact.cc:51
p_Delete
static void p_Delete(poly *p, const ring r)
Definition p_polys.h:903
R
#define R
Definition sirandom.c:27

## Friends And Related Symbol Documentation

## groebnerCone_compare

friend struct groebnerCone_compare

friend

Definition at line 67 of file groebnerCone.h.

## Field Documentation

## currentStrategy

const tropicalStrategy* groebnerCone::currentStrategy

private

Definition at line 41 of file groebnerCone.h.

## interiorPoint

gfan::ZVector groebnerCone::interiorPoint

private

Definition at line 40 of file groebnerCone.h.

## polyhedralCone

gfan::ZCone groebnerCone::polyhedralCone

private

Definition at line 39 of file groebnerCone.h.

## polynomialIdeal

ideal groebnerCone::polynomialIdeal

private

ideal to which this Groebner cone belongs to

Definition at line 34 of file groebnerCone.h.

## polynomialRing

ring groebnerCone::polynomialRing

private

ring in which the ideal exists

Definition at line 38 of file groebnerCone.h.

The documentation for this class was generated from the following files:

- Singular/dyn_modules/gfanlib/groebnerCone.h
- Singular/dyn_modules/gfanlib/groebnerCone.cc