#include "gfanlib/gfanlib_zfan.h"
Go to the source code of this file.
◆ groebnerFan()
Definition at line 85 of file groebnerFan.cc.
86{
89 {
90 ideal I = (ideal) u->
CopyD();
92
94 {
96 {
97 try
98 {
102 res->data = (
char*) zf;
104 }
105 catch (const std::exception& ex)
106 {
109 }
110 }
111 else
112 {
113 try
114 {
120 res->data = (
char*) zf;
122 }
123 catch (const std::exception& ex)
124 {
127 }
128 }
129 }
130 }
132 {
133 poly
g = (poly) u->
Data();
136 {
137 try
138 {
141 res->data = (
char*) zf;
143 }
144 catch (const std::exception& ex)
145 {
148 }
149 }
150 }
151 WerrorS(
"groebnerFan: unexpected parameters");
153}
Class used for (list of) interpreter objects.
const Variable & v
< [in] a sqrfree bivariate poly
void WerrorS(const char *s)
gfan::ZFan * groebnerFan(const tropicalStrategy currentStrategy)
static void setOptionRedSB()
static void undoSetOptionRedSB()
gfan::ZFan * groebnerFanOfPolynomial(poly g, ring r, bool onlyLowerHalfSpace=false)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
int idElem(const ideal F)
count non-zero elements
◆ groebnerFanOfPolynomial()
gfan::ZFan * groebnerFanOfPolynomial |
( |
poly |
g, |
|
|
ring |
r, |
|
|
bool |
onlyLowerHalfSpace = false |
|
) |
| |
Definition at line 36 of file groebnerFan.cc.
37{
39
41 {
42
44 return zf;
45 }
46 else
47 {
48 gfan::ZVector lowerHalfSpaceCondition = gfan::ZVector(n);
49 lowerHalfSpaceCondition[0] = -1;
50
51
52 int* expv = (
int*)
omAlloc((n+1)*
sizeof(int));
53 gfan::ZMatrix exponents = gfan::ZMatrix(0,n);
55 {
59 }
61
62
63 gfan::ZFan* zf = new gfan::ZFan(n);
64 int l = exponents.getHeight();
65 for (
int i=0;
i<
l;
i++)
66 {
67
69 if (onlyLowerHalfSpace)
71 for (
int j=0;
j<
l;
j++)
72 {
74 inequalities.appendRow(exponents[
i].toVector()-exponents[
j].toVector());
75 }
77 zc.canonicalize();
78 zf->insert(zc);
79 }
80 return zf;
81 }
82}
BOOLEAN inequalities(leftv res, leftv args)
BOOLEAN fullFan(leftv res, leftv args)
gfan::ZVector intStar2ZVector(const int d, const int *i)
const CanonicalForm int s
#define omFreeSize(addr, size)
static void p_GetExpV(poly p, int *ev, const ring r)
static short rVar(const ring r)
#define rVar(r) (r->N)