7 #include <NTL/mat_ZZ.h>
9 #include <polylib/polylibgmp.h>
10 #include <barvinok/evalue.h>
12 #include <barvinok/NTL_QQ.h>
13 #include <barvinok/options.h>
20 struct __short_rat_n
{
21 /* rows: terms in numerator */
22 /* coeff has two columns: the numerator and the denominator */
26 struct __short_rat_d
{
27 /* rows: factors in denominator */
30 void add(short_rat
*rat
);
35 std::vector
< short_rat
* > term
;
38 void add(const QQ
& c
, const vec_ZZ
& num
, const mat_ZZ
& den
);
40 void add(const QQ
& c
, const gen_fun
*gf
);
41 void substitute(Matrix
*CP
);
42 gen_fun
*Hadamard_product(const gen_fun
*gf
, barvinok_options
*options
);
43 void add_union(gen_fun
*gf
, barvinok_options
*options
);
44 void shift(const vec_ZZ
& offset
);
45 void divide(const vec_ZZ
& power
);
46 void print(std::ostream
& os
, unsigned int nparam
, char **param_name
) const;
47 operator evalue
*() const;
48 void coefficient(Value
* params
, Value
* c
) const;
49 gen_fun
*summate(int nvar
, barvinok_options
*options
) const;
50 bool summate(Value
*sum
) const;
52 gen_fun(const gen_fun
*gf
) {
54 context
= Polyhedron_Copy(gf
->context
);
58 gen_fun(Polyhedron
*C
= NULL
) : context(C
) {}
61 Polyhedron_Free(context
);
62 for (int i
= 0; i
< term
.size(); ++i
)