source: git/dyn_modules/callpolymake/polymake_conversion.h @ b7b2c5

spielwiese
Last change on this file since b7b2c5 was b21ae4, checked in by Martin Lee <martinlee84@…>, 11 years ago
chg: added dyn_modules to #include<callgfanlib/*> chg: added path to factory to include paths chg: deleted HAVE_FANS
  • Property mode set to 100644
File size: 2.2 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
15#include <gfanlib/gfanlib.h>
16#include <gfanlib/gfanlib_q.h>
17
18#include <libpolys/misc/intvec.h>
19
20/* Functions for converting Integers, Rationals and their Matrices
21   in between C++, gfan, polymake and singular */
22
23/* gfan -> polymake */
24
25polymake::Integer GfInteger2PmInteger (const gfan::Integer& gi);
26polymake::Rational GfRational2PmRational (const gfan::Rational& gr);
27polymake::Vector<polymake::Integer> Intvec2PmVectorInteger (const intvec* iv);
28polymake::Matrix<polymake::Integer> GfZMatrix2PmMatrixInteger (const gfan::ZMatrix* zm);
29polymake::Matrix<polymake::Rational> GfQMatrix2PmMatrixRational (const gfan::QMatrix* qm);
30
31/* gfan <- polymake */
32
33gfan::Integer PmInteger2GfInteger (const polymake::Integer& pi);
34gfan::Rational PmRational2GfRational (const polymake::Rational& pr);
35gfan::ZMatrix PmMatrixInteger2GfZMatrix (const polymake::Matrix<polymake::Integer>* mi);
36gfan::QMatrix PmMatrixRational2GfQMatrix (const polymake::Matrix<polymake::Rational>* mr);
37
38/* polymake -> singular */
39
40int PmInteger2Int(const polymake::Integer& pi, bool &ok);
41intvec* PmVectorInteger2Intvec (const polymake::Vector<polymake::Integer>* vi, bool &ok);
42intvec* PmMatrixInteger2Intvec (polymake::Matrix<polymake::Integer>* mi, bool &ok);
43// intvec* PmIncidenceMatrix2Intvec (polymake::IncidenceMatrix<polymake::NonSymmetric>* icmat);
44intvec* PmSetInteger2Intvec (polymake::Set<polymake::Integer>* si, bool &b);
45
46/* polymake <- singular */
47
48polymake::Matrix<polymake::Integer> Intvec2PmMatrixInteger (const intvec* im);
49
50
51/* Functions for converting cones and fans in between gfan and polymake,
52   Singular shares the same cones and fans with gfan */
53
54gfan::ZCone* PmCone2ZCone (polymake::perl::Object* pc);
55gfan::ZCone* PmPolytope2ZPolytope (polymake::perl::Object* pp);
56gfan::ZFan* PmFan2ZFan (polymake::perl::Object* pf);
57polymake::perl::Object* ZCone2PmCone (gfan::ZCone* zc);
58polymake::perl::Object* ZPolytope2PmPolytope (gfan::ZCone* zc);
59polymake::perl::Object* ZFan2PmFan (gfan::ZFan* zf);
60
61#endif
Note: See TracBrowser for help on using the repository browser.