1 #ifndef ISL_POLYNOMIAL_H
2 #define ISL_POLYNOMIAL_H
5 #include <isl/constraint.h>
8 #include <isl/set_type.h>
10 #include <isl/printer.h>
11 #include <isl/union_set.h>
12 #include <isl/aff_type.h>
14 #if defined(__cplusplus)
18 struct isl_qpolynomial
;
19 typedef struct isl_qpolynomial isl_qpolynomial
;
21 isl_ctx
*isl_qpolynomial_get_ctx(__isl_keep isl_qpolynomial
*qp
);
22 __isl_give isl_dim
*isl_qpolynomial_get_dim(__isl_keep isl_qpolynomial
*qp
);
23 __isl_give isl_qpolynomial
*isl_qpolynomial_reset_dim(
24 __isl_take isl_qpolynomial
*qp
, __isl_take isl_dim
*dim
);
25 unsigned isl_qpolynomial_dim(__isl_keep isl_qpolynomial
*qp
,
26 enum isl_dim_type type
);
27 int isl_qpolynomial_involves_dims(__isl_keep isl_qpolynomial
*qp
,
28 enum isl_dim_type type
, unsigned first
, unsigned n
);
30 __isl_give isl_qpolynomial
*isl_qpolynomial_set_dim_name(
31 __isl_take isl_qpolynomial
*qp
,
32 enum isl_dim_type type
, unsigned pos
, const char *s
);
34 __isl_give isl_qpolynomial
*isl_qpolynomial_zero(__isl_take isl_dim
*dim
);
35 __isl_give isl_qpolynomial
*isl_qpolynomial_one(__isl_take isl_dim
*dim
);
36 __isl_give isl_qpolynomial
*isl_qpolynomial_infty(__isl_take isl_dim
*dim
);
37 __isl_give isl_qpolynomial
*isl_qpolynomial_neginfty(__isl_take isl_dim
*dim
);
38 __isl_give isl_qpolynomial
*isl_qpolynomial_nan(__isl_take isl_dim
*dim
);
39 __isl_give isl_qpolynomial
*isl_qpolynomial_rat_cst(__isl_take isl_dim
*dim
,
40 const isl_int n
, const isl_int d
);
41 __isl_give isl_qpolynomial
*isl_qpolynomial_div(__isl_take isl_div
*div
);
42 __isl_give isl_qpolynomial
*isl_qpolynomial_var(__isl_take isl_dim
*dim
,
43 enum isl_dim_type type
, unsigned pos
);
44 __isl_give isl_qpolynomial
*isl_qpolynomial_copy(__isl_keep isl_qpolynomial
*qp
);
45 void isl_qpolynomial_free(__isl_take isl_qpolynomial
*qp
);
47 int isl_qpolynomial_plain_is_equal(__isl_keep isl_qpolynomial
*qp1
,
48 __isl_keep isl_qpolynomial
*qp2
);
49 int isl_qpolynomial_is_zero(__isl_keep isl_qpolynomial
*qp
);
50 int isl_qpolynomial_is_nan(__isl_keep isl_qpolynomial
*qp
);
51 int isl_qpolynomial_is_infty(__isl_keep isl_qpolynomial
*qp
);
52 int isl_qpolynomial_is_neginfty(__isl_keep isl_qpolynomial
*qp
);
53 int isl_qpolynomial_sgn(__isl_keep isl_qpolynomial
*qp
);
54 int isl_qpolynomial_is_cst(__isl_keep isl_qpolynomial
*qp
,
55 isl_int
*n
, isl_int
*d
);
56 void isl_qpolynomial_get_den(__isl_keep isl_qpolynomial
*qp
, isl_int
*d
);
58 __isl_give isl_qpolynomial
*isl_qpolynomial_neg(__isl_take isl_qpolynomial
*qp
);
59 __isl_give isl_qpolynomial
*isl_qpolynomial_add(__isl_take isl_qpolynomial
*qp1
,
60 __isl_take isl_qpolynomial
*qp2
);
61 __isl_give isl_qpolynomial
*isl_qpolynomial_sub(__isl_take isl_qpolynomial
*qp1
,
62 __isl_take isl_qpolynomial
*qp2
);
63 __isl_give isl_qpolynomial
*isl_qpolynomial_mul(__isl_take isl_qpolynomial
*qp1
,
64 __isl_take isl_qpolynomial
*qp2
);
65 __isl_give isl_qpolynomial
*isl_qpolynomial_pow(__isl_take isl_qpolynomial
*qp
,
67 __isl_give isl_qpolynomial
*isl_qpolynomial_add_isl_int(
68 __isl_take isl_qpolynomial
*qp
, isl_int v
);
69 __isl_give isl_qpolynomial
*isl_qpolynomial_mul_isl_int(
70 __isl_take isl_qpolynomial
*qp
, isl_int v
);
71 __isl_give isl_qpolynomial
*isl_qpolynomial_scale(
72 __isl_take isl_qpolynomial
*qp
, isl_int v
);
74 __isl_give isl_qpolynomial
*isl_qpolynomial_insert_dims(
75 __isl_take isl_qpolynomial
*qp
, enum isl_dim_type type
,
76 unsigned first
, unsigned n
);
77 __isl_give isl_qpolynomial
*isl_qpolynomial_add_dims(
78 __isl_take isl_qpolynomial
*qp
, enum isl_dim_type type
, unsigned n
);
79 __isl_give isl_qpolynomial
*isl_qpolynomial_move_dims(
80 __isl_take isl_qpolynomial
*qp
,
81 enum isl_dim_type dst_type
, unsigned dst_pos
,
82 enum isl_dim_type src_type
, unsigned src_pos
, unsigned n
);
83 __isl_give isl_qpolynomial
*isl_qpolynomial_drop_dims(
84 __isl_take isl_qpolynomial
*qp
,
85 enum isl_dim_type type
, unsigned first
, unsigned n
);
87 __isl_give isl_qpolynomial
*isl_qpolynomial_substitute(
88 __isl_take isl_qpolynomial
*qp
,
89 enum isl_dim_type type
, unsigned first
, unsigned n
,
90 __isl_keep isl_qpolynomial
**subs
);
92 int isl_qpolynomial_as_polynomial_on_domain(__isl_keep isl_qpolynomial
*qp
,
93 __isl_keep isl_basic_set
*bset
,
94 int (*fn
)(__isl_take isl_basic_set
*bset
,
95 __isl_take isl_qpolynomial
*poly
, void *user
), void *user
);
97 __isl_give isl_qpolynomial
*isl_qpolynomial_homogenize(
98 __isl_take isl_qpolynomial
*poly
);
100 __isl_give isl_qpolynomial
*isl_qpolynomial_align_params(
101 __isl_take isl_qpolynomial
*qp
, __isl_take isl_dim
*model
);
104 typedef struct isl_term isl_term
;
106 isl_ctx
*isl_term_get_ctx(__isl_keep isl_term
*term
);
108 __isl_give isl_term
*isl_term_copy(__isl_keep isl_term
*term
);
109 void isl_term_free(__isl_take isl_term
*term
);
111 unsigned isl_term_dim(__isl_keep isl_term
*term
, enum isl_dim_type type
);
112 void isl_term_get_num(__isl_keep isl_term
*term
, isl_int
*n
);
113 void isl_term_get_den(__isl_keep isl_term
*term
, isl_int
*d
);
114 int isl_term_get_exp(__isl_keep isl_term
*term
,
115 enum isl_dim_type type
, unsigned pos
);
116 __isl_give isl_div
*isl_term_get_div(__isl_keep isl_term
*term
, unsigned pos
);
118 int isl_qpolynomial_foreach_term(__isl_keep isl_qpolynomial
*qp
,
119 int (*fn
)(__isl_take isl_term
*term
, void *user
), void *user
);
121 __isl_give isl_qpolynomial
*isl_qpolynomial_eval(
122 __isl_take isl_qpolynomial
*qp
, __isl_take isl_point
*pnt
);
124 __isl_give isl_qpolynomial
*isl_qpolynomial_gist(
125 __isl_take isl_qpolynomial
*qp
, __isl_take isl_set
*context
);
127 __isl_give isl_qpolynomial
*isl_qpolynomial_from_constraint(
128 __isl_take isl_constraint
*c
, enum isl_dim_type type
, unsigned pos
);
129 __isl_give isl_qpolynomial
*isl_qpolynomial_from_term(__isl_take isl_term
*term
);
130 __isl_give isl_qpolynomial
*isl_qpolynomial_from_aff(__isl_take isl_aff
*aff
);
131 __isl_give isl_basic_map
*isl_basic_map_from_qpolynomial(
132 __isl_take isl_qpolynomial
*qp
);
134 __isl_give isl_printer
*isl_printer_print_qpolynomial(
135 __isl_take isl_printer
*p
, __isl_keep isl_qpolynomial
*qp
);
136 void isl_qpolynomial_print(__isl_keep isl_qpolynomial
*qp
, FILE *out
,
137 unsigned output_format
);
138 void isl_qpolynomial_dump(__isl_keep isl_qpolynomial
*qp
);
140 struct isl_pw_qpolynomial
;
141 typedef struct isl_pw_qpolynomial isl_pw_qpolynomial
;
143 isl_ctx
*isl_pw_qpolynomial_get_ctx(__isl_keep isl_pw_qpolynomial
*pwqp
);
145 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_zero(__isl_take isl_dim
*dim
);
146 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_alloc(__isl_take isl_set
*set
,
147 __isl_take isl_qpolynomial
*qp
);
148 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_from_qpolynomial(
149 __isl_take isl_qpolynomial
*qp
);
150 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_copy(
151 __isl_keep isl_pw_qpolynomial
*pwqp
);
152 void *isl_pw_qpolynomial_free(__isl_take isl_pw_qpolynomial
*pwqp
);
154 int isl_pw_qpolynomial_is_zero(__isl_keep isl_pw_qpolynomial
*pwqp
);
156 __isl_give isl_dim
*isl_pw_qpolynomial_get_dim(
157 __isl_keep isl_pw_qpolynomial
*pwqp
);
158 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_reset_dim(
159 __isl_take isl_pw_qpolynomial
*pwqp
, __isl_take isl_dim
*dim
);
160 unsigned isl_pw_qpolynomial_dim(__isl_keep isl_pw_qpolynomial
*pwqp
,
161 enum isl_dim_type type
);
162 int isl_pw_qpolynomial_involves_dims(__isl_keep isl_pw_qpolynomial
*pwqp
,
163 enum isl_dim_type type
, unsigned first
, unsigned n
);
164 int isl_pw_qpolynomial_has_equal_dim(__isl_keep isl_pw_qpolynomial
*pwqp1
,
165 __isl_keep isl_pw_qpolynomial
*pwqp2
);
167 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_set_dim_name(
168 __isl_take isl_pw_qpolynomial
*pwqp
,
169 enum isl_dim_type type
, unsigned pos
, const char *s
);
171 __isl_give isl_set
*isl_pw_qpolynomial_domain(__isl_take isl_pw_qpolynomial
*pwqp
);
172 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_intersect_domain(
173 __isl_take isl_pw_qpolynomial
*pwpq
, __isl_take isl_set
*set
);
175 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_drop_dims(
176 __isl_take isl_pw_qpolynomial
*pwqp
,
177 enum isl_dim_type type
, unsigned first
, unsigned n
);
178 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_split_dims(
179 __isl_take isl_pw_qpolynomial
*pwqp
,
180 enum isl_dim_type type
, unsigned first
, unsigned n
);
182 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_add(
183 __isl_take isl_pw_qpolynomial
*pwqp1
,
184 __isl_take isl_pw_qpolynomial
*pwqp2
);
185 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_sub(
186 __isl_take isl_pw_qpolynomial
*pwqp1
,
187 __isl_take isl_pw_qpolynomial
*pwqp2
);
188 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_add_disjoint(
189 __isl_take isl_pw_qpolynomial
*pwqp1
,
190 __isl_take isl_pw_qpolynomial
*pwqp2
);
191 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_neg(
192 __isl_take isl_pw_qpolynomial
*pwqp
);
193 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_mul(
194 __isl_take isl_pw_qpolynomial
*pwqp1
,
195 __isl_take isl_pw_qpolynomial
*pwqp2
);
196 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_mul_isl_int(
197 __isl_take isl_pw_qpolynomial
*pwqp
, isl_int v
);
198 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_pow(
199 __isl_take isl_pw_qpolynomial
*pwqp
, unsigned exponent
);
201 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_insert_dims(
202 __isl_take isl_pw_qpolynomial
*pwqp
, enum isl_dim_type type
,
203 unsigned first
, unsigned n
);
204 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_add_dims(
205 __isl_take isl_pw_qpolynomial
*pwqp
,
206 enum isl_dim_type type
, unsigned n
);
207 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_move_dims(
208 __isl_take isl_pw_qpolynomial
*pwqp
,
209 enum isl_dim_type dst_type
, unsigned dst_pos
,
210 enum isl_dim_type src_type
, unsigned src_pos
, unsigned n
);
212 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_fix_dim(
213 __isl_take isl_pw_qpolynomial
*pwqp
,
214 enum isl_dim_type type
, unsigned n
, isl_int v
);
216 __isl_give isl_qpolynomial
*isl_pw_qpolynomial_eval(
217 __isl_take isl_pw_qpolynomial
*pwqp
, __isl_take isl_point
*pnt
);
219 __isl_give isl_qpolynomial
*isl_pw_qpolynomial_max(
220 __isl_take isl_pw_qpolynomial
*pwqp
);
221 __isl_give isl_qpolynomial
*isl_pw_qpolynomial_min(
222 __isl_take isl_pw_qpolynomial
*pwqp
);
224 int isl_pw_qpolynomial_foreach_piece(__isl_keep isl_pw_qpolynomial
*pwqp
,
225 int (*fn
)(__isl_take isl_set
*set
, __isl_take isl_qpolynomial
*qp
,
226 void *user
), void *user
);
227 int isl_pw_qpolynomial_foreach_lifted_piece(__isl_keep isl_pw_qpolynomial
*pwqp
,
228 int (*fn
)(__isl_take isl_set
*set
, __isl_take isl_qpolynomial
*qp
,
229 void *user
), void *user
);
231 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_from_pw_aff(
232 __isl_take isl_pw_aff
*pwaff
);
234 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_read_from_str(isl_ctx
*ctx
,
236 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_read_from_file(isl_ctx
*ctx
,
238 __isl_give isl_printer
*isl_printer_print_pw_qpolynomial(
239 __isl_take isl_printer
*p
, __isl_keep isl_pw_qpolynomial
*pwqp
);
240 void isl_pw_qpolynomial_print(__isl_keep isl_pw_qpolynomial
*pwqp
, FILE *out
,
241 unsigned output_format
);
242 void isl_pw_qpolynomial_dump(__isl_keep isl_pw_qpolynomial
*pwqp
);
244 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_coalesce(
245 __isl_take isl_pw_qpolynomial
*pwqp
);
246 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_gist(
247 __isl_take isl_pw_qpolynomial
*pwqp
, __isl_take isl_set
*context
);
249 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_split_periods(
250 __isl_take isl_pw_qpolynomial
*pwqp
, int max_periods
);
252 __isl_give isl_pw_qpolynomial
*isl_basic_set_multiplicative_call(
253 __isl_take isl_basic_set
*bset
,
254 __isl_give isl_pw_qpolynomial
*(*fn
)(__isl_take isl_basic_set
*bset
));
262 struct isl_qpolynomial_fold
;
263 typedef struct isl_qpolynomial_fold isl_qpolynomial_fold
;
265 isl_ctx
*isl_qpolynomial_fold_get_ctx(__isl_keep isl_qpolynomial_fold
*fold
);
266 enum isl_fold
isl_qpolynomial_fold_get_type(__isl_keep isl_qpolynomial_fold
*fold
);
268 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_empty(enum isl_fold type
,
269 __isl_take isl_dim
*dim
);
270 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_alloc(
271 enum isl_fold type
, __isl_take isl_qpolynomial
*qp
);
272 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_copy(
273 __isl_keep isl_qpolynomial_fold
*fold
);
274 void isl_qpolynomial_fold_free(__isl_take isl_qpolynomial_fold
*fold
);
276 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_reset_dim(
277 __isl_take isl_qpolynomial_fold
*fold
, __isl_take isl_dim
*dim
);
279 int isl_qpolynomial_fold_is_empty(__isl_keep isl_qpolynomial_fold
*fold
);
280 int isl_qpolynomial_fold_plain_is_equal(__isl_keep isl_qpolynomial_fold
*fold1
,
281 __isl_keep isl_qpolynomial_fold
*fold2
);
283 __isl_give isl_dim
*isl_qpolynomial_fold_get_dim(
284 __isl_keep isl_qpolynomial_fold
*fold
);
286 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_fold(
287 __isl_take isl_qpolynomial_fold
*fold1
,
288 __isl_take isl_qpolynomial_fold
*fold2
);
290 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_mul_isl_int(
291 __isl_take isl_qpolynomial_fold
*fold
, isl_int v
);
292 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_scale(
293 __isl_take isl_qpolynomial_fold
*fold
, isl_int v
);
295 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_move_dims(
296 __isl_take isl_qpolynomial_fold
*fold
,
297 enum isl_dim_type dst_type
, unsigned dst_pos
,
298 enum isl_dim_type src_type
, unsigned src_pos
, unsigned n
);
300 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_substitute(
301 __isl_take isl_qpolynomial_fold
*fold
,
302 enum isl_dim_type type
, unsigned first
, unsigned n
,
303 __isl_keep isl_qpolynomial
**subs
);
305 __isl_give isl_qpolynomial
*isl_qpolynomial_fold_eval(
306 __isl_take isl_qpolynomial_fold
*fold
, __isl_take isl_point
*pnt
);
308 int isl_qpolynomial_fold_foreach_qpolynomial(
309 __isl_keep isl_qpolynomial_fold
*fold
,
310 int (*fn
)(__isl_take isl_qpolynomial
*qp
, void *user
), void *user
);
312 __isl_give isl_printer
*isl_printer_print_qpolynomial_fold(
313 __isl_take isl_printer
*p
, __isl_keep isl_qpolynomial_fold
*fold
);
314 void isl_qpolynomial_fold_print(__isl_keep isl_qpolynomial_fold
*fold
, FILE *out
,
315 unsigned output_format
);
316 void isl_qpolynomial_fold_dump(__isl_keep isl_qpolynomial_fold
*fold
);
318 struct isl_pw_qpolynomial_fold
;
319 typedef struct isl_pw_qpolynomial_fold isl_pw_qpolynomial_fold
;
321 isl_ctx
*isl_pw_qpolynomial_fold_get_ctx(__isl_keep isl_pw_qpolynomial_fold
*pwf
);
323 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_from_pw_qpolynomial(
324 enum isl_fold type
, __isl_take isl_pw_qpolynomial
*pwqp
);
326 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_alloc(
328 __isl_take isl_set
*set
, __isl_take isl_qpolynomial_fold
*fold
);
329 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_copy(
330 __isl_keep isl_pw_qpolynomial_fold
*pwf
);
331 void *isl_pw_qpolynomial_fold_free(__isl_take isl_pw_qpolynomial_fold
*pwf
);
333 int isl_pw_qpolynomial_fold_is_zero(__isl_keep isl_pw_qpolynomial_fold
*pwf
);
335 __isl_give isl_dim
*isl_pw_qpolynomial_fold_get_dim(
336 __isl_keep isl_pw_qpolynomial_fold
*pwf
);
337 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_reset_dim(
338 __isl_take isl_pw_qpolynomial_fold
*pwf
, __isl_take isl_dim
*dim
);
339 unsigned isl_pw_qpolynomial_fold_dim(__isl_keep isl_pw_qpolynomial_fold
*pwf
,
340 enum isl_dim_type type
);
341 int isl_pw_qpolynomial_fold_has_equal_dim(
342 __isl_keep isl_pw_qpolynomial_fold
*pwf1
,
343 __isl_keep isl_pw_qpolynomial_fold
*pwf2
);
345 size_t isl_pw_qpolynomial_fold_size(__isl_keep isl_pw_qpolynomial_fold
*pwf
);
347 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_zero(
348 __isl_take isl_dim
*dim
, enum isl_fold type
);
350 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_set_dim_name(
351 __isl_take isl_pw_qpolynomial_fold
*pwf
,
352 enum isl_dim_type type
, unsigned pos
, const char *s
);
354 __isl_give isl_set
*isl_pw_qpolynomial_fold_domain(
355 __isl_take isl_pw_qpolynomial_fold
*pwf
);
356 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_intersect_domain(
357 __isl_take isl_pw_qpolynomial_fold
*pwf
, __isl_take isl_set
*set
);
359 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_add(
360 __isl_take isl_pw_qpolynomial_fold
*pwf1
,
361 __isl_take isl_pw_qpolynomial_fold
*pwf2
);
362 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_fold(
363 __isl_take isl_pw_qpolynomial_fold
*pwf1
,
364 __isl_take isl_pw_qpolynomial_fold
*pwf2
);
365 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_add_disjoint(
366 __isl_take isl_pw_qpolynomial_fold
*pwf1
,
367 __isl_take isl_pw_qpolynomial_fold
*pwf2
);
368 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_mul_isl_int(
369 __isl_take isl_pw_qpolynomial_fold
*pwf
, isl_int v
);
371 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_drop_dims(
372 __isl_take isl_pw_qpolynomial_fold
*pwf
,
373 enum isl_dim_type type
, unsigned first
, unsigned n
);
374 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_move_dims(
375 __isl_take isl_pw_qpolynomial_fold
*pwf
,
376 enum isl_dim_type dst_type
, unsigned dst_pos
,
377 enum isl_dim_type src_type
, unsigned src_pos
, unsigned n
);
379 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_fix_dim(
380 __isl_take isl_pw_qpolynomial_fold
*pwf
,
381 enum isl_dim_type type
, unsigned n
, isl_int v
);
383 __isl_give isl_qpolynomial
*isl_pw_qpolynomial_fold_eval(
384 __isl_take isl_pw_qpolynomial_fold
*pwf
, __isl_take isl_point
*pnt
);
386 int isl_pw_qpolynomial_fold_foreach_piece(
387 __isl_keep isl_pw_qpolynomial_fold
*pwf
,
388 int (*fn
)(__isl_take isl_set
*set
, __isl_take isl_qpolynomial_fold
*fold
,
389 void *user
), void *user
);
390 int isl_pw_qpolynomial_fold_foreach_lifted_piece(
391 __isl_keep isl_pw_qpolynomial_fold
*pwf
,
392 int (*fn
)(__isl_take isl_set
*set
, __isl_take isl_qpolynomial_fold
*fold
,
393 void *user
), void *user
);
395 __isl_give isl_printer
*isl_printer_print_pw_qpolynomial_fold(
396 __isl_take isl_printer
*p
, __isl_keep isl_pw_qpolynomial_fold
*pwf
);
397 void isl_pw_qpolynomial_fold_print(__isl_keep isl_pw_qpolynomial_fold
*pwf
,
398 FILE *out
, unsigned output_format
);
399 void isl_pw_qpolynomial_fold_dump(__isl_keep isl_pw_qpolynomial_fold
*pwf
);
401 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_coalesce(
402 __isl_take isl_pw_qpolynomial_fold
*pwf
);
403 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_gist(
404 __isl_take isl_pw_qpolynomial_fold
*pwf
, __isl_take isl_set
*context
);
406 __isl_give isl_qpolynomial
*isl_pw_qpolynomial_fold_max(
407 __isl_take isl_pw_qpolynomial_fold
*pwf
);
408 __isl_give isl_qpolynomial
*isl_pw_qpolynomial_fold_min(
409 __isl_take isl_pw_qpolynomial_fold
*pwf
);
411 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_bound(
412 __isl_take isl_pw_qpolynomial
*pwqp
, enum isl_fold type
, int *tight
);
413 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_bound(
414 __isl_take isl_pw_qpolynomial_fold
*pwf
, int *tight
);
415 __isl_give isl_pw_qpolynomial_fold
*isl_set_apply_pw_qpolynomial_fold(
416 __isl_take isl_set
*set
, __isl_take isl_pw_qpolynomial_fold
*pwf
,
418 __isl_give isl_pw_qpolynomial_fold
*isl_map_apply_pw_qpolynomial_fold(
419 __isl_take isl_map
*map
, __isl_take isl_pw_qpolynomial_fold
*pwf
,
422 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_to_polynomial(
423 __isl_take isl_pw_qpolynomial
*pwqp
, int sign
);
425 struct isl_union_pw_qpolynomial
;
426 typedef struct isl_union_pw_qpolynomial isl_union_pw_qpolynomial
;
428 isl_ctx
*isl_union_pw_qpolynomial_get_ctx(
429 __isl_keep isl_union_pw_qpolynomial
*upwqp
);
431 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_from_pw_qpolynomial(__isl_take isl_pw_qpolynomial
*pwqp
);
432 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_zero(
433 __isl_take isl_dim
*dim
);
434 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_add_pw_qpolynomial(
435 __isl_take isl_union_pw_qpolynomial
*upwqp
,
436 __isl_take isl_pw_qpolynomial
*pwqp
);
437 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_copy(
438 __isl_keep isl_union_pw_qpolynomial
*upwqp
);
439 void isl_union_pw_qpolynomial_free(__isl_take isl_union_pw_qpolynomial
*upwqp
);
441 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_add(
442 __isl_take isl_union_pw_qpolynomial
*upwqp1
,
443 __isl_take isl_union_pw_qpolynomial
*upwqp2
);
444 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_sub(
445 __isl_take isl_union_pw_qpolynomial
*upwqp1
,
446 __isl_take isl_union_pw_qpolynomial
*upwqp2
);
447 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_mul(
448 __isl_take isl_union_pw_qpolynomial
*upwqp1
,
449 __isl_take isl_union_pw_qpolynomial
*upwqp2
);
450 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_mul_isl_int(
451 __isl_take isl_union_pw_qpolynomial
*upwqp
, isl_int v
);
453 __isl_give isl_union_set
*isl_union_pw_qpolynomial_domain(
454 __isl_take isl_union_pw_qpolynomial
*upwqp
);
455 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_intersect_domain(
456 __isl_take isl_union_pw_qpolynomial
*upwpq
,
457 __isl_take isl_union_set
*uset
);
459 __isl_give isl_dim
*isl_union_pw_qpolynomial_get_dim(
460 __isl_keep isl_union_pw_qpolynomial
*upwqp
);
462 __isl_give isl_qpolynomial
*isl_union_pw_qpolynomial_eval(
463 __isl_take isl_union_pw_qpolynomial
*upwqp
, __isl_take isl_point
*pnt
);
465 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_coalesce(
466 __isl_take isl_union_pw_qpolynomial
*upwqp
);
467 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_gist(
468 __isl_take isl_union_pw_qpolynomial
*upwqp
,
469 __isl_take isl_union_set
*context
);
471 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_align_params(
472 __isl_take isl_union_pw_qpolynomial
*upwqp
,
473 __isl_take isl_dim
*model
);
475 int isl_union_pw_qpolynomial_foreach_pw_qpolynomial(
476 __isl_keep isl_union_pw_qpolynomial
*upwqp
,
477 int (*fn
)(__isl_take isl_pw_qpolynomial
*pwqp
, void *user
), void *user
);
478 __isl_give isl_pw_qpolynomial
*isl_union_pw_qpolynomial_extract_pw_qpolynomial(
479 __isl_keep isl_union_pw_qpolynomial
*upwqp
, __isl_take isl_dim
*dim
);
481 __isl_give isl_printer
*isl_printer_print_union_pw_qpolynomial(
482 __isl_take isl_printer
*p
, __isl_keep isl_union_pw_qpolynomial
*upwqp
);
484 struct isl_union_pw_qpolynomial_fold
;
485 typedef struct isl_union_pw_qpolynomial_fold isl_union_pw_qpolynomial_fold
;
487 isl_ctx
*isl_union_pw_qpolynomial_fold_get_ctx(
488 __isl_keep isl_union_pw_qpolynomial_fold
*upwf
);
490 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_from_pw_qpolynomial_fold(__isl_take isl_pw_qpolynomial_fold
*pwf
);
491 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_zero(
492 __isl_take isl_dim
*dim
, enum isl_fold type
);
493 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_fold_pw_qpolynomial_fold(
494 __isl_take isl_union_pw_qpolynomial_fold
*upwqp
,
495 __isl_take isl_pw_qpolynomial_fold
*pwqp
);
496 void isl_union_pw_qpolynomial_fold_free(
497 __isl_take isl_union_pw_qpolynomial_fold
*upwf
);
498 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_copy(
499 __isl_keep isl_union_pw_qpolynomial_fold
*upwf
);
501 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_fold(
502 __isl_take isl_union_pw_qpolynomial_fold
*upwf1
,
503 __isl_take isl_union_pw_qpolynomial_fold
*upwf2
);
504 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_add_union_pw_qpolynomial(
505 __isl_take isl_union_pw_qpolynomial_fold
*upwf
,
506 __isl_take isl_union_pw_qpolynomial
*upwqp
);
507 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_mul_isl_int(
508 __isl_take isl_union_pw_qpolynomial_fold
*upwf
, isl_int v
);
510 __isl_give isl_union_set
*isl_union_pw_qpolynomial_fold_domain(
511 __isl_take isl_union_pw_qpolynomial_fold
*upwf
);
512 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_intersect_domain(
513 __isl_take isl_union_pw_qpolynomial_fold
*upwf
,
514 __isl_take isl_union_set
*uset
);
516 enum isl_fold
isl_union_pw_qpolynomial_fold_get_type(
517 __isl_keep isl_union_pw_qpolynomial_fold
*upwf
);
518 __isl_give isl_dim
*isl_union_pw_qpolynomial_fold_get_dim(
519 __isl_keep isl_union_pw_qpolynomial_fold
*upwf
);
521 __isl_give isl_qpolynomial
*isl_union_pw_qpolynomial_fold_eval(
522 __isl_take isl_union_pw_qpolynomial_fold
*upwf
,
523 __isl_take isl_point
*pnt
);
525 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_coalesce(
526 __isl_take isl_union_pw_qpolynomial_fold
*upwf
);
527 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_gist(
528 __isl_take isl_union_pw_qpolynomial_fold
*upwf
,
529 __isl_take isl_union_set
*context
);
531 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_align_params(
532 __isl_take isl_union_pw_qpolynomial_fold
*upwf
,
533 __isl_take isl_dim
*model
);
535 int isl_union_pw_qpolynomial_fold_foreach_pw_qpolynomial_fold(
536 __isl_keep isl_union_pw_qpolynomial_fold
*upwf
,
537 int (*fn
)(__isl_take isl_pw_qpolynomial_fold
*pwf
,
538 void *user
), void *user
);
539 __isl_give isl_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_extract_pw_qpolynomial_fold(
540 __isl_keep isl_union_pw_qpolynomial_fold
*upwf
, __isl_take isl_dim
*dim
);
542 __isl_give isl_printer
*isl_printer_print_union_pw_qpolynomial_fold(
543 __isl_take isl_printer
*p
,
544 __isl_keep isl_union_pw_qpolynomial_fold
*upwf
);
546 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_bound(
547 __isl_take isl_union_pw_qpolynomial
*upwqp
,
548 enum isl_fold type
, int *tight
);
549 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_set_apply_union_pw_qpolynomial_fold(
550 __isl_take isl_union_set
*uset
,
551 __isl_take isl_union_pw_qpolynomial_fold
*upwf
, int *tight
);
552 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_map_apply_union_pw_qpolynomial_fold(
553 __isl_take isl_union_map
*umap
,
554 __isl_take isl_union_pw_qpolynomial_fold
*upwf
, int *tight
);
556 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_to_polynomial(
557 __isl_take isl_union_pw_qpolynomial
*upwqp
, int sign
);
559 #if defined(__cplusplus)