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