source: git/dyn_modules/callpolymake/polymake_conversion.h @ 62de8de

spielwiese
Last change on this file since 62de8de was 62de8de, checked in by Yue Ren <ren@…>, 11 years ago
chg: updated callpolymake to newest version
  • Property mode set to 100644
File size: 2.6 KB
Line 
1#ifndef POLYMAKE_CONVERSION_H
2#define POLYMAKE_CONVERSION_H
3
4#include <kernel/mod2.h>
5
6#include <gmpxx.h>
7
8#include <polymake/Main.h>
9#include <polymake/Matrix.h>
10#include <polymake/Rational.h>
11#include <polymake/Integer.h>
12#include <polymake/Set.h>
13#include <polymake/common/lattice_tools.h>
14#include <polymake/IncidenceMatrix.h>
15
16#include <gfanlib/gfanlib.h>
17#include <gfanlib/gfanlib_q.h>
18
19#include <libpolys/coeffs/numbers.h>
20#include <libpolys/coeffs/bigintmat.h>
21#include <libpolys/misc/intvec.h>
22#include <Singular/lists.h>
23
24/* Functions for converting Integers, Rationals and their Matrices
25   in between C++, gfan, polymake and singular */
26
27/* gfan -> polymake */
28
29polymake::Integer GfInteger2PmInteger (const gfan::Integer& gi);
30polymake::Rational GfRational2PmRational (const gfan::Rational& gr);
31polymake::Vector<polymake::Integer> Intvec2PmVectorInteger (const intvec* iv);
32polymake::Matrix<polymake::Integer> GfZMatrix2PmMatrixInteger (const gfan::ZMatrix* zm);
33polymake::Matrix<polymake::Rational> GfQMatrix2PmMatrixRational (const gfan::QMatrix* qm);
34
35/* gfan <- polymake */
36
37gfan::Integer PmInteger2GfInteger (const polymake::Integer& pi);
38gfan::Rational PmRational2GfRational (const polymake::Rational& pr);
39gfan::ZMatrix PmMatrixInteger2GfZMatrix (const polymake::Matrix<polymake::Integer>* mi);
40gfan::QMatrix PmMatrixRational2GfQMatrix (const polymake::Matrix<polymake::Rational>* mr);
41
42/* polymake -> singular */
43
44int PmInteger2Int(const polymake::Integer& pi, bool &ok);
45intvec* PmVectorInteger2Intvec (const polymake::Vector<polymake::Integer>* vi, bool &ok);
46intvec* PmMatrixInteger2Intvec (polymake::Matrix<polymake::Integer>* mi, bool &ok);
47lists PmIncidenceMatrix2ListOfIntvecs (polymake::IncidenceMatrix<polymake::NonSymmetric>* icmat);
48lists PmAdjacencyMatrix2ListOfEdges (polymake::IncidenceMatrix<polymake::NonSymmetric>* icmat);
49intvec* PmSetInteger2Intvec (polymake::Set<polymake::Integer>* si, bool &b);
50number PmInteger2Number (const polymake::Integer& pi);
51bigintmat* PmMatrixInteger2Bigintmat (polymake::Matrix<polymake::Integer>* mi);
52
53/* polymake <- singular */
54
55polymake::Matrix<polymake::Integer> Intvec2PmMatrixInteger (const intvec* im);
56
57
58/* Functions for converting cones and fans in between gfan and polymake,
59   Singular shares the same cones and fans with gfan */
60
61gfan::ZCone* PmCone2ZCone (polymake::perl::Object* pc);
62gfan::ZCone* PmPolytope2ZPolytope (polymake::perl::Object* pp);
63gfan::ZFan* PmFan2ZFan (polymake::perl::Object* pf);
64polymake::perl::Object* ZCone2PmCone (gfan::ZCone* zc);
65polymake::perl::Object* ZPolytope2PmPolytope (gfan::ZCone* zc);
66polymake::perl::Object* ZFan2PmFan (gfan::ZFan* zf);
67
68#endif
Note: See TracBrowser for help on using the repository browser.