6 #include <isl_polynomial.h>
15 struct isl_upoly_cst
{
21 struct isl_upoly_rec
{
26 struct isl_upoly
*p
[1];
29 struct isl_qpolynomial
{
34 struct isl_upoly
*upoly
;
49 struct isl_pw_qpolynomial_piece
{
51 struct isl_qpolynomial
*qp
;
54 struct isl_pw_qpolynomial
{
62 struct isl_pw_qpolynomial_piece p
[1];
65 struct isl_qpolynomial_fold
{
74 struct isl_qpolynomial
*qp
[1];
77 struct isl_pw_qpolynomial_fold_piece
{
79 struct isl_qpolynomial_fold
*fold
;
82 struct isl_pw_qpolynomial_fold
{
90 struct isl_pw_qpolynomial_fold_piece p
[1];
93 __isl_give
struct isl_upoly
*isl_upoly_zero(struct isl_ctx
*ctx
);
94 __isl_give
struct isl_upoly
*isl_upoly_copy(__isl_keep
struct isl_upoly
*up
);
95 __isl_give
struct isl_upoly
*isl_upoly_cow(__isl_take
struct isl_upoly
*up
);
96 __isl_give
struct isl_upoly
*isl_upoly_dup(__isl_keep
struct isl_upoly
*up
);
97 void isl_upoly_free(__isl_take
struct isl_upoly
*up
);
98 __isl_give
struct isl_upoly
*isl_upoly_mul(__isl_take
struct isl_upoly
*up1
,
99 __isl_take
struct isl_upoly
*up2
);
101 int isl_upoly_is_cst(__isl_keep
struct isl_upoly
*up
);
102 int isl_upoly_is_zero(__isl_keep
struct isl_upoly
*up
);
103 int isl_upoly_is_one(__isl_keep
struct isl_upoly
*up
);
104 int isl_upoly_is_negone(__isl_keep
struct isl_upoly
*up
);
105 __isl_keep
struct isl_upoly_cst
*isl_upoly_as_cst(__isl_keep
struct isl_upoly
*up
);
106 __isl_keep
struct isl_upoly_rec
*isl_upoly_as_rec(__isl_keep
struct isl_upoly
*up
);
108 __isl_give
struct isl_upoly
*isl_upoly_sum(__isl_take
struct isl_upoly
*up1
,
109 __isl_take
struct isl_upoly
*up2
);
110 __isl_give
struct isl_upoly
*isl_upoly_neg(__isl_take
struct isl_upoly
*up
);
112 __isl_give isl_qpolynomial
*isl_qpolynomial_alloc(__isl_take isl_dim
*dim
,
113 unsigned n_div
, __isl_take
struct isl_upoly
*up
);
114 __isl_give isl_qpolynomial
*isl_qpolynomial_cow(__isl_take isl_qpolynomial
*qp
);
115 __isl_give isl_qpolynomial
*isl_qpolynomial_dup(__isl_keep isl_qpolynomial
*qp
);
117 __isl_give isl_qpolynomial
*isl_qpolynomial_cst(__isl_take isl_dim
*dim
,
119 __isl_give isl_qpolynomial
*isl_qpolynomial_pow(__isl_take isl_dim
*dim
,
121 __isl_give isl_qpolynomial
*isl_qpolynomial_div_pow(__isl_take isl_div
*div
,
123 int isl_qpolynomial_is_one(__isl_keep isl_qpolynomial
*qp
);
124 int isl_qpolynomial_is_affine(__isl_keep isl_qpolynomial
*qp
);
126 int isl_qpolynomial_le_cst(__isl_keep isl_qpolynomial
*qp1
,
127 __isl_keep isl_qpolynomial
*qp2
);
128 __isl_give isl_qpolynomial
*isl_qpolynomial_max_cst(
129 __isl_take isl_qpolynomial
*qp1
, __isl_take isl_qpolynomial
*qp2
);
130 __isl_give isl_qpolynomial
*isl_qpolynomial_min_cst(
131 __isl_take isl_qpolynomial
*qp1
, __isl_take isl_qpolynomial
*qp2
);
133 int isl_qpolynomial_degree(__isl_keep isl_qpolynomial
*poly
);
134 __isl_give isl_qpolynomial
*isl_qpolynomial_coeff(
135 __isl_keep isl_qpolynomial
*poly
,
136 enum isl_dim_type type
, unsigned pos
, int deg
);
138 __isl_give isl_vec
*isl_qpolynomial_extract_affine(
139 __isl_keep isl_qpolynomial
*qp
);
140 __isl_give isl_qpolynomial
*isl_qpolynomial_from_affine(__isl_take isl_dim
*dim
,
141 isl_int
*f
, isl_int denom
);
143 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_cow(
144 __isl_take isl_pw_qpolynomial
*pwqp
);
146 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_add_piece(
147 __isl_take isl_pw_qpolynomial
*pwqp
,
148 __isl_take isl_set
*set
, __isl_take isl_qpolynomial
*qp
);
149 int isl_pw_qpolynomial_is_one(__isl_keep isl_pw_qpolynomial
*pwqp
);
151 __isl_give isl_qpolynomial
*isl_qpolynomial_opt_on_domain(
152 __isl_take isl_qpolynomial
*qp
, __isl_take isl_set
*set
, int max
);
154 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_cow(
155 __isl_take isl_qpolynomial_fold
*fold
);
156 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_dup(
157 __isl_keep isl_qpolynomial_fold
*fold
);
159 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_cow(
160 __isl_take isl_pw_qpolynomial_fold
*pwf
);
162 __isl_give isl_qpolynomial
*isl_qpolynomial_fold_opt_on_domain(
163 __isl_take isl_qpolynomial_fold
*fold
, __isl_take isl_set
*set
, int max
);
165 int isl_pw_qpolynomial_fold_covers(__isl_keep isl_pw_qpolynomial_fold
*pwf1
,
166 __isl_keep isl_pw_qpolynomial_fold
*pwf2
);
168 __isl_give isl_qpolynomial
*isl_qpolynomial_morph(__isl_take isl_qpolynomial
*qp
,
169 __isl_take isl_morph
*morph
);
170 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_morph(
171 __isl_take isl_pw_qpolynomial
*pwqp
, __isl_take isl_morph
*morph
);
172 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_morph(
173 __isl_take isl_qpolynomial_fold
*fold
, __isl_take isl_morph
*morph
);
174 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_morph(
175 __isl_take isl_pw_qpolynomial_fold
*pwf
, __isl_take isl_morph
*morph
);
177 __isl_give isl_qpolynomial
*isl_qpolynomial_lift(__isl_take isl_qpolynomial
*qp
,
178 __isl_take isl_dim
*dim
);
179 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_lift(
180 __isl_take isl_qpolynomial_fold
*fold
, __isl_take isl_dim
*dim
);