Special case "infinite" polytopes, i.e., those with
[barvinok.git] / barvinok_enumerate_e.c
blob18c9a0122161c16856ed57538ffe11e448e45db2
1 #include <unistd.h>
2 #include <sys/times.h>
3 #include <polylib/polylibgmp.h>
4 #include "ev_operations.h"
5 #include <util.h>
6 #include <barvinok.h>
8 int main()
10 Polyhedron *A;
11 Matrix *M;
12 char **param_name;
13 int exist, nparam;
14 char s[128];
15 evalue *EP;
17 M = Matrix_Read();
18 A = Constraints2Polyhedron(M, 600);
19 Matrix_Free(M);
21 fgets(s, 128, stdin);
22 while ((*s=='#') || (sscanf(s, "E %d", &exist)<1))
23 fgets(s, 128, stdin);
25 fgets(s, 128, stdin);
26 while ((*s=='#') || (sscanf(s, "P %d", &nparam)<1))
27 fgets(s, 128, stdin);
29 Polyhedron_Print(stdout, P_VALUE_FMT, A);
30 printf("exist: %d, nparam: %d\n", exist, nparam);
31 param_name = Read_ParamNames(stdin, nparam);
32 EP = barvinok_enumerate_e(A, exist, nparam, 600);
33 print_evalue(stdout, EP, param_name);
34 free_evalue_refs(EP);
35 Free_ParamNames(param_name, nparam);
36 Polyhedron_Free(A);
37 return 0;