Loading...
Searching...
No Matches
polymake_conversion.h
Go to the documentation of this file.
#ifndef POLYMAKE_CONVERSION_H
#define POLYMAKE_CONVERSION_H
#include "kernel/mod2.h"
#ifdef HAVE_POLYMAKE
#include <gmpxx.h>
#include <polymake/Main.h>
#include <polymake/Matrix.h>
#include <polymake/Rational.h>
#include <polymake/Integer.h>
#include <polymake/Set.h>
#include <polymake/common/lattice_tools.h>
#include <polymake/IncidenceMatrix.h>
#include "gfanlib/gfanlib.h"
#include "gfanlib/gfanlib_q.h"
#include "coeffs/numbers.h"
#include "coeffs/bigintmat.h"
#include "misc/intvec.h"
#include "Singular/lists.h"
/* Functions for converting Integers, Rationals and their Matrices
in between C++, gfan, polymake and singular */
/* gfan -> polymake */
polymake::Integer GfInteger2PmInteger (const gfan::Integer& gi);
polymake::Rational GfRational2PmRational (const gfan::Rational& gr);
polymake::Vector<polymake::Integer> Intvec2PmVectorInteger (const intvec* iv);
polymake::Matrix<polymake::Integer> GfZMatrix2PmMatrixInteger (const gfan::ZMatrix* zm);
polymake::Matrix<polymake::Rational> GfQMatrix2PmMatrixRational (const gfan::QMatrix* qm);
/* gfan <- polymake */
gfan::Integer PmInteger2GfInteger (const polymake::Integer& pi);
gfan::Rational PmRational2GfRational (const polymake::Rational& pr);
gfan::ZMatrix PmMatrixInteger2GfZMatrix (const polymake::Matrix<polymake::Integer>* mi);
gfan::QMatrix PmMatrixRational2GfQMatrix (const polymake::Matrix<polymake::Rational>* mr);
/* polymake -> singular */
int PmInteger2Int(const polymake::Integer& pi, bool &ok);
intvec* PmVectorInteger2Intvec (const polymake::Vector<polymake::Integer>* vi, bool &ok);
intvec* PmMatrixInteger2Intvec (polymake::Matrix<polymake::Integer>* mi, bool &ok);
lists PmIncidenceMatrix2ListOfIntvecs (polymake::IncidenceMatrix<polymake::NonSymmetric>* icmat);
lists PmAdjacencyMatrix2ListOfEdges (polymake::IncidenceMatrix<polymake::NonSymmetric>* icmat);
intvec* PmSetInteger2Intvec (polymake::Set<polymake::Integer>* si, bool &b);
number PmInteger2Number (const polymake::Integer& pi);
bigintmat* PmMatrixInteger2Bigintmat (polymake::Matrix<polymake::Integer>* mi);
/* polymake <- singular */
polymake::Matrix<polymake::Integer> Intvec2PmMatrixInteger (const intvec* im);
/* Functions for converting cones and fans in between gfan and polymake,
Singular shares the same cones and fans with gfan */
gfan::ZCone* PmCone2ZCone (polymake::perl::Object* pc);
gfan::ZCone* PmPolytope2ZPolytope (polymake::perl::Object* pp);
gfan::ZFan* PmFan2ZFan (polymake::perl::Object* pf);
polymake::perl::Object* ZCone2PmCone (gfan::ZCone* zc);
polymake::perl::Object* ZPolytope2PmPolytope (gfan::ZCone* zc);
polymake::perl::Object* ZFan2PmFan (gfan::ZFan* zf);
#endif
#endif
bigintmat.h
pp
CanonicalForm FACTORY_PUBLIC pp(const CanonicalForm &)
CanonicalForm pp ( const CanonicalForm & f ).
Definition cf_gcd.cc:676
b
CanonicalForm b
Definition cfModGcd.cc:4111
bigintmat
Matrices of numbers.
Definition bigintmat.h:51
intvec
Definition intvec.h:24
intvec.h
pi
#define pi
Definition libparse.cc:1145
lists.h
mod2.h
lists
slists * lists
Definition mpr_numeric.h:146
numbers.h
PmInteger2Int
int PmInteger2Int(const polymake::Integer &pi, bool &ok)
Definition polymake_conversion.cc:121
PmSetInteger2Intvec
intvec * PmSetInteger2Intvec(polymake::Set< polymake::Integer > *si, bool &b)
Definition polymake_conversion.cc:264
PmPolytope2ZPolytope
gfan::ZCone * PmPolytope2ZPolytope(polymake::perl::Object *pp)
Definition polymake_conversion.cc:341
GfInteger2PmInteger
polymake::Integer GfInteger2PmInteger(const gfan::Integer &gi)
Definition polymake_conversion.cc:33
PmRational2GfRational
gfan::Rational PmRational2GfRational(const polymake::Rational &pr)
Definition polymake_conversion.cc:90
GfZMatrix2PmMatrixInteger
polymake::Matrix< polymake::Integer > GfZMatrix2PmMatrixInteger(const gfan::ZMatrix *zm)
Definition polymake_conversion.cc:59
PmInteger2Number
number PmInteger2Number(const polymake::Integer &pi)
Definition polymake_conversion.cc:140
Intvec2PmVectorInteger
polymake::Vector< polymake::Integer > Intvec2PmVectorInteger(const intvec *iv)
Definition polymake_conversion.cc:49
GfQMatrix2PmMatrixRational
polymake::Matrix< polymake::Rational > GfQMatrix2PmMatrixRational(const gfan::QMatrix *qm)
Definition polymake_conversion.cc:70
ZFan2PmFan
polymake::perl::Object * ZFan2PmFan(gfan::ZFan *zf)
Definition polymake_conversion.cc:530
PmCone2ZCone
gfan::ZCone * PmCone2ZCone(polymake::perl::Object *pc)
Definition polymake_conversion.cc:286
PmFan2ZFan
gfan::ZFan * PmFan2ZFan(polymake::perl::Object *pf)
Definition polymake_conversion.cc:399
PmIncidenceMatrix2ListOfIntvecs
lists PmIncidenceMatrix2ListOfIntvecs(polymake::IncidenceMatrix< polymake::NonSymmetric > *icmat)
Definition polymake_conversion.cc:203
PmMatrixInteger2Intvec
intvec * PmMatrixInteger2Intvec(polymake::Matrix< polymake::Integer > *mi, bool &ok)
Definition polymake_conversion.cc:163
Intvec2PmMatrixInteger
polymake::Matrix< polymake::Integer > Intvec2PmMatrixInteger(const intvec *im)
Definition polymake_conversion.cc:272
PmAdjacencyMatrix2ListOfEdges
lists PmAdjacencyMatrix2ListOfEdges(polymake::IncidenceMatrix< polymake::NonSymmetric > *icmat)
Definition polymake_conversion.cc:226
ZCone2PmCone
polymake::perl::Object * ZCone2PmCone(gfan::ZCone *zc)
Definition polymake_conversion.cc:423
PmMatrixInteger2GfZMatrix
gfan::ZMatrix PmMatrixInteger2GfZMatrix(const polymake::Matrix< polymake::Integer > *mi)
Definition polymake_conversion.cc:97
ZPolytope2PmPolytope
polymake::perl::Object * ZPolytope2PmPolytope(gfan::ZCone *zc)
Definition polymake_conversion.cc:448
GfRational2PmRational
polymake::Rational GfRational2PmRational(const gfan::Rational &gr)
Definition polymake_conversion.cc:41
PmMatrixInteger2Bigintmat
bigintmat * PmMatrixInteger2Bigintmat(polymake::Matrix< polymake::Integer > *mi)
Definition polymake_conversion.cc:182
PmVectorInteger2Intvec
intvec * PmVectorInteger2Intvec(const polymake::Vector< polymake::Integer > *vi, bool &ok)
Definition polymake_conversion.cc:153
PmInteger2GfInteger
gfan::Integer PmInteger2GfInteger(const polymake::Integer &pi)
Definition polymake_conversion.cc:83
PmMatrixRational2GfQMatrix
gfan::QMatrix PmMatrixRational2GfQMatrix(const polymake::Matrix< polymake::Rational > *mr)
Definition polymake_conversion.cc:108