My Project
Loading...
Searching...
No Matches
groebnerCone.h
Go to the documentation of this file.
1#ifndef CALLGFANLIB_GROEBNERCONE_H
2#define CALLGFANLIB_GROEBNERCONE_H
3
4#include "kernel/polys.h"
5#include "Singular/ipid.h"
6
9#include "kernel/ideals.h"
10#include "gfanlib/gfanlib.h"
11
12#include "tropicalStrategy.h"
13
14/** \file
15 * implementation of the class groebnerCone
16 *
17 * groebnerCone is a class that encapsulates relevant (possibly redundant) information about a groebnerCone.
18 * Moreover, it contains implrementation of several highly non-trivial algorithms, such as computing its neighbours
19 * in the Groebner fan or computing its neighbours in the tropical variety.
20 */
21
22class groebnerCone;
24typedef std::set<groebnerCone,groebnerCone_compare> groebnerCones;
25
26
28{
29
30private:
31 /**
32 * ideal to which this Groebner cone belongs to
33 */
35 /**
36 * ring in which the ideal exists
37 */
39 gfan::ZCone polyhedralCone;
40 gfan::ZVector interiorPoint;
42
43public:
45 groebnerCone(const ideal I, const ring r, const tropicalStrategy& currentCase);
46 groebnerCone(const ideal I, const ring r, const gfan::ZVector& w, const tropicalStrategy& currentCase);
47 groebnerCone(const ideal I, const ring r, const gfan::ZVector& u, const gfan::ZVector& w, const tropicalStrategy& currentCase);
48 groebnerCone(const ideal I, const ideal inI, const ring r, const tropicalStrategy& currentCase);
49 groebnerCone(const groebnerCone& sigma);
51 groebnerCone& operator=(const groebnerCone& sigma);
52
54 {
60 }
61
62 ideal getPolynomialIdeal() const { return polynomialIdeal; };
63 ring getPolynomialRing() const { return polynomialRing; };
64 gfan::ZCone getPolyhedralCone() const { return polyhedralCone; };
65 gfan::ZVector getInteriorPoint() const { return interiorPoint; };
67 friend struct groebnerCone_compare;
68
69 bool isTrivial() const
70 {
71 bool b = (polynomialRing==NULL);
72 return b;
73 }
74
75 /**
76 * Returns true if Groebner cone contains w, false otherwise
77 */
78 bool contains(const gfan::ZVector &w) const;
79
80 /**
81 * Returns a point in the tropical variety, if the groebnerCone contains one.
82 * Returns an empty vector otherwise.
83 */
84 gfan::ZVector tropicalPoint() const;
85
86 /**
87 * Given an interior point on the facet and the outer normal factor on the facet,
88 * returns the adjacent groebnerCone sharing that facet
89 */
90 groebnerCone flipCone(const gfan::ZVector &interiorPoint, const gfan::ZVector &facetNormal) const;
91
92 /**
93 * Returns a complete list of neighboring Groebner cones.
94 */
96
97 /**
98 * Returns a complete list of neighboring Groebner cones in the tropical variety.
99 */
101
102 /**
103 * Return 1 if w points is in the dual of the polyhedral cone, 0 otherwise
104 */
105 bool pointsOutwards(const gfan::ZVector w) const;
106
107 /**
108 * Debug tools.
109 */
110 #ifndef NDEBUG
111 bool checkFlipConeInput(const gfan::ZVector interiorPoint, const gfan::ZVector facetNormal) const;
112 #endif
113};
114
116{
117 bool operator()(const groebnerCone &sigma, const groebnerCone &theta) const
118 {
119 const gfan::ZVector p1 = sigma.getInteriorPoint();
120 const gfan::ZVector p2 = theta.getInteriorPoint();
121 assume (p1.size() == p2.size());
122 return p1 < p2;
123 }
124};
125
126gfan::ZFan* toFanStar(groebnerCones setOfCones);
127
128#endif
CanonicalForm b
Definition: cfModGcd.cc:4103
const tropicalStrategy * currentStrategy
Definition: groebnerCone.h:41
const tropicalStrategy * getTropicalStrategy() const
Definition: groebnerCone.h:66
gfan::ZVector tropicalPoint() const
Returns a point in the tropical variety, if the groebnerCone contains one.
groebnerCones tropicalNeighbours() const
Returns a complete list of neighboring Groebner cones in the tropical variety.
groebnerCones groebnerNeighbours() const
Returns a complete list of neighboring Groebner cones.
groebnerCone & operator=(const groebnerCone &sigma)
bool contains(const gfan::ZVector &w) const
Returns true if Groebner cone contains w, false otherwise.
gfan::ZVector interiorPoint
Definition: groebnerCone.h:40
gfan::ZCone getPolyhedralCone() const
Definition: groebnerCone.h:64
bool checkFlipConeInput(const gfan::ZVector interiorPoint, const gfan::ZVector facetNormal) const
Debug tools.
Definition: groebnerCone.cc:23
bool isTrivial() const
Definition: groebnerCone.h:69
ideal polynomialIdeal
ideal to which this Groebner cone belongs to
Definition: groebnerCone.h:34
bool pointsOutwards(const gfan::ZVector w) const
Return 1 if w points is in the dual of the polyhedral cone, 0 otherwise.
ideal getPolynomialIdeal() const
Definition: groebnerCone.h:62
gfan::ZCone polyhedralCone
Definition: groebnerCone.h:39
ring getPolynomialRing() const
Definition: groebnerCone.h:63
gfan::ZVector getInteriorPoint() const
Definition: groebnerCone.h:65
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...
void deletePolynomialData()
Definition: groebnerCone.h:53
ring polynomialRing
ring in which the ideal exists
Definition: groebnerCone.h:38
const CanonicalForm & w
Definition: facAbsFact.cc:51
gfan::ZFan * toFanStar(groebnerCones setOfCones)
std::set< groebnerCone, groebnerCone_compare > groebnerCones
Definition: groebnerCone.h:24
#define assume(x)
Definition: mod2.h:389
#define NULL
Definition: omList.c:12
Compatibility layer for legacy polynomial operations (over currRing)
void rDelete(ring r)
unconditionally deletes fields in r
Definition: ring.cc:450
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
bool operator()(const groebnerCone &sigma, const groebnerCone &theta) const
Definition: groebnerCone.h:117
implementation of the class tropicalStrategy