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
)
16 struct check_poly_gf_data
* gf_data
= (struct check_poly_gf_data
*) data
;
17 const skewed_gen_fun
*gf
= gf_data
->gf
;
18 int exist
= gf_data
->exist
;
19 Polyhedron
*S
= gf_data
->S
;
26 /* Computes the coefficient */
27 gf
->coefficient(z
, &c
, options
->barvinok
);
29 /* Manually count the number of points */
30 count_points_e(1, S
, exist
, nparam
, data
->z
, &tmp
);
32 check_poly_print(value_eq(tmp
, c
), nparam
, z
, tmp
, one
, c
, one
,
33 "EP", "count", "EP eval", options
);
41 int check_poly_gf(Polyhedron
*S
, Polyhedron
*CS
, skewed_gen_fun
*gf
,
42 int exist
, int nparam
, int pos
, Value
*z
,
43 const struct verify_options
*options
)
45 struct check_poly_gf_data data
;
47 data
.cp
.check
= cp_gf
;
51 return check_poly(CS
, &data
.cp
, nparam
, pos
, z
+S
->Dimension
-nparam
+1,