My Project
Loading...
Searching...
No Matches
polymake_conversion.h
Go to the documentation of this file.
1#ifndef POLYMAKE_CONVERSION_H
2#define POLYMAKE_CONVERSION_H
3
4#include "kernel/mod2.h"
5
6#ifdef HAVE_POLYMAKE
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 "coeffs/numbers.h"
22#include "coeffs/bigintmat.h"
23#include "misc/intvec.h"
24#include "Singular/lists.h"
25
26/* Functions for converting Integers, Rationals and their Matrices
27 in between C++, gfan, polymake and singular */
28
29/* gfan -> polymake */
30
31polymake::Integer GfInteger2PmInteger (const gfan::Integer& gi);
32polymake::Rational GfRational2PmRational (const gfan::Rational& gr);
33polymake::Vector<polymake::Integer> Intvec2PmVectorInteger (const intvec* iv);
34polymake::Matrix<polymake::Integer> GfZMatrix2PmMatrixInteger (const gfan::ZMatrix* zm);
35polymake::Matrix<polymake::Rational> GfQMatrix2PmMatrixRational (const gfan::QMatrix* qm);
36
37/* gfan <- polymake */
38
39gfan::Integer PmInteger2GfInteger (const polymake::Integer& pi);
40gfan::Rational PmRational2GfRational (const polymake::Rational& pr);
41gfan::ZMatrix PmMatrixInteger2GfZMatrix (const polymake::Matrix<polymake::Integer>* mi);
42gfan::QMatrix PmMatrixRational2GfQMatrix (const polymake::Matrix<polymake::Rational>* mr);
43
44/* polymake -> singular */
45
46int PmInteger2Int(const polymake::Integer& pi, bool &ok);
47intvec* PmVectorInteger2Intvec (const polymake::Vector<polymake::Integer>* vi, bool &ok);
48intvec* PmMatrixInteger2Intvec (polymake::Matrix<polymake::Integer>* mi, bool &ok);
49lists PmIncidenceMatrix2ListOfIntvecs (polymake::IncidenceMatrix<polymake::NonSymmetric>* icmat);
50lists PmAdjacencyMatrix2ListOfEdges (polymake::IncidenceMatrix<polymake::NonSymmetric>* icmat);
51intvec* PmSetInteger2Intvec (polymake::Set<polymake::Integer>* si, bool &b);
52number PmInteger2Number (const polymake::Integer& pi);
53bigintmat* PmMatrixInteger2Bigintmat (polymake::Matrix<polymake::Integer>* mi);
54
55/* polymake <- singular */
56
57polymake::Matrix<polymake::Integer> Intvec2PmMatrixInteger (const intvec* im);
58
59
60/* Functions for converting cones and fans in between gfan and polymake,
61 Singular shares the same cones and fans with gfan */
62
63gfan::ZCone* PmCone2ZCone (polymake::perl::Object* pc);
64gfan::ZCone* PmPolytope2ZPolytope (polymake::perl::Object* pp);
65gfan::ZFan* PmFan2ZFan (polymake::perl::Object* pf);
66polymake::perl::Object* ZCone2PmCone (gfan::ZCone* zc);
67polymake::perl::Object* ZPolytope2PmPolytope (gfan::ZCone* zc);
68polymake::perl::Object* ZFan2PmFan (gfan::ZFan* zf);
69
70#endif
71#endif
CanonicalForm FACTORY_PUBLIC pp(const CanonicalForm &)
CanonicalForm pp ( const CanonicalForm & f )
Definition: cf_gcd.cc:676
CanonicalForm b
Definition: cfModGcd.cc:4103
Matrices of numbers.
Definition: bigintmat.h:51
Definition: intvec.h:23
Definition: lists.h:24
#define pi
Definition: libparse.cc:1145
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::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)
intvec * PmVectorInteger2Intvec(const polymake::Vector< polymake::Integer > *vi, bool &ok)
gfan::Integer PmInteger2GfInteger(const polymake::Integer &pi)
gfan::QMatrix PmMatrixRational2GfQMatrix(const polymake::Matrix< polymake::Rational > *mr)