6 #include <NTL/mat_ZZ.h>
8 #include <polylib/polylibgmp.h>
9 #include <barvinok/evalue.h>
17 struct __short_rat_n
{
18 /* rows: terms in numerator */
19 /* coeff has two columns: the numerator and the denominator */
23 struct __short_rat_d
{
24 /* rows: factors in denominator */
27 void add(short_rat
*rat
);
32 std::vector
< short_rat
* > term
;
35 void add(const ZZ
& cn
, const ZZ
& cd
, const vec_ZZ
& num
,
37 /* add cn/cd times gf */
38 void add(const ZZ
& cn
, const ZZ
& cd
, const gen_fun
*gf
);
39 void substitute(Matrix
*CP
, const mat_ZZ
& map
, const vec_ZZ
& offset
);
40 gen_fun
*Hadamard_product(gen_fun
*gf
, unsigned MaxRays
);
41 void add_union(gen_fun
*gf
, unsigned MaxRays
);
42 void print(unsigned int nparam
, char **param_name
) const;
43 operator evalue
*() const;
44 void coefficient(Value
* params
, Value
* c
) const;
46 gen_fun(const gen_fun
*gf
) {
49 context
= Polyhedron_Copy(gf
->context
);
52 gen_fun(Polyhedron
*C
= NULL
) : context(C
) {}
55 Polyhedron_Free(context
);
56 for (int i
= 0; i
< term
.size(); ++i
)