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