1 #ifndef ISL_POLYNOMIAL_H
2 #define ISL_POLYNOMIAL_H
5 #include <isl/constraint.h>
7 #include <isl/set_type.h>
9 #include <isl/printer.h>
10 #include <isl/union_set_type.h>
11 #include <isl/aff_type.h>
12 #include <isl/polynomial_type.h>
15 #if defined(__cplusplus)
19 isl_ctx
*isl_qpolynomial_get_ctx(__isl_keep isl_qpolynomial
*qp
);
20 __isl_give isl_space
*isl_qpolynomial_get_domain_space(
21 __isl_keep isl_qpolynomial
*qp
);
22 __isl_give isl_space
*isl_qpolynomial_get_space(__isl_keep isl_qpolynomial
*qp
);
23 unsigned isl_qpolynomial_dim(__isl_keep isl_qpolynomial
*qp
,
24 enum isl_dim_type type
);
25 isl_bool
isl_qpolynomial_involves_dims(__isl_keep isl_qpolynomial
*qp
,
26 enum isl_dim_type type
, unsigned first
, unsigned n
);
28 __isl_give isl_val
*isl_qpolynomial_get_constant_val(
29 __isl_keep isl_qpolynomial
*qp
);
31 __isl_give isl_qpolynomial
*isl_qpolynomial_set_dim_name(
32 __isl_take isl_qpolynomial
*qp
,
33 enum isl_dim_type type
, unsigned pos
, const char *s
);
35 __isl_give isl_qpolynomial
*isl_qpolynomial_zero_on_domain(__isl_take isl_space
*dim
);
36 __isl_give isl_qpolynomial
*isl_qpolynomial_one_on_domain(__isl_take isl_space
*dim
);
37 __isl_give isl_qpolynomial
*isl_qpolynomial_infty_on_domain(__isl_take isl_space
*dim
);
38 __isl_give isl_qpolynomial
*isl_qpolynomial_neginfty_on_domain(__isl_take isl_space
*dim
);
39 __isl_give isl_qpolynomial
*isl_qpolynomial_nan_on_domain(__isl_take isl_space
*dim
);
40 __isl_give isl_qpolynomial
*isl_qpolynomial_val_on_domain(
41 __isl_take isl_space
*space
, __isl_take isl_val
*val
);
42 __isl_give isl_qpolynomial
*isl_qpolynomial_var_on_domain(__isl_take isl_space
*dim
,
43 enum isl_dim_type type
, unsigned pos
);
44 __isl_give isl_qpolynomial
*isl_qpolynomial_copy(__isl_keep isl_qpolynomial
*qp
);
45 __isl_null isl_qpolynomial
*isl_qpolynomial_free(
46 __isl_take isl_qpolynomial
*qp
);
48 isl_bool
isl_qpolynomial_plain_is_equal(__isl_keep isl_qpolynomial
*qp1
,
49 __isl_keep isl_qpolynomial
*qp2
);
50 isl_bool
isl_qpolynomial_is_zero(__isl_keep isl_qpolynomial
*qp
);
51 isl_bool
isl_qpolynomial_is_nan(__isl_keep isl_qpolynomial
*qp
);
52 isl_bool
isl_qpolynomial_is_infty(__isl_keep isl_qpolynomial
*qp
);
53 isl_bool
isl_qpolynomial_is_neginfty(__isl_keep isl_qpolynomial
*qp
);
54 int isl_qpolynomial_sgn(__isl_keep isl_qpolynomial
*qp
);
56 __isl_give isl_qpolynomial
*isl_qpolynomial_neg(__isl_take isl_qpolynomial
*qp
);
57 __isl_give isl_qpolynomial
*isl_qpolynomial_add(__isl_take isl_qpolynomial
*qp1
,
58 __isl_take isl_qpolynomial
*qp2
);
59 __isl_give isl_qpolynomial
*isl_qpolynomial_sub(__isl_take isl_qpolynomial
*qp1
,
60 __isl_take isl_qpolynomial
*qp2
);
61 __isl_give isl_qpolynomial
*isl_qpolynomial_mul(__isl_take isl_qpolynomial
*qp1
,
62 __isl_take isl_qpolynomial
*qp2
);
63 __isl_give isl_qpolynomial
*isl_qpolynomial_pow(__isl_take isl_qpolynomial
*qp
,
65 __isl_give isl_qpolynomial
*isl_qpolynomial_scale_val(
66 __isl_take isl_qpolynomial
*qp
, __isl_take isl_val
*v
);
67 __isl_give isl_qpolynomial
*isl_qpolynomial_scale_down_val(
68 __isl_take isl_qpolynomial
*qp
, __isl_take isl_val
*v
);
70 __isl_give isl_qpolynomial
*isl_qpolynomial_insert_dims(
71 __isl_take isl_qpolynomial
*qp
, enum isl_dim_type type
,
72 unsigned first
, unsigned n
);
73 __isl_give isl_qpolynomial
*isl_qpolynomial_add_dims(
74 __isl_take isl_qpolynomial
*qp
, enum isl_dim_type type
, unsigned n
);
75 __isl_give isl_qpolynomial
*isl_qpolynomial_move_dims(
76 __isl_take isl_qpolynomial
*qp
,
77 enum isl_dim_type dst_type
, unsigned dst_pos
,
78 enum isl_dim_type src_type
, unsigned src_pos
, unsigned n
);
79 __isl_give isl_qpolynomial
*isl_qpolynomial_project_domain_on_params(
80 __isl_take isl_qpolynomial
*qp
);
81 __isl_give isl_qpolynomial
*isl_qpolynomial_drop_dims(
82 __isl_take isl_qpolynomial
*qp
,
83 enum isl_dim_type type
, unsigned first
, unsigned n
);
85 __isl_give isl_qpolynomial
*isl_qpolynomial_substitute(
86 __isl_take isl_qpolynomial
*qp
,
87 enum isl_dim_type type
, unsigned first
, unsigned n
,
88 __isl_keep isl_qpolynomial
**subs
);
90 isl_stat
isl_qpolynomial_as_polynomial_on_domain(__isl_keep isl_qpolynomial
*qp
,
91 __isl_keep isl_basic_set
*bset
,
92 isl_stat (*fn
)(__isl_take isl_basic_set
*bset
,
93 __isl_take isl_qpolynomial
*poly
, void *user
), void *user
);
95 __isl_give isl_qpolynomial
*isl_qpolynomial_homogenize(
96 __isl_take isl_qpolynomial
*poly
);
98 __isl_give isl_qpolynomial
*isl_qpolynomial_align_params(
99 __isl_take isl_qpolynomial
*qp
, __isl_take isl_space
*model
);
101 isl_ctx
*isl_term_get_ctx(__isl_keep isl_term
*term
);
103 __isl_give isl_term
*isl_term_copy(__isl_keep isl_term
*term
);
104 void isl_term_free(__isl_take isl_term
*term
);
106 unsigned isl_term_dim(__isl_keep isl_term
*term
, enum isl_dim_type type
);
107 __isl_give isl_val
*isl_term_get_coefficient_val(__isl_keep isl_term
*term
);
108 int isl_term_get_exp(__isl_keep isl_term
*term
,
109 enum isl_dim_type type
, unsigned pos
);
110 __isl_give isl_aff
*isl_term_get_div(__isl_keep isl_term
*term
, unsigned pos
);
112 isl_stat
isl_qpolynomial_foreach_term(__isl_keep isl_qpolynomial
*qp
,
113 isl_stat (*fn
)(__isl_take isl_term
*term
, void *user
), void *user
);
115 __isl_give isl_val
*isl_qpolynomial_eval(__isl_take isl_qpolynomial
*qp
,
116 __isl_take isl_point
*pnt
);
118 __isl_give isl_qpolynomial
*isl_qpolynomial_gist_params(
119 __isl_take isl_qpolynomial
*qp
, __isl_take isl_set
*context
);
120 __isl_give isl_qpolynomial
*isl_qpolynomial_gist(
121 __isl_take isl_qpolynomial
*qp
, __isl_take isl_set
*context
);
123 __isl_give isl_qpolynomial
*isl_qpolynomial_from_constraint(
124 __isl_take isl_constraint
*c
, enum isl_dim_type type
, unsigned pos
);
125 __isl_give isl_qpolynomial
*isl_qpolynomial_from_term(__isl_take isl_term
*term
);
126 __isl_give isl_qpolynomial
*isl_qpolynomial_from_aff(__isl_take isl_aff
*aff
);
127 __isl_give isl_basic_map
*isl_basic_map_from_qpolynomial(
128 __isl_take isl_qpolynomial
*qp
);
130 __isl_give isl_printer
*isl_printer_print_qpolynomial(
131 __isl_take isl_printer
*p
, __isl_keep isl_qpolynomial
*qp
);
132 void isl_qpolynomial_print(__isl_keep isl_qpolynomial
*qp
, FILE *out
,
133 unsigned output_format
);
134 void isl_qpolynomial_dump(__isl_keep isl_qpolynomial
*qp
);
136 isl_ctx
*isl_pw_qpolynomial_get_ctx(__isl_keep isl_pw_qpolynomial
*pwqp
);
138 isl_bool
isl_pw_qpolynomial_involves_nan(__isl_keep isl_pw_qpolynomial
*pwqp
);
139 isl_bool
isl_pw_qpolynomial_plain_is_equal(__isl_keep isl_pw_qpolynomial
*pwqp1
,
140 __isl_keep isl_pw_qpolynomial
*pwqp2
);
142 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_zero(__isl_take isl_space
*dim
);
143 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_alloc(__isl_take isl_set
*set
,
144 __isl_take isl_qpolynomial
*qp
);
145 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_from_qpolynomial(
146 __isl_take isl_qpolynomial
*qp
);
147 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_copy(
148 __isl_keep isl_pw_qpolynomial
*pwqp
);
149 __isl_null isl_pw_qpolynomial
*isl_pw_qpolynomial_free(
150 __isl_take isl_pw_qpolynomial
*pwqp
);
152 isl_bool
isl_pw_qpolynomial_is_zero(__isl_keep isl_pw_qpolynomial
*pwqp
);
154 __isl_give isl_space
*isl_pw_qpolynomial_get_domain_space(
155 __isl_keep isl_pw_qpolynomial
*pwqp
);
156 __isl_give isl_space
*isl_pw_qpolynomial_get_space(
157 __isl_keep isl_pw_qpolynomial
*pwqp
);
158 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_reset_domain_space(
159 __isl_take isl_pw_qpolynomial
*pwqp
, __isl_take isl_space
*dim
);
160 unsigned isl_pw_qpolynomial_dim(__isl_keep isl_pw_qpolynomial
*pwqp
,
161 enum isl_dim_type type
);
162 isl_bool
isl_pw_qpolynomial_involves_dims(__isl_keep isl_pw_qpolynomial
*pwqp
,
163 enum isl_dim_type type
, unsigned first
, unsigned n
);
164 isl_bool
isl_pw_qpolynomial_has_equal_space(
165 __isl_keep isl_pw_qpolynomial
*pwqp1
,
166 __isl_keep isl_pw_qpolynomial
*pwqp2
);
168 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_set_dim_name(
169 __isl_take isl_pw_qpolynomial
*pwqp
,
170 enum isl_dim_type type
, unsigned pos
, const char *s
);
172 int isl_pw_qpolynomial_find_dim_by_name(__isl_keep isl_pw_qpolynomial
*pwqp
,
173 enum isl_dim_type type
, const char *name
);
175 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_reset_user(
176 __isl_take isl_pw_qpolynomial
*pwqp
);
179 __isl_give isl_set
*isl_pw_qpolynomial_domain(__isl_take isl_pw_qpolynomial
*pwqp
);
180 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_intersect_domain(
181 __isl_take isl_pw_qpolynomial
*pwpq
, __isl_take isl_set
*set
);
182 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_intersect_params(
183 __isl_take isl_pw_qpolynomial
*pwpq
, __isl_take isl_set
*set
);
184 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_subtract_domain(
185 __isl_take isl_pw_qpolynomial
*pwpq
, __isl_take isl_set
*set
);
187 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_project_domain_on_params(
188 __isl_take isl_pw_qpolynomial
*pwqp
);
189 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_from_range(
190 __isl_take isl_pw_qpolynomial
*pwqp
);
191 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_drop_dims(
192 __isl_take isl_pw_qpolynomial
*pwqp
,
193 enum isl_dim_type type
, unsigned first
, unsigned n
);
194 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_split_dims(
195 __isl_take isl_pw_qpolynomial
*pwqp
,
196 enum isl_dim_type type
, unsigned first
, unsigned n
);
198 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_add(
199 __isl_take isl_pw_qpolynomial
*pwqp1
,
200 __isl_take isl_pw_qpolynomial
*pwqp2
);
201 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_sub(
202 __isl_take isl_pw_qpolynomial
*pwqp1
,
203 __isl_take isl_pw_qpolynomial
*pwqp2
);
204 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_add_disjoint(
205 __isl_take isl_pw_qpolynomial
*pwqp1
,
206 __isl_take isl_pw_qpolynomial
*pwqp2
);
207 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_neg(
208 __isl_take isl_pw_qpolynomial
*pwqp
);
209 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_mul(
210 __isl_take isl_pw_qpolynomial
*pwqp1
,
211 __isl_take isl_pw_qpolynomial
*pwqp2
);
212 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_scale_val(
213 __isl_take isl_pw_qpolynomial
*pwqp
, __isl_take isl_val
*v
);
214 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_scale_down_val(
215 __isl_take isl_pw_qpolynomial
*pwqp
, __isl_take isl_val
*v
);
216 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_pow(
217 __isl_take isl_pw_qpolynomial
*pwqp
, unsigned exponent
);
219 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_insert_dims(
220 __isl_take isl_pw_qpolynomial
*pwqp
, enum isl_dim_type type
,
221 unsigned first
, unsigned n
);
222 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_add_dims(
223 __isl_take isl_pw_qpolynomial
*pwqp
,
224 enum isl_dim_type type
, unsigned n
);
225 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_move_dims(
226 __isl_take isl_pw_qpolynomial
*pwqp
,
227 enum isl_dim_type dst_type
, unsigned dst_pos
,
228 enum isl_dim_type src_type
, unsigned src_pos
, unsigned n
);
230 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_fix_val(
231 __isl_take isl_pw_qpolynomial
*pwqp
,
232 enum isl_dim_type type
, unsigned n
, __isl_take isl_val
*v
);
235 __isl_give isl_val
*isl_pw_qpolynomial_eval(
236 __isl_take isl_pw_qpolynomial
*pwqp
, __isl_take isl_point
*pnt
);
238 __isl_give isl_val
*isl_pw_qpolynomial_max(__isl_take isl_pw_qpolynomial
*pwqp
);
239 __isl_give isl_val
*isl_pw_qpolynomial_min(__isl_take isl_pw_qpolynomial
*pwqp
);
241 int isl_pw_qpolynomial_n_piece(__isl_keep isl_pw_qpolynomial
*pwqp
);
242 isl_stat
isl_pw_qpolynomial_foreach_piece(__isl_keep isl_pw_qpolynomial
*pwqp
,
243 isl_stat (*fn
)(__isl_take isl_set
*set
, __isl_take isl_qpolynomial
*qp
,
244 void *user
), void *user
);
245 isl_stat
isl_pw_qpolynomial_foreach_lifted_piece(
246 __isl_keep isl_pw_qpolynomial
*pwqp
,
247 isl_stat (*fn
)(__isl_take isl_set
*set
, __isl_take isl_qpolynomial
*qp
,
248 void *user
), void *user
);
250 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_from_pw_aff(
251 __isl_take isl_pw_aff
*pwaff
);
254 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_read_from_str(isl_ctx
*ctx
,
256 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_read_from_file(isl_ctx
*ctx
,
258 __isl_give
char *isl_pw_qpolynomial_to_str(__isl_keep isl_pw_qpolynomial
*pwqp
);
259 __isl_give isl_printer
*isl_printer_print_pw_qpolynomial(
260 __isl_take isl_printer
*p
, __isl_keep isl_pw_qpolynomial
*pwqp
);
261 void isl_pw_qpolynomial_print(__isl_keep isl_pw_qpolynomial
*pwqp
, FILE *out
,
262 unsigned output_format
);
263 void isl_pw_qpolynomial_dump(__isl_keep isl_pw_qpolynomial
*pwqp
);
265 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_coalesce(
266 __isl_take isl_pw_qpolynomial
*pwqp
);
267 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_gist(
268 __isl_take isl_pw_qpolynomial
*pwqp
, __isl_take isl_set
*context
);
269 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_gist_params(
270 __isl_take isl_pw_qpolynomial
*pwqp
, __isl_take isl_set
*context
);
272 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_split_periods(
273 __isl_take isl_pw_qpolynomial
*pwqp
, int max_periods
);
275 __isl_give isl_pw_qpolynomial
*isl_basic_set_multiplicative_call(
276 __isl_take isl_basic_set
*bset
,
277 __isl_give isl_pw_qpolynomial
*(*fn
)(__isl_take isl_basic_set
*bset
));
279 isl_ctx
*isl_qpolynomial_fold_get_ctx(__isl_keep isl_qpolynomial_fold
*fold
);
280 enum isl_fold
isl_qpolynomial_fold_get_type(__isl_keep isl_qpolynomial_fold
*fold
);
282 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_empty(enum isl_fold type
,
283 __isl_take isl_space
*dim
);
284 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_alloc(
285 enum isl_fold type
, __isl_take isl_qpolynomial
*qp
);
286 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_copy(
287 __isl_keep isl_qpolynomial_fold
*fold
);
288 void isl_qpolynomial_fold_free(__isl_take isl_qpolynomial_fold
*fold
);
290 int isl_qpolynomial_fold_is_empty(__isl_keep isl_qpolynomial_fold
*fold
);
291 isl_bool
isl_qpolynomial_fold_is_nan(__isl_keep isl_qpolynomial_fold
*fold
);
292 int isl_qpolynomial_fold_plain_is_equal(__isl_keep isl_qpolynomial_fold
*fold1
,
293 __isl_keep isl_qpolynomial_fold
*fold2
);
295 __isl_give isl_space
*isl_qpolynomial_fold_get_domain_space(
296 __isl_keep isl_qpolynomial_fold
*fold
);
297 __isl_give isl_space
*isl_qpolynomial_fold_get_space(
298 __isl_keep isl_qpolynomial_fold
*fold
);
300 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_fold(
301 __isl_take isl_qpolynomial_fold
*fold1
,
302 __isl_take isl_qpolynomial_fold
*fold2
);
304 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_scale_val(
305 __isl_take isl_qpolynomial_fold
*fold
, __isl_take isl_val
*v
);
306 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_scale_down_val(
307 __isl_take isl_qpolynomial_fold
*fold
, __isl_take isl_val
*v
);
309 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_move_dims(
310 __isl_take isl_qpolynomial_fold
*fold
,
311 enum isl_dim_type dst_type
, unsigned dst_pos
,
312 enum isl_dim_type src_type
, unsigned src_pos
, unsigned n
);
314 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_substitute(
315 __isl_take isl_qpolynomial_fold
*fold
,
316 enum isl_dim_type type
, unsigned first
, unsigned n
,
317 __isl_keep isl_qpolynomial
**subs
);
319 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_fix_val(
320 __isl_take isl_pw_qpolynomial_fold
*pwf
,
321 enum isl_dim_type type
, unsigned n
, __isl_take isl_val
*v
);
323 __isl_give isl_val
*isl_qpolynomial_fold_eval(
324 __isl_take isl_qpolynomial_fold
*fold
, __isl_take isl_point
*pnt
);
326 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_gist_params(
327 __isl_take isl_qpolynomial_fold
*fold
, __isl_take isl_set
*context
);
328 __isl_give isl_qpolynomial_fold
*isl_qpolynomial_fold_gist(
329 __isl_take isl_qpolynomial_fold
*fold
, __isl_take isl_set
*context
);
331 isl_stat
isl_qpolynomial_fold_foreach_qpolynomial(
332 __isl_keep isl_qpolynomial_fold
*fold
,
333 isl_stat (*fn
)(__isl_take isl_qpolynomial
*qp
, void *user
), void *user
);
335 __isl_give isl_printer
*isl_printer_print_qpolynomial_fold(
336 __isl_take isl_printer
*p
, __isl_keep isl_qpolynomial_fold
*fold
);
337 void isl_qpolynomial_fold_print(__isl_keep isl_qpolynomial_fold
*fold
, FILE *out
,
338 unsigned output_format
);
339 void isl_qpolynomial_fold_dump(__isl_keep isl_qpolynomial_fold
*fold
);
341 isl_ctx
*isl_pw_qpolynomial_fold_get_ctx(__isl_keep isl_pw_qpolynomial_fold
*pwf
);
343 isl_bool
isl_pw_qpolynomial_fold_involves_nan(
344 __isl_keep isl_pw_qpolynomial_fold
*pwf
);
345 isl_bool
isl_pw_qpolynomial_fold_plain_is_equal(
346 __isl_keep isl_pw_qpolynomial_fold
*pwf1
,
347 __isl_keep isl_pw_qpolynomial_fold
*pwf2
);
349 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_from_pw_qpolynomial(
350 enum isl_fold type
, __isl_take isl_pw_qpolynomial
*pwqp
);
352 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_alloc(
354 __isl_take isl_set
*set
, __isl_take isl_qpolynomial_fold
*fold
);
355 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_copy(
356 __isl_keep isl_pw_qpolynomial_fold
*pwf
);
357 __isl_null isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_free(
358 __isl_take isl_pw_qpolynomial_fold
*pwf
);
360 isl_bool
isl_pw_qpolynomial_fold_is_zero(
361 __isl_keep isl_pw_qpolynomial_fold
*pwf
);
363 __isl_give isl_space
*isl_pw_qpolynomial_fold_get_domain_space(
364 __isl_keep isl_pw_qpolynomial_fold
*pwf
);
365 __isl_give isl_space
*isl_pw_qpolynomial_fold_get_space(
366 __isl_keep isl_pw_qpolynomial_fold
*pwf
);
367 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_reset_space(
368 __isl_take isl_pw_qpolynomial_fold
*pwf
, __isl_take isl_space
*dim
);
369 unsigned isl_pw_qpolynomial_fold_dim(__isl_keep isl_pw_qpolynomial_fold
*pwf
,
370 enum isl_dim_type type
);
371 isl_bool
isl_pw_qpolynomial_fold_has_equal_space(
372 __isl_keep isl_pw_qpolynomial_fold
*pwf1
,
373 __isl_keep isl_pw_qpolynomial_fold
*pwf2
);
375 size_t isl_pw_qpolynomial_fold_size(__isl_keep isl_pw_qpolynomial_fold
*pwf
);
377 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_zero(
378 __isl_take isl_space
*dim
, enum isl_fold type
);
380 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_set_dim_name(
381 __isl_take isl_pw_qpolynomial_fold
*pwf
,
382 enum isl_dim_type type
, unsigned pos
, const char *s
);
384 int isl_pw_qpolynomial_fold_find_dim_by_name(
385 __isl_keep isl_pw_qpolynomial_fold
*pwf
,
386 enum isl_dim_type type
, const char *name
);
388 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_reset_user(
389 __isl_take isl_pw_qpolynomial_fold
*pwf
);
391 __isl_give isl_set
*isl_pw_qpolynomial_fold_domain(
392 __isl_take isl_pw_qpolynomial_fold
*pwf
);
393 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_intersect_domain(
394 __isl_take isl_pw_qpolynomial_fold
*pwf
, __isl_take isl_set
*set
);
395 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_intersect_params(
396 __isl_take isl_pw_qpolynomial_fold
*pwf
, __isl_take isl_set
*set
);
397 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_subtract_domain(
398 __isl_take isl_pw_qpolynomial_fold
*pwf
, __isl_take isl_set
*set
);
400 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_add(
401 __isl_take isl_pw_qpolynomial_fold
*pwf1
,
402 __isl_take isl_pw_qpolynomial_fold
*pwf2
);
403 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_fold(
404 __isl_take isl_pw_qpolynomial_fold
*pwf1
,
405 __isl_take isl_pw_qpolynomial_fold
*pwf2
);
406 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_add_disjoint(
407 __isl_take isl_pw_qpolynomial_fold
*pwf1
,
408 __isl_take isl_pw_qpolynomial_fold
*pwf2
);
409 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_scale_val(
410 __isl_take isl_pw_qpolynomial_fold
*pwf
, __isl_take isl_val
*v
);
411 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_scale_down_val(
412 __isl_take isl_pw_qpolynomial_fold
*pwf
, __isl_take isl_val
*v
);
414 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_project_domain_on_params(
415 __isl_take isl_pw_qpolynomial_fold
*pwf
);
416 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_from_range(
417 __isl_take isl_pw_qpolynomial_fold
*pwf
);
418 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_drop_dims(
419 __isl_take isl_pw_qpolynomial_fold
*pwf
,
420 enum isl_dim_type type
, unsigned first
, unsigned n
);
421 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_move_dims(
422 __isl_take isl_pw_qpolynomial_fold
*pwf
,
423 enum isl_dim_type dst_type
, unsigned dst_pos
,
424 enum isl_dim_type src_type
, unsigned src_pos
, unsigned n
);
426 __isl_give isl_val
*isl_pw_qpolynomial_fold_eval(
427 __isl_take isl_pw_qpolynomial_fold
*pwf
, __isl_take isl_point
*pnt
);
429 int isl_pw_qpolynomial_fold_n_piece(__isl_keep isl_pw_qpolynomial_fold
*pwf
);
430 isl_stat
isl_pw_qpolynomial_fold_foreach_piece(
431 __isl_keep isl_pw_qpolynomial_fold
*pwf
,
432 isl_stat (*fn
)(__isl_take isl_set
*set
,
433 __isl_take isl_qpolynomial_fold
*fold
, void *user
), void *user
);
434 isl_stat
isl_pw_qpolynomial_fold_foreach_lifted_piece(
435 __isl_keep isl_pw_qpolynomial_fold
*pwf
,
436 isl_stat (*fn
)(__isl_take isl_set
*set
,
437 __isl_take isl_qpolynomial_fold
*fold
, void *user
), void *user
);
439 __isl_give isl_printer
*isl_printer_print_pw_qpolynomial_fold(
440 __isl_take isl_printer
*p
, __isl_keep isl_pw_qpolynomial_fold
*pwf
);
441 void isl_pw_qpolynomial_fold_print(__isl_keep isl_pw_qpolynomial_fold
*pwf
,
442 FILE *out
, unsigned output_format
);
443 void isl_pw_qpolynomial_fold_dump(__isl_keep isl_pw_qpolynomial_fold
*pwf
);
445 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_coalesce(
446 __isl_take isl_pw_qpolynomial_fold
*pwf
);
447 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_gist(
448 __isl_take isl_pw_qpolynomial_fold
*pwf
, __isl_take isl_set
*context
);
449 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_gist_params(
450 __isl_take isl_pw_qpolynomial_fold
*pwf
, __isl_take isl_set
*context
);
452 __isl_give isl_val
*isl_pw_qpolynomial_fold_max(
453 __isl_take isl_pw_qpolynomial_fold
*pwf
);
454 __isl_give isl_val
*isl_pw_qpolynomial_fold_min(
455 __isl_take isl_pw_qpolynomial_fold
*pwf
);
457 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_bound(
458 __isl_take isl_pw_qpolynomial
*pwqp
, enum isl_fold type
, int *tight
);
459 __isl_give isl_pw_qpolynomial_fold
*isl_pw_qpolynomial_fold_bound(
460 __isl_take isl_pw_qpolynomial_fold
*pwf
, int *tight
);
461 __isl_give isl_pw_qpolynomial_fold
*isl_set_apply_pw_qpolynomial_fold(
462 __isl_take isl_set
*set
, __isl_take isl_pw_qpolynomial_fold
*pwf
,
464 __isl_give isl_pw_qpolynomial_fold
*isl_map_apply_pw_qpolynomial_fold(
465 __isl_take isl_map
*map
, __isl_take isl_pw_qpolynomial_fold
*pwf
,
468 __isl_give isl_pw_qpolynomial
*isl_pw_qpolynomial_to_polynomial(
469 __isl_take isl_pw_qpolynomial
*pwqp
, int sign
);
471 isl_ctx
*isl_union_pw_qpolynomial_get_ctx(
472 __isl_keep isl_union_pw_qpolynomial
*upwqp
);
474 unsigned isl_union_pw_qpolynomial_dim(
475 __isl_keep isl_union_pw_qpolynomial
*upwqp
, enum isl_dim_type type
);
477 isl_bool
isl_union_pw_qpolynomial_involves_nan(
478 __isl_keep isl_union_pw_qpolynomial
*upwqp
);
479 isl_bool
isl_union_pw_qpolynomial_plain_is_equal(
480 __isl_keep isl_union_pw_qpolynomial
*upwqp1
,
481 __isl_keep isl_union_pw_qpolynomial
*upwqp2
);
483 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_from_pw_qpolynomial(__isl_take isl_pw_qpolynomial
*pwqp
);
484 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_zero(
485 __isl_take isl_space
*dim
);
486 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_add_pw_qpolynomial(
487 __isl_take isl_union_pw_qpolynomial
*upwqp
,
488 __isl_take isl_pw_qpolynomial
*pwqp
);
489 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_copy(
490 __isl_keep isl_union_pw_qpolynomial
*upwqp
);
491 __isl_null isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_free(
492 __isl_take isl_union_pw_qpolynomial
*upwqp
);
495 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_read_from_str(
496 isl_ctx
*ctx
, const char *str
);
497 __isl_give
char *isl_union_pw_qpolynomial_to_str(
498 __isl_keep isl_union_pw_qpolynomial
*upwqp
);
500 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_neg(
501 __isl_take isl_union_pw_qpolynomial
*upwqp
);
503 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_add(
504 __isl_take isl_union_pw_qpolynomial
*upwqp1
,
505 __isl_take isl_union_pw_qpolynomial
*upwqp2
);
506 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_sub(
507 __isl_take isl_union_pw_qpolynomial
*upwqp1
,
508 __isl_take isl_union_pw_qpolynomial
*upwqp2
);
509 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_mul(
510 __isl_take isl_union_pw_qpolynomial
*upwqp1
,
511 __isl_take isl_union_pw_qpolynomial
*upwqp2
);
512 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_scale_val(
513 __isl_take isl_union_pw_qpolynomial
*upwqp
, __isl_take isl_val
*v
);
514 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_scale_down_val(
515 __isl_take isl_union_pw_qpolynomial
*upwqp
, __isl_take isl_val
*v
);
518 __isl_give isl_union_set
*isl_union_pw_qpolynomial_domain(
519 __isl_take isl_union_pw_qpolynomial
*upwqp
);
520 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_intersect_domain(
521 __isl_take isl_union_pw_qpolynomial
*upwpq
,
522 __isl_take isl_union_set
*uset
);
523 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_intersect_params(
524 __isl_take isl_union_pw_qpolynomial
*upwpq
,
525 __isl_take isl_set
*set
);
526 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_subtract_domain(
527 __isl_take isl_union_pw_qpolynomial
*upwpq
,
528 __isl_take isl_union_set
*uset
);
530 __isl_give isl_space
*isl_union_pw_qpolynomial_get_space(
531 __isl_keep isl_union_pw_qpolynomial
*upwqp
);
533 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_set_dim_name(
534 __isl_take isl_union_pw_qpolynomial
*upwqp
,
535 enum isl_dim_type type
, unsigned pos
, const char *s
);
537 int isl_union_pw_qpolynomial_find_dim_by_name(
538 __isl_keep isl_union_pw_qpolynomial
*upwqp
,
539 enum isl_dim_type type
, const char *name
);
541 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_drop_dims(
542 __isl_take isl_union_pw_qpolynomial
*upwqp
,
543 enum isl_dim_type type
, unsigned first
, unsigned n
);
544 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_reset_user(
545 __isl_take isl_union_pw_qpolynomial
*upwqp
);
548 __isl_give isl_val
*isl_union_pw_qpolynomial_eval(
549 __isl_take isl_union_pw_qpolynomial
*upwqp
, __isl_take isl_point
*pnt
);
551 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_coalesce(
552 __isl_take isl_union_pw_qpolynomial
*upwqp
);
553 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_gist(
554 __isl_take isl_union_pw_qpolynomial
*upwqp
,
555 __isl_take isl_union_set
*context
);
556 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_gist_params(
557 __isl_take isl_union_pw_qpolynomial
*upwqp
,
558 __isl_take isl_set
*context
);
560 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_align_params(
561 __isl_take isl_union_pw_qpolynomial
*upwqp
,
562 __isl_take isl_space
*model
);
564 int isl_union_pw_qpolynomial_n_pw_qpolynomial(
565 __isl_keep isl_union_pw_qpolynomial
*upwqp
);
566 isl_stat
isl_union_pw_qpolynomial_foreach_pw_qpolynomial(
567 __isl_keep isl_union_pw_qpolynomial
*upwqp
,
568 isl_stat (*fn
)(__isl_take isl_pw_qpolynomial
*pwqp
, void *user
),
570 __isl_give isl_pw_qpolynomial
*isl_union_pw_qpolynomial_extract_pw_qpolynomial(
571 __isl_keep isl_union_pw_qpolynomial
*upwqp
, __isl_take isl_space
*dim
);
573 __isl_give isl_printer
*isl_printer_print_union_pw_qpolynomial(
574 __isl_take isl_printer
*p
, __isl_keep isl_union_pw_qpolynomial
*upwqp
);
576 isl_ctx
*isl_union_pw_qpolynomial_fold_get_ctx(
577 __isl_keep isl_union_pw_qpolynomial_fold
*upwf
);
579 unsigned isl_union_pw_qpolynomial_fold_dim(
580 __isl_keep isl_union_pw_qpolynomial_fold
*upwf
, enum isl_dim_type type
);
582 isl_bool
isl_union_pw_qpolynomial_fold_involves_nan(
583 __isl_keep isl_union_pw_qpolynomial_fold
*upwf
);
584 isl_bool
isl_union_pw_qpolynomial_fold_plain_is_equal(
585 __isl_keep isl_union_pw_qpolynomial_fold
*upwf1
,
586 __isl_keep isl_union_pw_qpolynomial_fold
*upwf2
);
588 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_from_pw_qpolynomial_fold(__isl_take isl_pw_qpolynomial_fold
*pwf
);
589 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_zero(
590 __isl_take isl_space
*dim
, enum isl_fold type
);
591 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_fold_pw_qpolynomial_fold(
592 __isl_take isl_union_pw_qpolynomial_fold
*upwqp
,
593 __isl_take isl_pw_qpolynomial_fold
*pwqp
);
594 __isl_null isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_free(
595 __isl_take isl_union_pw_qpolynomial_fold
*upwf
);
596 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_copy(
597 __isl_keep isl_union_pw_qpolynomial_fold
*upwf
);
599 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_fold(
600 __isl_take isl_union_pw_qpolynomial_fold
*upwf1
,
601 __isl_take isl_union_pw_qpolynomial_fold
*upwf2
);
602 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_add_union_pw_qpolynomial(
603 __isl_take isl_union_pw_qpolynomial_fold
*upwf
,
604 __isl_take isl_union_pw_qpolynomial
*upwqp
);
605 __isl_give isl_union_pw_qpolynomial_fold
*
606 isl_union_pw_qpolynomial_fold_scale_val(
607 __isl_take isl_union_pw_qpolynomial_fold
*upwf
, __isl_take isl_val
*v
);
608 __isl_give isl_union_pw_qpolynomial_fold
*
609 isl_union_pw_qpolynomial_fold_scale_down_val(
610 __isl_take isl_union_pw_qpolynomial_fold
*upwf
, __isl_take isl_val
*v
);
612 __isl_give isl_union_set
*isl_union_pw_qpolynomial_fold_domain(
613 __isl_take isl_union_pw_qpolynomial_fold
*upwf
);
614 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_intersect_domain(
615 __isl_take isl_union_pw_qpolynomial_fold
*upwf
,
616 __isl_take isl_union_set
*uset
);
617 __isl_give isl_union_pw_qpolynomial_fold
*
618 isl_union_pw_qpolynomial_fold_intersect_params(
619 __isl_take isl_union_pw_qpolynomial_fold
*upwf
,
620 __isl_take isl_set
*set
);
621 __isl_give isl_union_pw_qpolynomial_fold
*
622 isl_union_pw_qpolynomial_fold_subtract_domain(
623 __isl_take isl_union_pw_qpolynomial_fold
*upwf
,
624 __isl_take isl_union_set
*uset
);
626 enum isl_fold
isl_union_pw_qpolynomial_fold_get_type(
627 __isl_keep isl_union_pw_qpolynomial_fold
*upwf
);
628 __isl_give isl_space
*isl_union_pw_qpolynomial_fold_get_space(
629 __isl_keep isl_union_pw_qpolynomial_fold
*upwf
);
631 __isl_give isl_union_pw_qpolynomial_fold
*
632 isl_union_pw_qpolynomial_fold_set_dim_name(
633 __isl_take isl_union_pw_qpolynomial_fold
*upwf
,
634 enum isl_dim_type type
, unsigned pos
, const char *s
);
636 int isl_union_pw_qpolynomial_fold_find_dim_by_name(
637 __isl_keep isl_union_pw_qpolynomial_fold
*upwf
,
638 enum isl_dim_type type
, const char *name
);
640 __isl_give isl_union_pw_qpolynomial_fold
*
641 isl_union_pw_qpolynomial_fold_drop_dims(
642 __isl_take isl_union_pw_qpolynomial_fold
*upwf
,
643 enum isl_dim_type type
, unsigned first
, unsigned n
);
644 __isl_give isl_union_pw_qpolynomial_fold
*
645 isl_union_pw_qpolynomial_fold_reset_user(
646 __isl_take isl_union_pw_qpolynomial_fold
*upwf
);
648 __isl_give isl_val
*isl_union_pw_qpolynomial_fold_eval(
649 __isl_take isl_union_pw_qpolynomial_fold
*upwf
,
650 __isl_take isl_point
*pnt
);
652 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_coalesce(
653 __isl_take isl_union_pw_qpolynomial_fold
*upwf
);
654 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_gist(
655 __isl_take isl_union_pw_qpolynomial_fold
*upwf
,
656 __isl_take isl_union_set
*context
);
657 __isl_give isl_union_pw_qpolynomial_fold
*
658 isl_union_pw_qpolynomial_fold_gist_params(
659 __isl_take isl_union_pw_qpolynomial_fold
*upwf
,
660 __isl_take isl_set
*context
);
662 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_align_params(
663 __isl_take isl_union_pw_qpolynomial_fold
*upwf
,
664 __isl_take isl_space
*model
);
666 int isl_union_pw_qpolynomial_fold_n_pw_qpolynomial_fold(
667 __isl_keep isl_union_pw_qpolynomial_fold
*upwf
);
668 isl_stat
isl_union_pw_qpolynomial_fold_foreach_pw_qpolynomial_fold(
669 __isl_keep isl_union_pw_qpolynomial_fold
*upwf
,
670 isl_stat (*fn
)(__isl_take isl_pw_qpolynomial_fold
*pwf
,
671 void *user
), void *user
);
672 __isl_give isl_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_fold_extract_pw_qpolynomial_fold(
673 __isl_keep isl_union_pw_qpolynomial_fold
*upwf
, __isl_take isl_space
*dim
);
675 __isl_give isl_printer
*isl_printer_print_union_pw_qpolynomial_fold(
676 __isl_take isl_printer
*p
,
677 __isl_keep isl_union_pw_qpolynomial_fold
*upwf
);
679 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_pw_qpolynomial_bound(
680 __isl_take isl_union_pw_qpolynomial
*upwqp
,
681 enum isl_fold type
, int *tight
);
682 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_set_apply_union_pw_qpolynomial_fold(
683 __isl_take isl_union_set
*uset
,
684 __isl_take isl_union_pw_qpolynomial_fold
*upwf
, int *tight
);
685 __isl_give isl_union_pw_qpolynomial_fold
*isl_union_map_apply_union_pw_qpolynomial_fold(
686 __isl_take isl_union_map
*umap
,
687 __isl_take isl_union_pw_qpolynomial_fold
*upwf
, int *tight
);
689 __isl_give isl_union_pw_qpolynomial
*isl_union_pw_qpolynomial_to_polynomial(
690 __isl_take isl_union_pw_qpolynomial
*upwqp
, int sign
);
692 #if defined(__cplusplus)