3 #include <barvinok/barvinok.h>
4 #include <barvinok/util.h>
6 #include "omega_interface/convert.h"
7 #include "normalization.h"
14 #define ALLOC(t,p) p = (t*)malloc(sizeof(*p))
18 #include "parker/count_solutions.h"
21 * Use parker's method to compute the number of integer points in D.
22 * Since this method assumes all variables are non-negative,
23 * we have to transform the input polytope first.
25 evalue
*barvinok_enumerate_parker(Polyhedron
*D
,
26 unsigned nvar
, unsigned nparam
,
33 fprintf(stderr
, "parker method doesn't support parameters\n");
36 R
= skew_to_positive_orthant(D
, nvar
, MaxRays
);
37 Relation r
= Domain2relation(R
, nvar
, 0, NULL
);
39 double d
= count_solutions(r
);
42 value_set_si(res
->d
, 0);
43 res
->x
.p
= new_enode(::partition
, 2, 0);
44 EVALUE_SET_DOMAIN(res
->x
.p
->arr
[0], Universe_Polyhedron(0));
45 value_set_si(res
->x
.p
->arr
[1].d
, 1);
46 value_init(res
->x
.p
->arr
[1].x
.n
);
47 value_set_double(res
->x
.p
->arr
[1].x
.n
, d
);
53 evalue
*barvinok_enumerate_parker(Polyhedron
*D
,
54 unsigned nvar
, unsigned nparam
,
57 fprintf(stderr
, "support for parker method not compiled in\n");