4 #include <polylib/polylib.h>
16 const char **param_name
;
19 if(!a
|| a
->NbColumns
== 0) {
20 fprintf(stderr
,"Input error: empty matrix\n");
23 A
= Constraints2Polyhedron(a
, WS
);
27 if(!b
|| b
->NbColumns
== 0) {
28 fprintf(stderr
, "Input error: empty matrix\n");
31 B
= Constraints2Polyhedron(b
, WS
);
34 /* Read the name of the parameters */
35 param_name
= Read_ParamNames(stdin
, B
->Dimension
);
36 PA
= Polyhedron2Param_Domain(A
,B
,WS
);
37 if(!PA
|| PA
->D
==NULL
) {
38 printf("---------------------------------------\n");
39 printf("Empty polyhedron\n");
46 if (PA
->Rays
->NbRows
> 0) {
47 printf( "---------------------------------------\n" );
48 printf( "Overall rays :\n");
49 for (i
= 0; i
< PA
->Rays
->NbRows
; i
++) {
50 if (value_zero_p(PA
->Rays
->p
[i
][0]))
54 for (j
= 1; j
< PA
->Rays
->NbColumns
-1; j
++) {
55 value_print(stdout
,P_VALUE_FMT
,PA
->Rays
->p
[i
][j
]);
61 /*****************************/
62 /* Scan the validity domains */
63 for(P
=PA
->D
;P
;P
=P
->next
) {
65 /* prints current val. dom. */
66 printf( "---------------------------------------\n" );
67 printf( "Domain :\n");
68 Print_Domain( stdout
, P
->Domain
, param_name
);
70 /* scan the vertices */
71 printf( "Vertices :\n");
72 FORALL_PVertex_in_ParamPolyhedron(V
,P
,PA
) {
74 /* prints each vertex */
75 Print_Vertex( stdout
, V
->Vertex
, param_name
);
78 END_FORALL_PVertex_in_ParamPolyhedron
;
80 /*****************************/
82 Param_Polyhedron_Free( PA
);