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