3 #include <polylib/polylibgmp.h>
4 #include "ev_operations.h"
8 /* The input of this example program is the same as that of testehrhart
9 * in the PolyLib distribution, i.e., a polytope in combined
10 * data and parameter space, a context polytope in parameter space
11 * and (optionally) the names of the parameters.
12 * Both polytopes are in PolyLib notation.
16 #define getopt_long(a,b,c,d,e) getopt(a,b,c)
19 struct option options
[] = {
20 { "convert", no_argument
, 0, 'c' },
21 { "size", no_argument
, 0, 's' },
26 int main(int argc
, char **argv
)
36 while ((c
= getopt_long(argc
, argv
, "cs", options
, &ind
)) != -1) {
48 A
= Constraints2Polyhedron(M
, 600);
51 C
= Constraints2Polyhedron(M
, 600);
53 Polyhedron_Print(stdout
, P_VALUE_FMT
, A
);
54 Polyhedron_Print(stdout
, P_VALUE_FMT
, C
);
55 param_name
= Read_ParamNames(stdin
, C
->Dimension
);
56 en
= barvinok_enumerate(A
, C
, 600);
57 Enumeration_Print(stdout
, en
, param_name
);
59 printf("\nSize: %d\n", Enumeration_size(en
));
61 Enumeration_mod2table(en
, C
->Dimension
);
62 Enumeration_Print(stdout
, en
, param_name
);
64 printf("\nSize: %d\n", Enumeration_size(en
));
67 Free_ParamNames(param_name
, C
->Dimension
);