tests/iscc/count/andreas: mention contributor
[barvinok.git] / skewed_genfun.h
blob3e04dd1e12a686c0b3cad96a74ba8741a2907b71
1 #ifndef SKEWED_GENFUN_H
2 #define SKEWED_GENFUN_H
4 #include <assert.h>
5 #include <barvinok/genfun.h>
6 #include <barvinok/options.h>
8 struct skewed_gen_fun {
9 gen_fun *gf;
10 /* maps original space to space in which gf is defined */
11 Matrix *T;
12 /* equalities in the original space that need to be satisfied for
13 * gf to be valid
15 Matrix *eq;
16 /* divisibilities in the original space that need to be satisfied for
17 * gf to be valid
19 Matrix *div;
21 skewed_gen_fun(gen_fun *gf, Matrix *T = NULL, Matrix *eq = NULL,
22 Matrix *div = NULL) :
23 gf(gf), T(T), eq(eq), div(div) {}
24 ~skewed_gen_fun() {
25 if (T)
26 Matrix_Free(T);
27 if (eq)
28 Matrix_Free(eq);
29 if (div)
30 Matrix_Free(div);
31 delete gf;
34 void print(std::ostream& os, unsigned int nparam,
35 const char **param_name) const;
36 operator evalue *() const {
37 assert(T == NULL && eq == NULL); /* other cases not supported for now */
38 return *gf;
40 void coefficient(Value* params, Value* c, barvinok_options *options) const;
43 #endif