4 #include <NTL/mat_ZZ.h>
6 #include <polylib/polylibgmp.h>
7 #include "ev_operations.h"
11 #include <barvinok2.h>
14 /* The input of this example program is the same as that of testehrhart
15 * in the PolyLib distribution, i.e., a polytope in combined
16 * data and parameter space, a context polytope in parameter space
17 * and (optionally) the names of the parameters.
18 * Both polytopes are in PolyLib notation.
21 #ifdef HAVE_GROWING_CHERNIKOVA
28 #define getopt_long(a,b,c,d,e) getopt(a,b,c)
31 struct option options
[] = {
32 { "explicit", no_argument
, 0, 'e' },
37 int main(int argc
, char **argv
)
47 while ((c
= getopt_long(argc
, argv
, "e", options
, &ind
)) != -1) {
56 A
= Constraints2Polyhedron(M
, MAXRAYS
);
59 C
= Constraints2Polyhedron(M
, MAXRAYS
);
61 Polyhedron_Print(stdout
, P_VALUE_FMT
, A
);
62 Polyhedron_Print(stdout
, P_VALUE_FMT
, C
);
63 param_name
= Read_ParamNames(stdin
, C
->Dimension
);
64 gf
= barvinok_series(A
, C
, MAXRAYS
);
65 gf
->print(C
->Dimension
, param_name
);
69 print_evalue(stdout
, EP
, param_name
);
71 Free_ParamNames(param_name
, C
->Dimension
);