3 #include <NTL/mat_ZZ.h>
4 #include <barvinok/evalue.h>
5 #include <barvinok/util.h>
6 #include <barvinok/barvinok.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 #ifdef HAVE_GROWING_CHERNIKOVA
23 #define getopt_long(a,b,c,d,e) getopt(a,b,c)
26 struct option options
[] = {
27 { "explicit", no_argument
, 0, 'e' },
28 { "version", no_argument
, 0, 'V' },
33 int main(int argc
, char **argv
)
43 while ((c
= getopt_long(argc
, argv
, "eV", options
, &ind
)) != -1) {
49 printf(barvinok_version());
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(std::cout
, C
->Dimension
, param_name
);
69 print_evalue(stdout
, EP
, param_name
);
72 Free_ParamNames(param_name
, C
->Dimension
);