3 #include <NTL/mat_ZZ.h>
5 #include <polylib/polylibgmp.h>
6 #include <barvinok/evalue.h>
8 #include <barvinok/util.h>
9 #include <barvinok/barvinok.h>
12 /* The input of this example program is the same as that of testehrhart
13 * in the PolyLib distribution, i.e., a polytope in combined
14 * data and parameter space, a context polytope in parameter space
15 * and (optionally) the names of the parameters.
16 * Both polytopes are in PolyLib notation.
19 #ifdef HAVE_GROWING_CHERNIKOVA
26 #define getopt_long(a,b,c,d,e) getopt(a,b,c)
29 struct option options
[] = {
30 { "explicit", no_argument
, 0, 'e' },
31 { "version", no_argument
, 0, 'V' },
36 int main(int argc
, char **argv
)
46 while ((c
= getopt_long(argc
, argv
, "eV", options
, &ind
)) != -1) {
52 printf(barvinok_version());
59 A
= Constraints2Polyhedron(M
, MAXRAYS
);
62 C
= Constraints2Polyhedron(M
, MAXRAYS
);
64 Polyhedron_Print(stdout
, P_VALUE_FMT
, A
);
65 Polyhedron_Print(stdout
, P_VALUE_FMT
, C
);
66 param_name
= Read_ParamNames(stdin
, C
->Dimension
);
67 gf
= barvinok_series(A
, C
, MAXRAYS
);
68 gf
->print(C
->Dimension
, param_name
);
72 print_evalue(stdout
, EP
, param_name
);
75 Free_ParamNames(param_name
, C
->Dimension
);