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' },
32 { "version", no_argument
, 0, 'V' },
37 int main(int argc
, char **argv
)
47 while ((c
= getopt_long(argc
, argv
, "eV", options
, &ind
)) != -1) {
53 printf(barvinok_version());
60 A
= Constraints2Polyhedron(M
, MAXRAYS
);
63 C
= Constraints2Polyhedron(M
, MAXRAYS
);
65 Polyhedron_Print(stdout
, P_VALUE_FMT
, A
);
66 Polyhedron_Print(stdout
, P_VALUE_FMT
, C
);
67 param_name
= Read_ParamNames(stdin
, C
->Dimension
);
68 gf
= barvinok_series(A
, C
, MAXRAYS
);
69 gf
->print(C
->Dimension
, param_name
);
73 print_evalue(stdout
, EP
, param_name
);
76 Free_ParamNames(param_name
, C
->Dimension
);