 |
My Project
debian-1:4.1.2-p1+ds-2
|
Go to the documentation of this file.
10 #include "gfanlib/gfanlib.h"
11 #include "gfanlib/gfanlib_matrix.h"
28 std::cout <<
"ERROR: interiorPoint is not contained in the Groebner cone!" << std::endl
29 <<
"cone: " << std::endl
31 <<
"interiorPoint:" << std::endl
37 std::cout <<
"ERROR: interiorPoint is contained in the interior of the maximal Groebner cone!" << std::endl
38 <<
"cone: " << std::endl
40 <<
"interiorPoint:" << std::endl
47 std::cout <<
"ERROR: interiorPoint is not contained in the interior of a facet!" << std::endl
48 <<
"cone: " << std::endl
50 <<
"interiorPoint:" << std::endl
56 if(dual.containsRelatively(facetNormal))
58 std::cout <<
"ERROR: facetNormal is not pointing outwards!" << std::endl
59 <<
"cone: " << std::endl
61 <<
"facetNormal:" << std::endl
62 << facetNormal << std::endl;
70 polynomialIdeal(
NULL),
72 polyhedralCone(gfan::ZCone(0)),
73 interiorPoint(gfan::ZVector(0)),
79 polynomialIdeal(
NULL),
81 currentStrategy(¤tCase)
94 int* leadexpv = (
int*)
omAlloc((n+1)*
sizeof(int));
95 int* tailexpv = (
int*)
omAlloc((n+1)*
sizeof(int));
96 gfan::ZVector leadexpw = gfan::ZVector(n);
97 gfan::ZVector tailexpw = gfan::ZVector(n);
132 polynomialIdeal(
NULL),
133 polynomialRing(
NULL),
134 currentStrategy(¤tCase)
147 gfan::ZMatrix
equations = gfan::ZMatrix(0,n);
148 int* expv = (
int*)
omAlloc((n+1)*
sizeof(int));
190 polynomialIdeal(
NULL),
191 polynomialRing(
NULL),
192 currentStrategy(¤tCase)
206 gfan::ZMatrix
equations = gfan::ZMatrix(0,n);
207 int* expv = (
int*)
omAlloc((n+1)*
sizeof(int));
248 polynomialRing(
rCopy(r)),
249 currentStrategy(¤tCase)
258 gfan::ZMatrix
equations = gfan::ZMatrix(0,n);
259 int* expv = (
int*)
omAlloc((n+1)*
sizeof(int));
294 gfan::ZVector lowerHalfSpaceCondition = gfan::ZVector(n);
295 lowerHalfSpaceCondition[0] = -1;
306 polynomialIdeal(
NULL),
307 polynomialRing(
NULL),
308 polyhedralCone(gfan::ZCone(sigma.getPolyhedralCone())),
309 interiorPoint(gfan::ZVector(sigma.getInteriorPoint())),
310 currentStrategy(sigma.getTropicalStrategy())
361 gfan::ZMatrix
R = coneToCheck.extremeRays();
362 for (
int i=0;
i<
R.getHeight();
i++)
376 return gfan::ZVector();
395 id_Delete(&flipped.first,flipped.second);
408 gfan::ZMatrix interiorPoints = facetsData.first;
409 gfan::ZMatrix facetNormals = facetsData.second;
412 for (
int i=0;
i<interiorPoints.getHeight();
i++)
414 gfan::ZVector
w = interiorPoints[
i];
415 gfan::ZVector
v = facetNormals[
i];
431 return (!dual.contains(
w));
442 for (
int i=0;
i<interiorPoints.getHeight();
i++)
448 for (
int j=0;
j<ray.getHeight();
j++)
452 neighbours.insert(neighbour);
463 if (setOfCones.size() > 0)
465 groebnerCones::iterator sigma = setOfCones.begin();
466 gfan::ZFan* zf =
new gfan::ZFan(sigma->getPolyhedralCone().ambientDimension());
467 for (; sigma!=setOfCones.end(); sigma++)
469 gfan::ZCone zc = sigma->getPolyhedralCone();
476 return new gfan::ZFan(gfan::ZFan(
currRing->N));
void pReduce(ideal I, const ring r) const
std::string toString(const gfan::ZCone *const c)
bool pointsOutwards(const gfan::ZVector w) const
Return 1 if w points is in the dual of the polyhedral cone, 0 otherwise.
groebnerCones tropicalNeighbours() const
Returns a complete list of neighboring Groebner cones in the tropical variety.
ring polynomialRing
ring in which the ideal exists
bool restrictToLowerHalfSpace() const
returns true, if valuation non-trivial, false otherwise
std::set< groebnerCone, groebnerCone_compare > groebnerCones
std::pair< gfan::ZMatrix, gfan::ZMatrix > interiorPointsAndNormalsOfFacets(const gfan::ZCone zc, const std::set< gfan::ZVector > &exceptThesePoints, const bool onlyLowerHalfSpace)
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 ...
bool contains(const gfan::ZVector &w) const
Returns true if Groebner cone contains w, false otherwise.
gfan::ZVector interiorPoint
poly initial(const poly p, const ring r, const gfan::ZVector &w)
Returns the initial form of p with respect to w.
std::pair< poly, int > checkInitialIdealForMonomial(const ideal I, const ring r, const gfan::ZVector &w=0) const
If given w, assuming w is in the Groebner cone of the ordering on r and I is a standard basis with re...
bool checkPolyhedralInput(const gfan::ZCone zc, const gfan::ZVector p)
bool checkWeightVector(const ideal I, const ring r, const gfan::ZVector &weightVector, bool checkBorder)
gfan::ZVector intStar2ZVector(const int d, const int *i)
static short rVar(const ring r)
#define rVar(r) (r->N)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
#define omFreeSize(addr, size)
ideal getPolynomialIdeal() const
gfan::ZVector expvToZVector(const int n, const int *expv)
gfan::ZFan * toFanStar(groebnerCones setOfCones)
const tropicalStrategy * currentStrategy
ring getPolynomialRing() const
static void p_GetExpV(poly p, int *ev, const ring r)
gfan::ZCone polyhedralCone
BOOLEAN inequalities(leftv res, leftv args)
long wDeg(const poly p, const ring r, const gfan::ZVector &w)
various functions to compute the initial form of polynomials and ideals
bool checkOrderingAndCone(const ring r, const gfan::ZCone zc)
void rDelete(ring r)
unconditionally deletes fields in r
bool checkFlipConeInput(const gfan::ZVector interiorPoint, const gfan::ZVector facetNormal) const
Debug tools.
static void p_Delete(poly *p, const ring r)
bool checkPolynomialInput(const ideal I, const ring r)
groebnerCone & operator=(const groebnerCone &sigma)
gfan::ZVector tropicalPoint() const
Returns a point in the tropical variety, if the groebnerCone contains one.
const tropicalStrategy * getTropicalStrategy() const
BOOLEAN equations(leftv res, leftv args)
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...
const Variable & v
< [in] a sqrfree bivariate poly
gfan::ZVector getInteriorPoint() const
ideal polynomialIdeal
ideal to which this Groebner cone belongs to
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
const CanonicalForm int s
ideal id_Copy(ideal h1, const ring r)
copy an ideal
gfan::ZMatrix interiorPointsOfFacets(const gfan::ZCone &zc, const std::set< gfan::ZVector > &exceptThese)
gfan::ZMatrix raysOfTropicalStar(ideal I, const ring r, const gfan::ZVector &u, const tropicalStrategy *currentStrategy)
std::pair< ideal, ring > computeFlip(const ideal Ir, const ring r, const gfan::ZVector &interiorPoint, const gfan::ZVector &facetNormal) const
given an interior point of a groebner cone computes the groebner cone adjacent to it
gfan::ZCone getPolyhedralCone() const
groebnerCones groebnerNeighbours() const
Returns a complete list of neighboring Groebner cones.