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