3 namespace polymake
{ namespace polytope
{
5 ::Matrix
*polymake_constraints2polylib(Matrix
<Rational
> &F
)
9 ::Matrix
*M
= Matrix_Alloc(r
, c
+1);
10 for (int i
= 0; i
< r
; ++i
) {
11 Integer LCM
= denominator(F
[i
][0]);
12 for (int j
= 1; j
< c
; ++j
)
13 LCM
= lcm(LCM
, denominator(F
[i
][j
]));
14 value_set_si(M
->p
[i
][0], 1);
16 value_assign(M
->p
[i
][c
], mpq_numref(F
[i
][0].get_rep()));
17 for (int j
= 1; j
< c
; ++j
) {
19 value_assign(M
->p
[i
][j
], mpq_numref(F
[i
][j
].get_rep()));