1 | #ifndef CALLGFANLIB_GROEBNERCONE_H |
---|
2 | #define CALLGFANLIB_GROEBNERCONE_H |
---|
3 | |
---|
4 | #include <kernel/polys.h> |
---|
5 | #include <Singular/ipid.h> |
---|
6 | |
---|
7 | #include <libpolys/polys/monomials/ring.h> |
---|
8 | #include <libpolys/polys/simpleideals.h> |
---|
9 | #include <kernel/ideals.h> |
---|
10 | #include <gfanlib/gfanlib_vector.h> |
---|
11 | #include <gfanlib/gfanlib_zcone.h> |
---|
12 | #include <set> |
---|
13 | |
---|
14 | gfan::ZCone groebnerCone(const poly g, const ring r, const gfan::ZVector w); |
---|
15 | gfan::ZCone groebnerCone(const ideal I, const ring r, const gfan::ZVector w); |
---|
16 | |
---|
17 | |
---|
18 | class groebnerConeData |
---|
19 | { |
---|
20 | |
---|
21 | private: |
---|
22 | |
---|
23 | ideal I; |
---|
24 | ring r; |
---|
25 | gfan::ZCone c; |
---|
26 | gfan::ZVector p; |
---|
27 | |
---|
28 | public: |
---|
29 | |
---|
30 | groebnerConeData(); |
---|
31 | groebnerConeData(const groebnerConeData &sigma); |
---|
32 | groebnerConeData(const ideal &J, const ring &s, const gfan::ZCone &d, const gfan::ZVector &q); |
---|
33 | groebnerConeData(const ideal &J, const ring &s); |
---|
34 | ~groebnerConeData(); |
---|
35 | |
---|
36 | friend struct groebnerConeData_compare; |
---|
37 | |
---|
38 | ideal getIdeal() const { return this->I; }; |
---|
39 | ring getRing() const { return this->r; }; |
---|
40 | gfan::ZCone getCone() const { return this->c; }; |
---|
41 | gfan::ZVector getInteriorPoint() const { return this->p; }; |
---|
42 | |
---|
43 | }; |
---|
44 | |
---|
45 | struct groebnerConeData_compare |
---|
46 | { |
---|
47 | bool operator()(const groebnerConeData &sigma, const groebnerConeData &theta) const |
---|
48 | { |
---|
49 | const gfan::ZVector p1 = sigma.getInteriorPoint(); |
---|
50 | const gfan::ZVector p2 = theta.getInteriorPoint(); |
---|
51 | assume (p1.size() == p2.size()); |
---|
52 | return p1 < p2; |
---|
53 | } |
---|
54 | }; |
---|
55 | |
---|
56 | groebnerConeData maximalGroebnerConeData(ideal I, const ring r); |
---|
57 | |
---|
58 | typedef std::set<groebnerConeData,groebnerConeData_compare> setOfGroebnerConeData; |
---|
59 | |
---|
60 | #endif |
---|