7 #include <NTL/mat_ZZ.h>
9 #include <polylib/polylibgmp.h>
10 #include <barvinok/evalue.h>
12 #include <barvinok/NTL_QQ.h>
19 struct __short_rat_n
{
20 /* rows: terms in numerator */
21 /* coeff has two columns: the numerator and the denominator */
25 struct __short_rat_d
{
26 /* rows: factors in denominator */
29 void add(short_rat
*rat
);
34 std::vector
< short_rat
* > term
;
37 void add(const QQ
& c
, const vec_ZZ
& num
, const mat_ZZ
& den
);
38 /* add cn/cd times gf */
39 void add(const QQ
& c
, const gen_fun
*gf
);
40 void substitute(Matrix
*CP
, const mat_ZZ
& map
, const vec_ZZ
& offset
);
41 gen_fun
*Hadamard_product(const gen_fun
*gf
, unsigned MaxRays
);
42 void add_union(gen_fun
*gf
, unsigned MaxRays
);
43 void shift(const vec_ZZ
& offset
);
44 void print(std::ostream
& os
, unsigned int nparam
, char **param_name
) const;
45 operator evalue
*() const;
46 void coefficient(Value
* params
, Value
* c
) const;
47 gen_fun
*summate(int nvar
) const;
49 gen_fun(const gen_fun
*gf
) {
51 context
= Polyhedron_Copy(gf
->context
);
54 gen_fun(Polyhedron
*C
= NULL
) : context(C
) {}
57 Polyhedron_Free(context
);
58 for (int i
= 0; i
< term
.size(); ++i
)