1 #include <barvinok/barvinok.h>
2 #include <barvinok/util.h>
4 #include "omega/convert.h"
11 #ifdef HAVE_GROWING_CHERNIKOVA
12 #define MAXRAYS POL_NO_DUAL
17 evalue
*count_relation(Relation
& r
)
21 Polyhedron
*D
= relation2Domain(r
, vv
, params
);
22 int dim
= r
.is_set() ? r
.n_set() : r
.n_inp() + r
.n_out();
26 for (Polyhedron
*P
= D
; P
; P
= P
->next
, ++d
) {
28 int exist
= P
->Dimension
- params
.size() - dim
;
29 EP
= barvinok_enumerate_e(P
, exist
, params
.size(), MAXRAYS
);
36 evalue
*rank_relation(Relation
& r
)
40 Polyhedron
*D
= relation2Domain(r
, vv
, params
);
41 int dim
= r
.is_set() ? r
.n_set() : r
.n_inp() + r
.n_out();
45 assert(D
->next
== NULL
);
46 Polyhedron
*C
= Universe_Polyhedron(params
.size());
47 EP
= barvinok_lexsmaller_ev(D
, D
, dim
, C
, MAXRAYS
);
54 evalue
*count_lexsmaller(Relation
& r
, Relation
& domain
)
60 Polyhedron
*P
= relation2Domain(r
, P_vv
, P_params
);
61 int P_dim
= r
.is_set() ? r
.n_set() : r
.n_inp() + r
.n_out();
62 Polyhedron
*D
= relation2Domain(domain
, D_vv
, D_params
);
63 int D_dim
= r
.is_set() ? r
.n_set() : r
.n_inp() + r
.n_out();
64 assert(P_dim
== D_dim
);
68 assert(P
->next
== NULL
);
69 assert(D
->next
== NULL
);
70 Polyhedron
*C
= Universe_Polyhedron(D_params
.size());
71 EP
= barvinok_lexsmaller_ev(P
, D
, D_dim
, C
, MAXRAYS
);