source: git/dyn_modules/callpolymake/polymake_conversion.h @ 47e8b04

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