8 #include <NTL/vec_ZZ.h>
9 #include <barvinok/polylib.h>
10 #include "conversion.h"
19 dpoly(int d
, ZZ
& degree
, int offset
= 0);
20 void operator *= (dpoly
& f
);
21 void div(dpoly
& d
, mpq_t count
, ZZ
& sign
);
22 void div(dpoly
& d
, mpq_t
*count
, const mpq_t
& factor
);
24 mpq_t
*div(dpoly
&d
) const;
25 void clear_div(mpq_t
*c
) const;
29 std::vector
<int> powers
;
33 struct dpoly_r_term_lex_smaller
{
34 bool operator()(const dpoly_r_term
* t1
, const dpoly_r_term
* t2
) const {
35 return t1
->powers
< t2
->powers
;
39 typedef std::set
<dpoly_r_term
*, dpoly_r_term_lex_smaller
> dpoly_r_term_list
;
41 /* len: number of elements in c
42 * each element in c is the coefficient of a power of t
43 * in the MacLaurin expansion
51 void add_term(int i
, const std::vector
<int>& powers
, const ZZ
& coeff
);
52 dpoly_r(int len
, int dim
);
53 dpoly_r(dpoly
& num
, int dim
);
54 dpoly_r(dpoly
& num
, dpoly
& den
, int pos
, int dim
);
55 dpoly_r(dpoly_r
* num
, dpoly
& den
, int pos
, int dim
);
57 dpoly_r
*div(dpoly
& d
);