autoconf warning missing files
[polylib.git] / applications / disjoint_union_sep.c
blobbcee45d0df1412aca5d3dae03ef0ae00403a0404
1 /* Polyhedron disjoint intersections
2 */
4 /*
5 disjoint_union_sep computes the disjoint union of the given list of domains.
6 input:
7 (integer) # of polyhedra
8 list of polyhedra in the usual matrix (constraints) format
10 output:
11 list of polyhedra (constraint matrices) having no integer point in common
14 #include <stdio.h>
15 #include <stdlib.h>
17 #include <polylib/polylib.h>
19 #define WS 0
22 /* Procedure to print constraints of a domain */
23 void AffContraintes(Polyhedron *p)
25 for( ;p;p=p->next)
27 Polyhedron_PrintConstraints(stdout, P_VALUE_FMT, p );
28 printf("\n");
33 int main() {
35 int np, i;
37 Matrix *a;
38 Polyhedron *A, *tmp, *DD;
40 scanf( "%d", &np );
42 A = NULL;
43 for( i=0 ; i<np ; i++ )
45 a = Matrix_Read();
46 tmp = Constraints2Polyhedron(a,WS);
47 Matrix_Free(a);
48 tmp ->next = A;
49 A = tmp;
53 DD = Disjoint_Domain( A, 0, WS );
55 AffContraintes(DD);
57 Domain_Free( DD );
58 Domain_Free( A );
60 return 0;