polymake_conversion.cc
Go to the documentation of this file.
1 #include "kernel/mod2.h"
2 
3 #ifdef HAVE_POLYMAKE
4 
5 #include <gmpxx.h>
6 
7 #include <polymake/Main.h>
8 #include <polymake/Matrix.h>
9 #include <polymake/Rational.h>
10 #include <polymake/Integer.h>
11 #include <polymake/Set.h>
12 #include <polymake/common/lattice_tools.h>
13 #include <polymake/IncidenceMatrix.h>
14 
15 #include "gfanlib/gfanlib.h"
16 #include "gfanlib/gfanlib_q.h"
17 
18 #include "misc/intvec.h"
19 #include "coeffs/numbers.h"
20 #include "coeffs/bigintmat.h"
21 #include "Singular/lists.h"
22 #include "Singular/ipid.h" // for bigints,
23 // is there really nothing better than this?
24 
25 /* Functions for converting Integers, Rationals and their Matrices
26  in between C++, gfan, polymake and singular */
27 
28 /* gfan -> polymake */
29 
30 polymake::Integer GfInteger2PmInteger (const gfan::Integer& gi)
31 {
32  mpz_t cache; mpz_init(cache);
33  gi.setGmp(cache);
34  polymake::Integer pi(cache);
35  return pi;
36 }
37 
38 polymake::Rational GfRational2PmRational (const gfan::Rational& gr)
39 {
40  mpq_t cache; mpq_init(cache);
41  gr.setGmp(cache);
42  polymake::Rational pr(cache);
43  return pr;
44 }
45 
46 polymake::Vector<polymake::Integer> Intvec2PmVectorInteger (const intvec* iv)
47 {
48  polymake::Vector<polymake::Integer> vi(iv->length());
49  for(int i=1; i<=iv->length(); i++)
50  {
51  vi[i-1]=(*iv)[i-1];
52  }
53  return vi;
54 }
55 
56 polymake::Matrix<polymake::Integer> GfZMatrix2PmMatrixInteger (const gfan::ZMatrix* zm)
57 {
58  int rows=zm->getHeight();
59  int cols=zm->getWidth();
60  polymake::Matrix<polymake::Integer> mi(rows,cols);
61  for(int r=1; r<=rows; r++)
62  for(int c=1; c<=cols; c++)
63  mi(r-1,c-1) = GfInteger2PmInteger((*zm)[r-1][c-1]);
64  return mi;
65 }
66 
67 polymake::Matrix<polymake::Rational> GfQMatrix2PmMatrixRational (const gfan::QMatrix* qm)
68 {
69  int rows=qm->getHeight();
70  int cols=qm->getWidth();
71  polymake::Matrix<polymake::Rational> mr(rows,cols);
72  for(int r=1; r<=rows; r++)
73  for(int c=1; c<=cols; c++)
74  mr(r-1,c-1) = GfRational2PmRational((*qm)[r-1][c-1]);
75  return mr;
76 }
77 
78 /* gfan <- polymake */
79 
80 gfan::Integer PmInteger2GfInteger (const polymake::Integer& pi)
81 {
82  mpz_class cache(pi.get_rep());
83  gfan::Integer gi(cache.get_mpz_t());
84  return gi;
85 }
86 
87 gfan::Rational PmRational2GfRational (const polymake::Rational& pr)
88 {
89  mpq_class cache(pr.get_rep());
90  gfan::Rational gr(cache.get_mpq_t());
91  return gr;
92 }
93 
94 gfan::ZMatrix PmMatrixInteger2GfZMatrix (const polymake::Matrix<polymake::Integer>* mi)
95 {
96  int rows=mi->rows();
97  int cols=mi->cols();
98  gfan::ZMatrix zm(rows,cols);
99  for(int r=1; r<=rows; r++)
100  for(int c=1; c<=cols; c++)
101  zm[r-1][c-1] = PmInteger2GfInteger((*mi)(r-1,c-1));
102  return zm;
103 }
104 
105 gfan::QMatrix PmMatrixRational2GfQMatrix (const polymake::Matrix<polymake::Rational>* mr)
106 {
107  int rows=mr->rows();
108  int cols=mr->cols();
109  gfan::QMatrix qm(rows,cols);
110  for(int r=1; r<=rows; r++)
111  for(int c=1; c<=cols; c++)
112  qm[r-1][c-1] = PmRational2GfRational((*mr)(r-1,c-1));
113  return qm;
114 }
115 
116 /* polymake -> singular */
117 
118 int PmInteger2Int(const polymake::Integer& pi, bool &ok)
119 {
120  int i=0;
121  try
122  {
123 #if POLYMAKE_VERSION >= 301 /* 3.1 */
124  i=int(pi);
125 #else
126  i = pi.to_int();
127 #endif
128  }
129  catch (const std::exception& ex)
130  {
131  WerrorS("ERROR: "); WerrorS(ex.what()); WerrorS("\n");
132  ok = false;
133  }
134  return i;
135 }
136 
137 number PmInteger2Number (const polymake::Integer& pi)
138 {
139  mpz_class cache(pi.get_rep());
140  long m = 268435456;
141  if(mpz_cmp_si(cache.get_mpz_t(),m))
142  {
143  int temp = (int) mpz_get_si(cache.get_mpz_t());
144  return n_Init(temp,coeffs_BIGINT);
145  }
146  else
147  return n_InitMPZ(cache.get_mpz_t(),coeffs_BIGINT);
148 }
149 
150 intvec* PmVectorInteger2Intvec (const polymake::Vector<polymake::Integer>* vi, bool &ok)
151 {
152  intvec* iv = new intvec(vi->size());
153  for(int i=1; i<=vi->size(); i++)
154  {
155  (*iv)[i-1] = PmInteger2Int((*vi)[i-1],ok);
156  }
157  return iv;
158 }
159 
160 intvec* PmMatrixInteger2Intvec (polymake::Matrix<polymake::Integer>* mi, bool &ok)
161 {
162  int rows = mi->rows();
163  int cols = mi->cols();
164  intvec* iv = new intvec(rows,cols,0);
165 #if POLYMAKE_VERSION >= 301 /*3.1*/
166  pm::array_traits<pm::Integer>::iterator pi = concat_rows(*mi).begin();
167 #else
168  const polymake::Integer* pi = concat_rows(*mi).begin();
169 #endif
170  for (int r = 1; r <= rows; r++)
171  for (int c = 1; c <= cols; c++)
172  {
173  IMATELEM(*iv,r,c) = PmInteger2Int(*pi, ok);
174  pi++;
175  }
176  return iv;
177 }
178 
179 bigintmat* PmMatrixInteger2Bigintmat (polymake::Matrix<polymake::Integer>* mi)
180 {
181  int rows = mi->rows();
182  int cols = mi->cols();
183  bigintmat* bim= new bigintmat(rows,cols,coeffs_BIGINT);
184 #if POLYMAKE_VERSION >= 301 /*3.1*/
185  pm::array_traits<pm::Integer>::iterator pi = concat_rows(*mi).begin();
186 #else
187  const polymake::Integer* pi = concat_rows(*mi).begin();
188 #endif
189  for (int r = 1; r <= rows; r++)
190  for (int c = 1; c <= cols; c++)
191  {
192  number temp = PmInteger2Number(*pi);
193  bim->set(r,c,temp);
194  n_Delete(&temp,coeffs_BIGINT);
195  pi++;
196  }
197  return bim;
198 }
199 
200 lists PmIncidenceMatrix2ListOfIntvecs (polymake::IncidenceMatrix<polymake::NonSymmetric>* icmat)
201 {
202  int rows = icmat->rows();
203  int cols = icmat->cols();
205  L->Init(rows);
206 
207  for (int r = 0; r < rows; r++)
208  {
209  intvec* iv = new intvec(cols); int i=0;
210  for (int c = 0; c < cols; c++)
211  {
212  if ((*icmat).row(r).exists(c))
213  { (*iv)[i]=c; i++; }
214  }
215  iv->resize(i);
216  L->m[r].rtyp = INTVEC_CMD;
217  L->m[r].data = (void*) iv;
218  }
219 
220  return L;
221 }
222 
223 lists PmAdjacencyMatrix2ListOfEdges (polymake::IncidenceMatrix<polymake::NonSymmetric>* icmat)
224 {
225  int rows = icmat->rows();
226  int cols = icmat->cols();
227 
228  // counting number of edges
229  int i=0; int r, c;
230  for (r=0; r<rows; r++)
231  {
232  for (c=0; c<cols; c++)
233  {
234  if ((*icmat).row(r).exists(c) && r<c)
235  i++;
236  }
237  }
238 
240  L->Init(i);
241 
242  i=0;
243  for (r=0; r<rows; r++)
244  {
245  for (c=0; c<cols; c++)
246  {
247  if ((*icmat).row(r).exists(c) && r<c)
248  {
249  intvec* iv = new intvec(2);
250  (*iv)[0]=r; (*iv)[1]=c;
251  L->m[i].rtyp = INTVEC_CMD;
252  L->m[i].data = (void*) iv;
253  i++;
254  }
255  }
256  }
257 
258  return L;
259 }
260 
261 intvec* PmSetInteger2Intvec (polymake::Set<polymake::Integer>* si, bool &b)
262 {
263  polymake::Vector<polymake::Integer> vi(*si);
264  return PmVectorInteger2Intvec(&vi,b);
265 }
266 
267 /* polymake <- singular */
268 
269 polymake::Matrix<polymake::Integer> Intvec2PmMatrixInteger (const intvec* im)
270 {
271  int rows=im->rows();
272  int cols=im->cols();
273  polymake::Matrix<polymake::Integer> mi(rows,cols);
274  for(int r=0; r<rows; r++)
275  for(int c=0; c<cols; c++)
276  mi(r,c) = polymake::Integer(IMATELEM(*im, r+1, c+1));
277  return mi;
278 }
279 
280 /* Functions for converting cones and fans in between gfan and polymake,
281  Singular shares the same cones and fans with gfan */
282 
283 gfan::ZCone* PmCone2ZCone (polymake::perl::Object* pc)
284 {
285  if (pc->isa("Cone"))
286  {
287  polymake::Integer ambientdim1 = pc->give("CONE_AMBIENT_DIM");
288  bool ok=true; int ambientdim2 = PmInteger2Int(ambientdim1, ok);
289  if (!ok)
290  {
291  WerrorS("PmCone2ZCone: overflow while converting polymake::Integer to int");
292  }
293  polymake::Matrix<polymake::Rational> ineqrational = pc->give("FACETS");
294  polymake::Matrix<polymake::Rational> eqrational = pc->give("LINEAR_SPAN");
295  // polymake::Matrix<polymake::Rational> exraysrational = pc->give("RAYS");
296  // polymake::Matrix<polymake::Rational> linrational = pc->give("LINEALITY_SPACE");
297 
298  gfan::ZMatrix zv, zw, zx, zy, zz;
299  // the following branching statements are to cover cases in which polymake returns empty matrices
300  // by convention, gfanlib ignores empty matrices, hence zero matrices of right dimensions have to be supplied
301  if (ineqrational.cols()!=0)
302  {
303  polymake::Matrix<polymake::Integer> ineqinteger = polymake::common::primitive(ineqrational);
304  zv = PmMatrixInteger2GfZMatrix(&ineqinteger);
305  }
306  else
307  zv = gfan::ZMatrix(0, ambientdim2);
308  if (eqrational.cols()!=0)
309  {
310  polymake::Matrix<polymake::Integer> eqinteger = polymake::common::primitive(eqrational);
311  zw = PmMatrixInteger2GfZMatrix(&eqinteger);
312  }
313  else
314  zw = gfan::ZMatrix(0, ambientdim2);
315  // if (exraysrational.cols()!=0)
316  // {
317  // polymake::Matrix<polymake::Integer> exraysinteger = polymake::common::primitive(exraysrational);
318  // zx = PmMatrixInteger2GfZMatrix(&exraysinteger);
319  // }
320  // else
321  // zx = gfan::ZMatrix(0, ambientdim2);
322  // if (linrational.cols()!=0)
323  // {
324  // polymake::Matrix<polymake::Integer> lininteger = polymake::common::primitive(linrational);
325  // zy = PmMatrixInteger2GfZMatrix(&lininteger);
326  // }
327  // else
328  // zy = gfan::ZMatrix(0, ambientdim2);
329 
330  // gfan::ZCone* zc = new gfan::ZCone(zv,zw,zx,zy,zz,3);
331  gfan::ZCone* zc = new gfan::ZCone(zv,zw,3);
332  return zc;
333  }
334  WerrorS("PmCone2ZCone: unexpected parameters");
335  return NULL;
336 }
337 
338 gfan::ZCone* PmPolytope2ZPolytope (polymake::perl::Object* pp)
339 {
340  if (pp->isa("Polytope<Rational>"))
341  {
342  polymake::Integer ambientdim1 = pp->give("CONE_AMBIENT_DIM");
343  bool ok=true; int ambientdim2 = PmInteger2Int(ambientdim1, ok);
344  if (!ok)
345  {
346  WerrorS("overflow while converting polymake::Integer to int");
347  }
348  polymake::Matrix<polymake::Rational> ineqrational = pp->give("FACETS");
349  polymake::Matrix<polymake::Rational> eqrational = pp->give("AFFINE_HULL");
350  // polymake::Matrix<polymake::Rational> vertrational = pp->give("VERTICES");
351  // polymake::Matrix<polymake::Rational> linrational = pp->give("LINEALITY_SPACE");
352 
353  gfan::ZMatrix zv, zw;
354  // the following branching statements are to cover the cases when polymake returns empty matrices
355  // by convention, gfanlib ignores empty matrices, hence zero matrices of right dimensions have to be supplied
356  if (ineqrational.cols()!=0)
357  {
358  polymake::Matrix<polymake::Integer> ineqinteger = polymake::common::primitive(ineqrational);
359  zv = PmMatrixInteger2GfZMatrix(&ineqinteger);
360  }
361  else
362  zv = gfan::ZMatrix(0, ambientdim2);
363 
364  if (eqrational.cols()!=0)
365  {
366  polymake::Matrix<polymake::Integer> eqinteger = polymake::common::primitive(eqrational);
367  zw = PmMatrixInteger2GfZMatrix(&eqinteger);
368  }
369  else
370  zw = gfan::ZMatrix(0, ambientdim2);
371 
372  // if (vertrational.cols()!=0)
373  // {
374  // polymake::Matrix<polymake::Integer> vertinteger = polymake::common::primitive(vertrational);
375  // zx = PmMatrixInteger2GfZMatrix(&vertinteger);
376  // }
377  // else
378  // zx = gfan::ZMatrix(0, ambientdim2);
379  // if (linrational.cols()!=0)
380  // {
381  // polymake::Matrix<polymake::Integer> lininteger = polymake::common::primitive(linrational);
382  // zy = PmMatrixInteger2GfZMatrix(&lininteger);
383  // }
384  // else
385  // zy = gfan::ZMatrix(0, ambientdim2);
386 
387  // gfan::ZCone* zp = new gfan::ZCone(zv,zw,zx,zy,zz,3);
388  gfan::ZCone* zp = new gfan::ZCone(zv,zw,3);
389 
390  return zp;
391  }
392  WerrorS("PmPolytope2ZPolytope: unexpected parameters");
393  return NULL;
394 }
395 
396 gfan::ZFan* PmFan2ZFan (polymake::perl::Object* pf)
397 {
398  if (pf->isa("PolyhedralFan"))
399  {
400  int d = (int) pf->give("FAN_AMBIENT_DIM");
401  gfan::ZFan* zf = new gfan::ZFan(d);
402 
403  int n = pf->give("N_MAXIMAL_CONES");
404  for (int i=0; i<n; i++)
405  {
406  polymake::perl::Object pmcone=pf->CallPolymakeMethod("cone",i);
407  gfan::ZCone* zc=PmCone2ZCone(&pmcone);
408  zf->insert(*zc);
409  }
410  return zf;
411  }
412  WerrorS("PmFan2ZFan: unexpected parameters");
413  return NULL;
414 }
415 
416 polymake::perl::Object* ZCone2PmCone (gfan::ZCone* zc)
417 {
418  polymake::perl::Object* gc = new polymake::perl::Object("Cone<Rational>");
419 
420  gfan::ZMatrix inequalities = zc->getInequalities();
421  gc->take("FACETS") << GfZMatrix2PmMatrixInteger(&inequalities);
422 
423  gfan::ZMatrix equations = zc->getEquations();
424  gc->take("LINEAR_SPAN") << GfZMatrix2PmMatrixInteger(&equations);
425 
426  // if(zc->areExtremeRaysKnown())
427  // {
428  // gfan::ZMatrix extremeRays = zc->extremeRays();
429  // gc->take("RAYS") << GfZMatrix2PmMatrixInteger(&extremeRays);
430  // }
431 
432  // if(zc->areGeneratorsOfLinealitySpaceKnown())
433  // {
434  // gfan::ZMatrix lineality = zc->generatorsOfLinealitySpace();
435  // gc->take("LINEALITY_SPACE") << GfZMatrix2PmMatrixInteger(&lineality);
436  // }
437 
438  return gc;
439 }
440 
441 polymake::perl::Object* ZPolytope2PmPolytope (gfan::ZCone* zc)
442 {
443  polymake::perl::Object* pp = new polymake::perl::Object("Polytope<Rational>");
444 
445  gfan::ZMatrix inequalities = zc->getInequalities();
446  pp->take("FACETS") << GfZMatrix2PmMatrixInteger(&inequalities);
447 
448  gfan::ZMatrix equations = zc->getEquations();
449  pp->take("LINEAR_SPAN") << GfZMatrix2PmMatrixInteger(&equations);
450 
451  // if(zc->areExtremeRaysKnown())
452  // {
453  // gfan::ZMatrix vertices = zc->extremeRays();
454  // pp->take("VERTICES") << GfZMatrix2PmMatrixInteger(&vertices);
455  // }
456 
457  return pp;
458 }
459 
460 polymake::Matrix<polymake::Integer> raysOf(gfan::ZFan* zf)
461 {
462  int d = zf->getAmbientDimension();
463  int n = zf->numberOfConesOfDimension(1,0,0);
464  gfan::ZMatrix zm(n,d);
465 
466  for (int i=0; i<n; i++)
467  {
468  gfan::ZCone zc = zf->getCone(1,i,0,0);
469  gfan::ZMatrix ray = zc.extremeRays();
470  for (int j=0; j<d; j++)
471  {
472  zm[i][j]=ray[0][j];
473  }
474  }
475 
476  return GfZMatrix2PmMatrixInteger(&zm);
477 }
478 
479 int numberOfRaysOf(gfan::ZFan* zf)
480 {
481  int n = zf->numberOfConesOfDimension(1,0,0);
482  return n;
483 }
484 
485 int numberOfMaximalConesOf(gfan::ZFan* zf)
486 {
487  int d = zf->getAmbientDimension();
488  int n = 0;
489 
490  for (int i=0; i<=d; i++)
491  {
492  n = n + zf->numberOfConesOfDimension(i,0,1);
493  }
494 
495  return n;
496 }
497 
498 polymake::Array<polymake::Set<int> > conesOf(gfan::ZFan* zf)
499 {
500  int r = numberOfMaximalConesOf(zf);
501 
502  polymake::Matrix<polymake::Integer> pm=raysOf(zf);
503  polymake::Array<polymake::Set<int> > L(r);
504 
505  int ii = 0;
506  for (int d=1; d<=zf->getAmbientDimension(); d++)
507  {
508  for (int i=0; i<zf->numberOfConesOfDimension(d,0,1); i++)
509  {
510  gfan::IntVector v = zf->getConeIndices(d,i,0,1);
511  polymake::Set<int> s;
512  for (int j=0; j<(int)v.size(); j++)
513  {
514  s = s+v[j];
515  }
516  L[ii] = s;
517  ii = ii + 1;
518  }
519  }
520  return L;
521 }
522 
523 polymake::perl::Object* ZFan2PmFan (gfan::ZFan* zf)
524 {
525  polymake::perl::Object* pf = new polymake::perl::Object("PolyhedralFan");
526 
527  polymake::Matrix<polymake::Integer> zm = raysOf(zf);
528  pf->take("RAYS") << zm; // using rays here instead of INPUT_RAYS prevents redundant computations
529 
530  polymake::Array<polymake::Set<int> > ar = conesOf(zf);
531  pf->take("MAXIMAL_CONES") << ar;
532 
533  return pf;
534 }
535 
536 #endif
#define omAllocBin(bin)
Definition: omAllocDecl.h:205
const CanonicalForm int s
Definition: facAbsFact.cc:55
sleftv * m
Definition: lists.h:45
int j
Definition: facHensel.cc:105
void resize(int new_length)
Definition: intvec.cc:106
number PmInteger2Number(const polymake::Integer &pi)
lists PmIncidenceMatrix2ListOfIntvecs(polymake::IncidenceMatrix< polymake::NonSymmetric > *icmat)
Definition: lists.h:22
Matrices of numbers.
Definition: bigintmat.h:51
lists PmAdjacencyMatrix2ListOfEdges(polymake::IncidenceMatrix< polymake::NonSymmetric > *icmat)
int rows() const
Definition: bigintmat.h:146
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
Definition: coeffs.h:539
polymake::Vector< polymake::Integer > Intvec2PmVectorInteger(const intvec *iv)
int rows() const
Definition: intvec.h:94
polymake::perl::Object * ZCone2PmCone(gfan::ZCone *zc)
polymake::perl::Object * ZPolytope2PmPolytope(gfan::ZCone *zc)
bigintmat * PmMatrixInteger2Bigintmat(polymake::Matrix< polymake::Integer > *mi)
gfan::Rational PmRational2GfRational(const polymake::Rational &pr)
intvec * PmSetInteger2Intvec(polymake::Set< polymake::Integer > *si, bool &b)
gfan::ZFan * PmFan2ZFan(polymake::perl::Object *pf)
void WerrorS(const char *s)
Definition: feFopen.cc:24
polymake::Matrix< polymake::Integer > Intvec2PmMatrixInteger(const intvec *im)
coeffs coeffs_BIGINT
Definition: ipid.cc:52
polymake::Array< polymake::Set< int > > conesOf(gfan::ZFan *zf)
void set(int i, int j, number n, const coeffs C=NULL)
replace an entry with a copy (delete old + copy new!). NOTE: starts at [1,1]
Definition: bigintmat.cc:95
int numberOfMaximalConesOf(gfan::ZFan *zf)
void * data
Definition: subexpr.h:88
polymake::Integer GfInteger2PmInteger(const gfan::Integer &gi)
polymake::Matrix< polymake::Integer > raysOf(gfan::ZFan *zf)
CanonicalForm b
Definition: cfModGcd.cc:4044
BOOLEAN inequalities(leftv res, leftv args)
Definition: bbcone.cc:560
gfan::ZMatrix PmMatrixInteger2GfZMatrix(const polymake::Matrix< polymake::Integer > *mi)
Definition: intvec.h:17
intvec * PmVectorInteger2Intvec(const polymake::Vector< polymake::Integer > *vi, bool &ok)
gfan::ZCone * PmCone2ZCone(polymake::perl::Object *pc)
intvec * PmMatrixInteger2Intvec(polymake::Matrix< polymake::Integer > *mi, bool &ok)
int numberOfRaysOf(gfan::ZFan *zf)
CanonicalForm pp(const CanonicalForm &)
CanonicalForm pp ( const CanonicalForm & f )
Definition: cf_gcd.cc:253
static FORCE_INLINE number n_InitMPZ(mpz_t n, const coeffs r)
conversion of a GMP integer to number
Definition: coeffs.h:543
int m
Definition: cfEzgcd.cc:121
int i
Definition: cfEzgcd.cc:125
polymake::Rational GfRational2PmRational(const gfan::Rational &gr)
polymake::Matrix< polymake::Integer > GfZMatrix2PmMatrixInteger(const gfan::ZMatrix *zm)
polymake::perl::Object * ZFan2PmFan(gfan::ZFan *zf)
gfan::QMatrix PmMatrixRational2GfQMatrix(const polymake::Matrix< polymake::Rational > *mr)
INLINE_THIS void Init(int l=0)
gfan::ZCone * PmPolytope2ZPolytope(polymake::perl::Object *pp)
#define pi
Definition: libparse.cc:1143
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
#define NULL
Definition: omList.c:10
slists * lists
Definition: mpr_numeric.h:146
int length() const
Definition: intvec.h:92
BOOLEAN equations(leftv res, leftv args)
Definition: bbcone.cc:577
int cols() const
Definition: intvec.h:93
int rtyp
Definition: subexpr.h:91
polymake::Matrix< polymake::Rational > GfQMatrix2PmMatrixRational(const gfan::QMatrix *qm)
omBin slists_bin
Definition: lists.cc:23
int PmInteger2Int(const polymake::Integer &pi, bool &ok)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete &#39;p&#39;
Definition: coeffs.h:456
#define IMATELEM(M, I, J)
Definition: intvec.h:83
gfan::Integer PmInteger2GfInteger(const polymake::Integer &pi)