polylib 5.22.8
disjoint_union_adj.c
Go to the documentation of this file.
1/* Polyhedron disjoint intersections
2 */
3
4/*
5 disjoint_union_adj 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
9
10 output:
11 list of polyhedra (constraint matrices) having their facets in common
12
13*/
14
15#include <stdio.h>
16#include <stdlib.h>
17
18#include <polylib/polylib.h>
19
20#define WS 0
21
22
23/* Procedure to print constraints of a domain */
25{
26 for( ;p;p=p->next)
27 {
29 printf("\n");
30 }
31}
32
33
34int main() {
35
36 int np, i;
37
38 Matrix *a;
39 Polyhedron *A, *tmp, *DD;
40
41 scanf( "%d", &np );
42
43 A = NULL;
44 for( i=0 ; i<np ; i++ )
45 {
46 a = Matrix_Read();
48 Matrix_Free(a);
49 tmp ->next = A;
50 A = tmp;
51 }
52
53
54 DD = Disjoint_Domain( A, 1, WS );
55
57
58 return 0;
59}
60
61
62
void AffContraintes(Polyhedron *p)
#define WS
int main()
Matrix * Matrix_Read(void)
Definition: matrix.c:209
void Matrix_Free(Matrix *Mat)
Definition: matrix.c:71
Polyhedron * Disjoint_Domain(Polyhedron *P, int flag, unsigned NbMaxRays)
Definition: polyhedron.c:4540
void Polyhedron_PrintConstraints(FILE *Dst, const char *Format, Polyhedron *Pol)
Definition: polyhedron.c:4739
Polyhedron * Constraints2Polyhedron(Matrix *Constraints, unsigned NbMaxRays)
Given a matrix of constraints ('Constraints'), construct and return a polyhedron.
Definition: polyhedron.c:1905
Definition: types.h:75
struct polyhedron * next
Definition: types.h:99
#define P_VALUE_FMT
Definition: types.h:39