source: git/Singular/dyn_modules/polymake/polymake_conversion.h @ edb60f

fieker-DuValspielwiese
Last change on this file since edb60f was 9996416, checked in by Oleksandr Motsak <motsak@…>, 10 years ago
Better builtin handling
  • 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#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
Note: See TracBrowser for help on using the repository browser.