bbpolytope.cc
Go to the documentation of this file.
1 #include <kernel/mod2.h>
2 
3 #if HAVE_GFANLIB
4 
5 #include <Singular/ipid.h>
6 #include <Singular/ipshell.h>
7 #include <Singular/blackbox.h>
8 #include <misc/intvec.h>
9 #include <coeffs/bigintmat.h>
10 
11 #include <callgfanlib_conversion.h>
12 #include <sstream>
13 
14 #include <gfanlib/gfanlib.h>
15 #include <gfanlib/gfanlib_q.h>
16 
18 
19 std::string bbpolytopeToString(gfan::ZCone const &c)
20 {
21  std::stringstream s;
22  gfan::ZMatrix i=c.getInequalities();
23  gfan::ZMatrix e=c.getEquations();
24  s<<"AMBIENT_DIM"<<std::endl;
25  s<<c.ambientDimension()-1<<std::endl;
26  s<<"INEQUALITIES"<<std::endl;
27  s<<toString(i)<<std::endl;
28  s<<"EQUATIONS"<<std::endl;
29  s<<toString(e)<<std::endl;
30  return s.str();
31 }
32 
33 void *bbpolytope_Init(blackbox* /*b*/)
34 {
35  return (void*)(new gfan::ZCone());
36 }
37 
39 {
40  gfan::ZCone* newZc;
41  if (r==NULL)
42  {
43  if (l->Data()!=NULL)
44  {
45  gfan::ZCone* zd = (gfan::ZCone*)l->Data();
46  delete zd;
47  }
48  newZc = new gfan::ZCone();
49  }
50  else if (r->Typ()==l->Typ())
51  {
52  if (l->Data()!=NULL)
53  {
54  gfan::ZCone* zd = (gfan::ZCone*)l->Data();
55  delete zd;
56  }
57  gfan::ZCone* zc = (gfan::ZCone*)r->Data();
58  newZc = new gfan::ZCone(*zc);
59  }
60  // else if (r->Typ()==INT_CMD) TODO:r->Typ()==BIGINTMAT_CMD
61  // {
62  // int ambientDim = (int)(long)r->Data();
63  // if (ambientDim < 0)
64  // {
65  // Werror("expected an int >= 0, but got %d", ambientDim);
66  // return TRUE;
67  // }
68  // if (l->Data()!=NULL)
69  // {
70  // gfan::ZCone* zd = (gfan::ZCone*)l->Data();
71  // delete zd;
72  // }
73  // newZc = new gfan::ZCone(ambientDim);
74  // }
75  else
76  {
77  Werror("assign Type(%d) = Type(%d) not implemented",l->Typ(),r->Typ());
78  return TRUE;
79  }
80 
81  if (l->rtyp==IDHDL)
82  {
83  IDDATA((idhdl)l->data) = (char*) newZc;
84  }
85  else
86  {
87  l->data=(void *)newZc;
88  }
89  return FALSE;
90 }
91 
92 char* bbpolytope_String(blackbox* /*b*/, void *d)
93 { if (d==NULL) return omStrDup("invalid object");
94  else
95  {
96  gfan::ZCone* zc = (gfan::ZCone*)d;
98  return omStrDup(s.c_str());
99  }
100 }
101 
102 void bbpolytope_destroy(blackbox* /*b*/, void *d)
103 {
104  if (d!=NULL)
105  {
106  gfan::ZCone* zc = (gfan::ZCone*) d;
107  delete zc;
108  }
109 }
110 
111 void* bbpolytope_Copy(blackbox* /*b*/, void *d)
112 {
113  gfan::ZCone* zc = (gfan::ZCone*)d;
114  gfan::ZCone* newZc = new gfan::ZCone(*zc);
115  return newZc;
116 }
117 
119 {
120  /* method for generating a cone object from half-lines
121  (cone = convex hull of the half-lines; note: there may be
122  entire lines in the cone);
123  valid parametrizations: (bigintmat) */
124  bigintmat* rays = NULL;
125  if (v->Typ() == INTMAT_CMD)
126  {
127  intvec* rays0 = (intvec*) v->Data();
128  rays = iv2bim(rays0,coeffs_BIGINT);
129  }
130  else
131  rays = (bigintmat*) v->Data();
132 
133  gfan::ZMatrix* zm = bigintmatToZMatrix(rays);
134  gfan::ZCone* zc = new gfan::ZCone();
135  *zc = gfan::ZCone::givenByRays(*zm, gfan::ZMatrix(0, zm->getWidth()));
136  res->rtyp = polytopeID;
137  res->data = (void*) zc;
138 
139  delete zm;
140  if (v->Typ() == INTMAT_CMD)
141  delete rays;
142  return FALSE;
143 }
144 
146 {
147  /* method for generating a cone object from half-lines
148  (any point in the cone being the sum of a point
149  in the convex hull of the half-lines and a point in the span
150  of the lines), and an integer k;
151  valid parametrizations: (bigintmat, int);
152  Errors will be invoked in the following cases:
153  - k not 0 or 1;
154  if the k=1, then the extreme rays are known:
155  each half-line spans a (different) extreme ray */
156  bigintmat* rays = NULL;
157  if (u->Typ() == INTMAT_CMD)
158  {
159  intvec* rays0 = (intvec*) u->Data();
160  rays = iv2bim(rays0,coeffs_BIGINT);
161  }
162  else
163  rays = (bigintmat*) u->Data();
164  int k = (int)(long)v->Data();
165 
166  if ((k < 0) || (k > 1))
167  {
168  WerrorS("expected int argument in [0..1]");
169  return TRUE;
170  }
171  k=k*2;
172  gfan::ZMatrix* zm = bigintmatToZMatrix(rays);
173  gfan::ZCone* zc = new gfan::ZCone();
174  *zc = gfan::ZCone::givenByRays(*zm,gfan::ZMatrix(0, zm->getWidth()));
175  //k should be passed on to zc; not available yet
176  res->rtyp = polytopeID;
177  res->data = (void*) zc;
178 
179  delete zm;
180  if (v->Typ() == INTMAT_CMD)
181  delete rays;
182  return FALSE;
183 }
184 
186 {
187  leftv u = args;
188  if ((u != NULL) && ((u->Typ() == BIGINTMAT_CMD) || (u->Typ() == INTMAT_CMD)))
189  {
190  if (u->next == NULL)
191  {
192  gfan::initializeCddlibIfRequired();
193  BOOLEAN bo = ppCONERAYS1(res, u);
194  gfan::deinitializeCddlibIfRequired();
195  return bo;
196  }
197  leftv v = u->next;
198  if ((v != NULL) && (v->Typ() == INT_CMD))
199  {
200  if (v->next == NULL)
201  {
202  gfan::initializeCddlibIfRequired();
203  BOOLEAN bo = ppCONERAYS3(res, u, v);
204  gfan::deinitializeCddlibIfRequired();
205  return bo;
206  }
207  }
208  }
209  WerrorS("polytopeViaPoints: unexpected parameters");
210  return TRUE;
211 }
212 
214 {
215  /* method for generating a cone object from inequalities;
216  valid parametrizations: (bigintmat) */
217  bigintmat* ineq = NULL;
218  if (v->Typ() == INTMAT_CMD)
219  {
220  intvec* ineq0 = (intvec*) v->Data();
221  ineq = iv2bim(ineq0,coeffs_BIGINT);
222  }
223  else
224  ineq = (bigintmat*) v->Data();
225  gfan::ZMatrix* zm = bigintmatToZMatrix(ineq);
226  gfan::ZCone* zc = new gfan::ZCone(*zm, gfan::ZMatrix(0, zm->getWidth()));
227  delete zm;
228  if (v->Typ() == INTMAT_CMD)
229  delete ineq;
230  res->rtyp = polytopeID;
231  res->data = (void*) zc;
232  return FALSE;
233 }
234 
236 {
237  /* method for generating a cone object from iequalities,
238  and equations (...)
239  valid parametrizations: (bigintmat, bigintmat)
240  Errors will be invoked in the following cases:
241  - u and v have different numbers of columns */
242  bigintmat* ineq = NULL; bigintmat* eq = NULL;
243  if (u->Typ() == INTMAT_CMD)
244  {
245  intvec* ineq0 = (intvec*) u->Data();
246  ineq = iv2bim(ineq0,coeffs_BIGINT);
247  }
248  else
249  ineq = (bigintmat*) u->Data();
250  if (v->Typ() == INTMAT_CMD)
251  {
252  intvec* eq0 = (intvec*) v->Data();
253  eq = iv2bim(eq0,coeffs_BIGINT);
254  }
255  else
256  eq = (bigintmat*) v->Data();
257 
258  if (ineq->cols() != eq->cols())
259  {
260  Werror("expected same number of columns but got %d vs. %d",
261  ineq->cols(), eq->cols());
262  return TRUE;
263  }
264  gfan::ZMatrix* zm1 = bigintmatToZMatrix(ineq);
265  gfan::ZMatrix* zm2 = bigintmatToZMatrix(eq);
266  gfan::ZCone* zc = new gfan::ZCone(*zm1, *zm2);
267  delete zm1;
268  delete zm2;
269  if (u->Typ() == INTMAT_CMD)
270  delete ineq;
271  if (v->Typ() == INTMAT_CMD)
272  delete eq;
273 
274  res->rtyp = polytopeID;
275  res->data = (void*) zc;
276  return FALSE;
277 }
278 
280 {
281  /* method for generating a cone object from inequalities, equations,
282  and an integer k;
283  valid parametrizations: (bigintmat, bigintmat, int);
284  Errors will be invoked in the following cases:
285  - u and v have different numbers of columns,
286  - k not in [0..3];
287  if the 2^0-bit of k is set, then ... */
288  bigintmat* ineq = NULL; bigintmat* eq = NULL;
289  if (u->Typ() == INTMAT_CMD)
290  {
291  intvec* ineq0 = (intvec*) u->Data();
292  ineq = iv2bim(ineq0,coeffs_BIGINT);
293  }
294  else
295  ineq = (bigintmat*) u->Data();
296  if (v->Typ() == INTMAT_CMD)
297  {
298  intvec* eq0 = (intvec*) v->Data();
299  eq = iv2bim(eq0,coeffs_BIGINT);
300  }
301  else
302  eq = (bigintmat*) v->Data();
303 
304  if (ineq->cols() != eq->cols())
305  {
306  Werror("expected same number of columns but got %d vs. %d",
307  ineq->cols(), eq->cols());
308  return TRUE;
309  }
310  int k = (int)(long)w->Data();
311  if ((k < 0) || (k > 3))
312  {
313  WerrorS("expected int argument in [0..3]");
314  return TRUE;
315  }
316  gfan::ZMatrix* zm1 = bigintmatToZMatrix(ineq);
317  gfan::ZMatrix* zm2 = bigintmatToZMatrix(eq);
318  gfan::ZCone* zc = new gfan::ZCone(*zm1, *zm2, k);
319  delete zm1;
320  delete zm2;
321  if (u->Typ() == INTMAT_CMD)
322  delete ineq;
323  if (v->Typ() == INTMAT_CMD)
324  delete eq;
325 
326  res->rtyp = polytopeID;
327  res->data = (void*) zc;
328  return FALSE;
329 }
330 
332 {
333  leftv u = args;
334  if ((u != NULL) && ((u->Typ() == BIGINTMAT_CMD) || (u->Typ() == INTMAT_CMD)))
335  {
336  if (u->next == NULL)
337  {
338  gfan::initializeCddlibIfRequired();
339  BOOLEAN bo = ppCONENORMALS1(res, u);
340  gfan::deinitializeCddlibIfRequired();
341  return bo;
342  }
343  }
344  leftv v = u->next;
345  if ((v != NULL) && ((v->Typ() == BIGINTMAT_CMD) || (v->Typ() == INTMAT_CMD)))
346  {
347  if (v->next == NULL)
348  {
349  gfan::initializeCddlibIfRequired();
350  BOOLEAN bo = ppCONENORMALS2(res, u, v);
351  gfan::deinitializeCddlibIfRequired();
352  return bo;
353  }
354  }
355  leftv w = v->next;
356  if ((w != NULL) && (w->Typ() == INT_CMD))
357  {
358  if (w->next == NULL)
359  {
360  gfan::initializeCddlibIfRequired();
361  BOOLEAN bo = ppCONENORMALS3(res, u, v, w);
362  gfan::deinitializeCddlibIfRequired();
363  return bo;
364  }
365  }
366  WerrorS("polytopeViaInequalities: unexpected parameters");
367  return TRUE;
368 }
369 
371 {
372  leftv u = args;
373  if ((u != NULL) && (u->Typ() == polytopeID))
374  {
375  gfan::initializeCddlibIfRequired();
376  gfan::ZCone* zc = (gfan::ZCone*)u->Data();
377  gfan::ZMatrix zmat = zc->extremeRays();
378  res->rtyp = BIGINTMAT_CMD;
379  res->data = (void*)zMatrixToBigintmat(zmat);
380  gfan::deinitializeCddlibIfRequired();
381  return FALSE;
382  }
383  WerrorS("vertices: unexpected parameters");
384  return TRUE;
385 }
386 
387 int getAmbientDimension(gfan::ZCone* zc) // zc is meant to represent a polytope here
388 { // hence ambientDimension-1
389  return zc->ambientDimension()-1;
390 }
391 
392 int getCodimension(gfan::ZCone *zc)
393 {
394  return zc->codimension();
395 }
396 
397 int getDimension(gfan::ZCone* zc)
398 {
399  return zc->dimension()-1;
400 }
401 
402 gfan::ZVector intStar2ZVectorWithLeadingOne(const int d, const int* i)
403 {
404  gfan::ZVector zv(d+1);
405  zv[0]=1;
406  for(int j=1; j<=d; j++)
407  {
408  zv[j]=i[j];
409  }
410  return zv;
411 }
412 
413 gfan::ZCone newtonPolytope(poly p, ring r)
414 {
415  int N = rVar(r);
416  gfan::ZMatrix zm(0,N+1);
417  int *leadexpv = (int*)omAlloc((N+1)*sizeof(int));
418  while (p!=NULL)
419  {
420  p_GetExpV(p,leadexpv,r);
421  gfan::ZVector zv = intStar2ZVectorWithLeadingOne(N, leadexpv);
422  zm.appendRow(zv);
423  pIter(p);
424  }
425  omFreeSize(leadexpv,(N+1)*sizeof(int));
426  gfan::ZCone Delta = gfan::ZCone::givenByRays(zm,gfan::ZMatrix(0, zm.getWidth()));
427  return Delta;
428 }
429 
431 {
432  leftv u = args;
433  if ((u != NULL) && (u->Typ() == POLY_CMD))
434  {
435  gfan::initializeCddlibIfRequired();
436  poly p = (poly)u->Data();
437  res->rtyp = polytopeID;
438  res->data = (void*) new gfan::ZCone(newtonPolytope(p,currRing));
439  gfan::deinitializeCddlibIfRequired();
440  return FALSE;
441  }
442  WerrorS("newtonPolytope: unexpected parameters");
443  return TRUE;
444 }
445 
447 {
448  leftv u = args;
449  if ((u != NULL) && (u->Typ() == INT_CMD))
450  {
451  leftv v = u->next;
452  if ((v != NULL) && (v->Typ() == polytopeID))
453  {
454  gfan::initializeCddlibIfRequired();
455  int s = (int)(long) u->Data();
456  gfan::ZCone* zp = (gfan::ZCone*) v->Data();
457  gfan::ZMatrix zm = zp->extremeRays();
458  for (int i=0; i<zm.getHeight(); i++)
459  for (int j=1; j<zm.getWidth(); j++)
460  zm[i][j]*=s;
461  gfan::ZCone* zq = new gfan::ZCone();
462  *zq = gfan::ZCone::givenByRays(zm,gfan::ZMatrix(0, zm.getWidth()));
463  res->rtyp = polytopeID;
464  res->data = (void*) zq;
465  gfan::deinitializeCddlibIfRequired();
466  return FALSE;
467  }
468  }
469  WerrorS("scalePolytope: unexpected parameters");
470  return TRUE;
471 }
472 
474 {
475  leftv u = args;
476  if ((u != NULL) && (u->Typ() == polytopeID))
477  {
478  gfan::initializeCddlibIfRequired();
479  gfan::ZCone* zp = (gfan::ZCone*) u->Data();
480  gfan::ZCone* zq = new gfan::ZCone(zp->dualCone());
481  res->rtyp = polytopeID;
482  res->data = (void*) zq;
483  gfan::deinitializeCddlibIfRequired();
484  return FALSE;
485  }
486  WerrorS("dualPolytope: unexpected parameters");
487  return TRUE;
488 }
489 
491 {
492  leftv u = args;
493  if ((u != NULL) && (u->Typ() == LIST_CMD))
494  {
495  gfan::initializeCddlibIfRequired();
496  lists l = (lists) u->Data();
497  int k = lSize(l)+1;
498  std::vector<gfan::IntMatrix> P(k);
499  for (int i=0; i<k; i++)
500  {
501  if (l->m[i].Typ() == polytopeID)
502  {
503  gfan::ZCone* p = (gfan::ZCone*) l->m[i].Data();
504  gfan::ZMatrix pv = p->extremeRays();
505  int r = pv.getHeight();
506  int c = pv.getWidth();
507  gfan::IntMatrix pw(r,c-1);
508  for (int n=0; n<r; n++)
509  for (int m=1; m<c; m++)
510  pw[n][m-1] = pv[n][m].toInt();
511  P[i]=pw.transposed();
512  } else if (l->m[i].Typ() == POLY_CMD)
513  {
514  poly p = (poly) l->m[i].Data();
515  int N = rVar(currRing);
516  gfan::IntMatrix pw(0,N);
517  int *leadexpv = (int*)omAlloc((N+1)*sizeof(int));
518  while (p!=NULL)
519  {
520  p_GetExpV(p,leadexpv,currRing);
521  gfan::IntVector zv(N);
522  for (int i=0; i<N; i++)
523  zv[i] = leadexpv[i+1];
524  pw.appendRow(zv);
525  pIter(p);
526  }
527  P[i]=pw.transposed();
528  omFreeSize(leadexpv,(N+1)*sizeof(int));
529  }
530  else
531  {
532  WerrorS("mixedVolume: entries of unsupported type in list");
533  gfan::deinitializeCddlibIfRequired();
534  return TRUE;
535  }
536  }
537  gfan::Integer mv = gfan::mixedVolume(P);
538 
539  res->rtyp = BIGINT_CMD;
540  res->data = (void*) integerToNumber(mv);
541  gfan::deinitializeCddlibIfRequired();
542  return FALSE;
543  }
544  WerrorS("mixedVolume: unexpected parameters");
545  return TRUE;
546 }
547 
548 
549 
551 {
552  blackbox *b=(blackbox*)omAlloc0(sizeof(blackbox));
553  // all undefined entries will be set to default in setBlackboxStuff
554  // the default Print is quite usefule,
555  // all other are simply error messages
556  b->blackbox_destroy=bbpolytope_destroy;
557  b->blackbox_String=bbpolytope_String;
558  //b->blackbox_Print=blackbox_default_Print;
559  b->blackbox_Init=bbpolytope_Init;
560  b->blackbox_Copy=bbpolytope_Copy;
561  b->blackbox_Assign=bbpolytope_Assign;
562  p->iiAddCproc("gfan.lib","polytopeViaPoints",FALSE,polytopeViaVertices);
563  p->iiAddCproc("gfan.lib","polytopeViaInequalities",FALSE,polytopeViaNormals);
564  p->iiAddCproc("gfan.lib","vertices",FALSE,vertices);
565  p->iiAddCproc("gfan.lib","newtonPolytope",FALSE,newtonPolytope);
566  p->iiAddCproc("gfan.lib","scalePolytope",FALSE,scalePolytope);
567  p->iiAddCproc("gfan.lib","dualPolytope",FALSE,dualPolytope);
568  p->iiAddCproc("gfan.lib","mixedVolume",FALSE,mixedVolume);
569  /********************************************************/
570  /* the following functions are implemented in bbcone.cc */
571  // iiAddCproc("gfan.lib","getAmbientDimension",FALSE,getAmbientDimension);
572  // iiAddCproc("gfan.lib","getCodimension",FALSE,getAmbientDimension);
573  // iiAddCproc("gfan.lib","getDimension",FALSE,getDimension);
574  /********************************************************/
575  /* the following functions are identical to those in bbcone.cc */
576  // iiAddCproc("gfan.lib","facets",FALSE,facets);
577  // iiAddCproc("gfan.lib","setLinearForms",FALSE,setLinearForms);
578  // iiAddCproc("gfan.lib","getLinearForms",FALSE,getLinearForms);
579  // iiAddCproc("gfan.lib","setMultiplicity",FALSE,setMultiplicity);
580  // iiAddCproc("gfan.lib","getMultiplicity",FALSE,getMultiplicity);
581  // iiAddCproc("gfan.lib","hasFace",FALSE,hasFace);
582  /***************************************************************/
583  // iiAddCproc("gfan.lib","getEquations",FALSE,getEquations);
584  // iiAddCproc("gfan.lib","getInequalities",FALSE,getInequalities);
585  polytopeID=setBlackboxStuff(b,"polytope");
586  //Print("created type %d (polytope)\n",polytopeID);
587 }
588 
589 #endif
BOOLEAN mixedVolume(leftv res, leftv args)
Definition: bbpolytope.cc:490
const CanonicalForm int s
Definition: facAbsFact.cc:55
sleftv * m
Definition: lists.h:45
Class used for (list of) interpreter objects.
Definition: subexpr.h:83
BOOLEAN dualPolytope(leftv res, leftv args)
Definition: bbpolytope.cc:473
Definition: tok.h:95
BOOLEAN bbpolytope_Assign(leftv l, leftv r)
Definition: bbpolytope.cc:38
BOOLEAN scalePolytope(leftv res, leftv args)
Definition: bbpolytope.cc:446
Definition: lists.h:22
#define FALSE
Definition: auxiliary.h:94
void * bbpolytope_Init(blackbox *)
Definition: bbpolytope.cc:33
Definition: tok.h:38
return P p
Definition: myNF.cc:203
Matrices of numbers.
Definition: bigintmat.h:51
bigintmat * iv2bim(intvec *b, const coeffs C)
Definition: bigintmat.cc:350
bigintmat * zMatrixToBigintmat(const gfan::ZMatrix &zm)
static void p_GetExpV(poly p, int *ev, const ring r)
Definition: p_polys.h:1443
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
static BOOLEAN ppCONENORMALS3(leftv res, leftv u, leftv v, leftv w)
Definition: bbpolytope.cc:279
#define string
Definition: libparse.cc:1250
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:583
static BOOLEAN ppCONERAYS1(leftv res, leftv v)
Definition: bbpolytope.cc:118
#define TRUE
Definition: auxiliary.h:98
void WerrorS(const char *s)
Definition: feFopen.cc:24
int k
Definition: cfEzgcd.cc:93
coeffs coeffs_BIGINT
Definition: ipid.cc:54
int Typ()
Definition: subexpr.cc:995
#define omAlloc(size)
Definition: omAllocDecl.h:210
Definition: idrec.h:34
#define IDHDL
Definition: tok.h:31
gfan::ZVector intStar2ZVectorWithLeadingOne(const int d, const int *i)
Definition: bbpolytope.cc:402
int getDimension(gfan::ZCone *zc)
Definition: bbpolytope.cc:397
void * data
Definition: subexpr.h:89
#define pIter(p)
Definition: monomials.h:44
poly res
Definition: myNF.cc:322
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
static BOOLEAN ppCONENORMALS2(leftv res, leftv u, leftv v)
Definition: bbpolytope.cc:235
const ring r
Definition: syzextra.cc:208
int polytopeID
Definition: bbpolytope.cc:17
Definition: intvec.h:14
const CanonicalForm CFMap CFMap & N
Definition: cfEzgcd.cc:49
int j
Definition: myNF.cc:70
gfan::ZMatrix * bigintmatToZMatrix(const bigintmat &bim)
void bbpolytope_destroy(blackbox *, void *d)
Definition: bbpolytope.cc:102
int cols() const
Definition: bigintmat.h:145
BOOLEAN vertices(leftv res, leftv args)
Definition: bbpolytope.cc:370
int m
Definition: cfEzgcd.cc:119
BOOLEAN polytopeViaNormals(leftv res, leftv args)
Definition: bbpolytope.cc:331
number integerToNumber(const gfan::Integer &I)
int i
Definition: cfEzgcd.cc:123
std::string bbpolytopeToString(gfan::ZCone const &c)
Definition: bbpolytope.cc:19
int lSize(lists L)
Definition: lists.cc:25
leftv next
Definition: subexpr.h:87
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
BOOLEAN polytopeViaVertices(leftv res, leftv args)
Definition: bbpolytope.cc:185
BOOLEAN rays(leftv res, leftv args)
Definition: bbcone.cc:663
int getCodimension(gfan::ZCone *zc)
Definition: bbpolytope.cc:392
#define NULL
Definition: omList.c:10
slists * lists
Definition: mpr_numeric.h:146
const CanonicalForm & w
Definition: facAbsFact.cc:55
int getAmbientDimension(gfan::ZCone *zc)
Definition: bbpolytope.cc:387
int rtyp
Definition: subexpr.h:92
void * Data()
Definition: subexpr.cc:1137
Definition: tok.h:117
gfan::ZCone newtonPolytope(poly p, ring r)
Definition: bbpolytope.cc:413
static BOOLEAN ppCONENORMALS1(leftv res, leftv v)
Definition: bbpolytope.cc:213
std::string toString(const gfan::ZCone *const c)
Definition: bbcone.cc:28
char * bbpolytope_String(blackbox *, void *d)
Definition: bbpolytope.cc:92
int(* iiAddCproc)(const char *libname, const char *procname, BOOLEAN pstatic, BOOLEAN(*func)(leftv res, leftv v))
Definition: ipid.h:71
kBucketDestroy & P
Definition: myNF.cc:191
polyrec * poly
Definition: hilb.h:10
#define IDDATA(a)
Definition: ipid.h:123
int setBlackboxStuff(blackbox *bb, const char *n)
define a new type
Definition: blackbox.cc:126
int BOOLEAN
Definition: auxiliary.h:85
static BOOLEAN ppCONERAYS3(leftv res, leftv u, leftv v)
Definition: bbpolytope.cc:145
const poly b
Definition: syzextra.cc:213
void * bbpolytope_Copy(blackbox *, void *d)
Definition: bbpolytope.cc:111
void Werror(const char *fmt,...)
Definition: reporter.cc:189
#define omAlloc0(size)
Definition: omAllocDecl.h:211
int l
Definition: cfEzgcd.cc:94
void bbpolytope_setup(SModulFunctions *p)
Definition: bbpolytope.cc:550
#define omStrDup(s)
Definition: omAllocDecl.h:263