1 #include <barvinok/util.h>
2 #include "skewed_genfun.h"
3 #include "verify_series.h"
5 struct check_poly_gf_data
{
6 struct check_poly_data cp
;
8 const skewed_gen_fun
*gf
;
12 static int cp_gf(const struct check_poly_data
*data
, int nparam
, Value
*z
,
13 const struct verify_options
*options
)
17 struct check_poly_gf_data
* gf_data
= (struct check_poly_gf_data
*) data
;
18 const skewed_gen_fun
*gf
= gf_data
->gf
;
19 int exist
= gf_data
->exist
;
20 Polyhedron
*S
= gf_data
->S
;
27 /* Computes the coefficient */
28 gf
->coefficient(z
, &c
, options
->barvinok
);
30 /* Manually count the number of points */
31 count_points_e(1, S
, exist
, nparam
, data
->z
, &tmp
);
33 check_poly_print(value_eq(tmp
, c
), nparam
, z
, tmp
, one
, c
, one
,
34 "EP", "count", "EP eval", options
);
42 int check_poly_gf(Polyhedron
*S
, Polyhedron
*CS
, skewed_gen_fun
*gf
,
43 int exist
, int nparam
, int pos
, Value
*z
,
44 const struct verify_options
*options
)
46 struct check_poly_gf_data data
;
48 data
.cp
.check
= cp_gf
;
52 return check_poly(CS
, &data
.cp
, nparam
, pos
, z
+S
->Dimension
-nparam
+1,