verify.c: verify_point_data_init: use isl_val
[barvinok.git] / skewed_genfun.h
blobc7147a83c921c59f89dc5a27abc2c2849ac70c09
1 #ifndef SKEWED_GENFUN_H
2 #define SKEWED_GENFUN_H
4 #include <assert.h>
5 #include <barvinok/barvinok.h>
7 struct skewed_gen_fun {
8 gen_fun *gf;
9 /* maps original space to space in which gf is defined */
10 Matrix *T;
11 /* equalities in the original space that need to be satisfied for
12 * gf to be valid
14 Matrix *eq;
15 /* divisibilities in the original space that need to be satisfied for
16 * gf to be valid
18 Matrix *div;
20 skewed_gen_fun(gen_fun *gf, Matrix *T = NULL, Matrix *eq = NULL,
21 Matrix *div = NULL) :
22 gf(gf), T(T), eq(eq), div(div) {}
23 ~skewed_gen_fun() {
24 if (T)
25 Matrix_Free(T);
26 if (eq)
27 Matrix_Free(eq);
28 if (div)
29 Matrix_Free(div);
30 delete gf;
33 void print(std::ostream& os, unsigned int nparam,
34 const char **param_name) const;
35 operator evalue *() const {
36 assert(T == NULL && eq == NULL); /* other cases not supported for now */
37 return *gf;
39 void coefficient(Value* params, Value* c, barvinok_options *options) const;
42 #endif