1 #include <barvinok/options.h>
2 #include "param_util.h"
4 void Param_Vertex_Common_Denominator(Param_Vertices
*V
)
10 assert(V
->Vertex
->NbRows
> 0);
11 dim
= V
->Vertex
->NbColumns
-2;
15 value_assign(lcm
, V
->Vertex
->p
[0][dim
+1]);
16 for (i
= 1; i
< V
->Vertex
->NbRows
; ++i
)
17 value_lcm(V
->Vertex
->p
[i
][dim
+1], lcm
, &lcm
);
19 for (i
= 0; i
< V
->Vertex
->NbRows
; ++i
) {
20 if (value_eq(V
->Vertex
->p
[i
][dim
+1], lcm
))
22 value_division(V
->Vertex
->p
[i
][dim
+1], lcm
, V
->Vertex
->p
[i
][dim
+1]);
23 Vector_Scale(V
->Vertex
->p
[i
], V
->Vertex
->p
[i
],
24 V
->Vertex
->p
[i
][dim
+1], dim
+1);
25 value_assign(V
->Vertex
->p
[i
][dim
+1], lcm
);
31 Param_Polyhedron
*Polyhedron2Param_Polyhedron(Polyhedron
*Din
, Polyhedron
*Cin
,
32 struct barvinok_options
*options
)
34 unsigned MaxRays
= options
->MaxRays
;
35 if (MaxRays
& POL_NO_DUAL
)
37 return Polyhedron2Param_Domain(Din
, Cin
, MaxRays
);