isl_mat_rank: extract out hermite_first_zero_col
[isl.git] / include / isl / polynomial.h
blobbb285ab1845d4633c12bc9cc770e67a8443f0c5d
1 #ifndef ISL_POLYNOMIAL_H
2 #define ISL_POLYNOMIAL_H
4 #include <isl/ctx.h>
5 #include <isl/constraint.h>
6 #include <isl/space.h>
7 #include <isl/set_type.h>
8 #include <isl/point.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>
13 #include <isl/val.h>
15 #if defined(__cplusplus)
16 extern "C" {
17 #endif
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,
64 unsigned power);
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);
178 __isl_export
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);
234 __isl_export
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);
253 __isl_constructor
254 __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_read_from_str(isl_ctx *ctx,
255 const char *str);
256 __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_read_from_file(isl_ctx *ctx,
257 FILE *input);
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_val *isl_qpolynomial_fold_eval(
320 __isl_take isl_qpolynomial_fold *fold, __isl_take isl_point *pnt);
322 __isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_gist_params(
323 __isl_take isl_qpolynomial_fold *fold, __isl_take isl_set *context);
324 __isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_gist(
325 __isl_take isl_qpolynomial_fold *fold, __isl_take isl_set *context);
327 isl_stat isl_qpolynomial_fold_foreach_qpolynomial(
328 __isl_keep isl_qpolynomial_fold *fold,
329 isl_stat (*fn)(__isl_take isl_qpolynomial *qp, void *user), void *user);
331 __isl_give isl_printer *isl_printer_print_qpolynomial_fold(
332 __isl_take isl_printer *p, __isl_keep isl_qpolynomial_fold *fold);
333 void isl_qpolynomial_fold_print(__isl_keep isl_qpolynomial_fold *fold, FILE *out,
334 unsigned output_format);
335 void isl_qpolynomial_fold_dump(__isl_keep isl_qpolynomial_fold *fold);
337 isl_ctx *isl_pw_qpolynomial_fold_get_ctx(__isl_keep isl_pw_qpolynomial_fold *pwf);
339 isl_bool isl_pw_qpolynomial_fold_involves_nan(
340 __isl_keep isl_pw_qpolynomial_fold *pwf);
341 isl_bool isl_pw_qpolynomial_fold_plain_is_equal(
342 __isl_keep isl_pw_qpolynomial_fold *pwf1,
343 __isl_keep isl_pw_qpolynomial_fold *pwf2);
345 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_from_pw_qpolynomial(
346 enum isl_fold type, __isl_take isl_pw_qpolynomial *pwqp);
348 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_alloc(
349 enum isl_fold type,
350 __isl_take isl_set *set, __isl_take isl_qpolynomial_fold *fold);
351 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_copy(
352 __isl_keep isl_pw_qpolynomial_fold *pwf);
353 __isl_null isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_free(
354 __isl_take isl_pw_qpolynomial_fold *pwf);
356 isl_bool isl_pw_qpolynomial_fold_is_zero(
357 __isl_keep isl_pw_qpolynomial_fold *pwf);
359 __isl_give isl_space *isl_pw_qpolynomial_fold_get_domain_space(
360 __isl_keep isl_pw_qpolynomial_fold *pwf);
361 __isl_give isl_space *isl_pw_qpolynomial_fold_get_space(
362 __isl_keep isl_pw_qpolynomial_fold *pwf);
363 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_reset_space(
364 __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_space *dim);
365 unsigned isl_pw_qpolynomial_fold_dim(__isl_keep isl_pw_qpolynomial_fold *pwf,
366 enum isl_dim_type type);
367 isl_bool isl_pw_qpolynomial_fold_has_equal_space(
368 __isl_keep isl_pw_qpolynomial_fold *pwf1,
369 __isl_keep isl_pw_qpolynomial_fold *pwf2);
371 size_t isl_pw_qpolynomial_fold_size(__isl_keep isl_pw_qpolynomial_fold *pwf);
373 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_zero(
374 __isl_take isl_space *dim, enum isl_fold type);
376 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_set_dim_name(
377 __isl_take isl_pw_qpolynomial_fold *pwf,
378 enum isl_dim_type type, unsigned pos, const char *s);
380 int isl_pw_qpolynomial_fold_find_dim_by_name(
381 __isl_keep isl_pw_qpolynomial_fold *pwf,
382 enum isl_dim_type type, const char *name);
384 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_reset_user(
385 __isl_take isl_pw_qpolynomial_fold *pwf);
387 __isl_give isl_set *isl_pw_qpolynomial_fold_domain(
388 __isl_take isl_pw_qpolynomial_fold *pwf);
389 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_intersect_domain(
390 __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *set);
391 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_intersect_params(
392 __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *set);
393 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_subtract_domain(
394 __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *set);
396 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_add(
397 __isl_take isl_pw_qpolynomial_fold *pwf1,
398 __isl_take isl_pw_qpolynomial_fold *pwf2);
399 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_fold(
400 __isl_take isl_pw_qpolynomial_fold *pwf1,
401 __isl_take isl_pw_qpolynomial_fold *pwf2);
402 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_add_disjoint(
403 __isl_take isl_pw_qpolynomial_fold *pwf1,
404 __isl_take isl_pw_qpolynomial_fold *pwf2);
405 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_scale_val(
406 __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_val *v);
407 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_scale_down_val(
408 __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_val *v);
410 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_project_domain_on_params(
411 __isl_take isl_pw_qpolynomial_fold *pwf);
412 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_from_range(
413 __isl_take isl_pw_qpolynomial_fold *pwf);
414 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_drop_dims(
415 __isl_take isl_pw_qpolynomial_fold *pwf,
416 enum isl_dim_type type, unsigned first, unsigned n);
417 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_move_dims(
418 __isl_take isl_pw_qpolynomial_fold *pwf,
419 enum isl_dim_type dst_type, unsigned dst_pos,
420 enum isl_dim_type src_type, unsigned src_pos, unsigned n);
422 __isl_give isl_val *isl_pw_qpolynomial_fold_eval(
423 __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_point *pnt);
425 int isl_pw_qpolynomial_fold_n_piece(__isl_keep isl_pw_qpolynomial_fold *pwf);
426 isl_stat isl_pw_qpolynomial_fold_foreach_piece(
427 __isl_keep isl_pw_qpolynomial_fold *pwf,
428 isl_stat (*fn)(__isl_take isl_set *set,
429 __isl_take isl_qpolynomial_fold *fold, void *user), void *user);
430 isl_stat isl_pw_qpolynomial_fold_foreach_lifted_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);
435 __isl_give isl_printer *isl_printer_print_pw_qpolynomial_fold(
436 __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf);
437 void isl_pw_qpolynomial_fold_print(__isl_keep isl_pw_qpolynomial_fold *pwf,
438 FILE *out, unsigned output_format);
439 void isl_pw_qpolynomial_fold_dump(__isl_keep isl_pw_qpolynomial_fold *pwf);
441 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_coalesce(
442 __isl_take isl_pw_qpolynomial_fold *pwf);
443 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_gist(
444 __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *context);
445 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_gist_params(
446 __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *context);
448 __isl_give isl_val *isl_pw_qpolynomial_fold_max(
449 __isl_take isl_pw_qpolynomial_fold *pwf);
450 __isl_give isl_val *isl_pw_qpolynomial_fold_min(
451 __isl_take isl_pw_qpolynomial_fold *pwf);
453 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_bound(
454 __isl_take isl_pw_qpolynomial *pwqp, enum isl_fold type, int *tight);
455 __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_bound(
456 __isl_take isl_pw_qpolynomial_fold *pwf, int *tight);
457 __isl_give isl_pw_qpolynomial_fold *isl_set_apply_pw_qpolynomial_fold(
458 __isl_take isl_set *set, __isl_take isl_pw_qpolynomial_fold *pwf,
459 int *tight);
460 __isl_give isl_pw_qpolynomial_fold *isl_map_apply_pw_qpolynomial_fold(
461 __isl_take isl_map *map, __isl_take isl_pw_qpolynomial_fold *pwf,
462 int *tight);
464 __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_to_polynomial(
465 __isl_take isl_pw_qpolynomial *pwqp, int sign);
467 isl_ctx *isl_union_pw_qpolynomial_get_ctx(
468 __isl_keep isl_union_pw_qpolynomial *upwqp);
470 unsigned isl_union_pw_qpolynomial_dim(
471 __isl_keep isl_union_pw_qpolynomial *upwqp, enum isl_dim_type type);
473 isl_bool isl_union_pw_qpolynomial_involves_nan(
474 __isl_keep isl_union_pw_qpolynomial *upwqp);
475 isl_bool isl_union_pw_qpolynomial_plain_is_equal(
476 __isl_keep isl_union_pw_qpolynomial *upwqp1,
477 __isl_keep isl_union_pw_qpolynomial *upwqp2);
479 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_from_pw_qpolynomial(__isl_take isl_pw_qpolynomial *pwqp);
480 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_zero(
481 __isl_take isl_space *dim);
482 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_add_pw_qpolynomial(
483 __isl_take isl_union_pw_qpolynomial *upwqp,
484 __isl_take isl_pw_qpolynomial *pwqp);
485 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_copy(
486 __isl_keep isl_union_pw_qpolynomial *upwqp);
487 __isl_null isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_free(
488 __isl_take isl_union_pw_qpolynomial *upwqp);
490 __isl_constructor
491 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_read_from_str(
492 isl_ctx *ctx, const char *str);
493 __isl_give char *isl_union_pw_qpolynomial_to_str(
494 __isl_keep isl_union_pw_qpolynomial *upwqp);
496 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_neg(
497 __isl_take isl_union_pw_qpolynomial *upwqp);
499 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_add(
500 __isl_take isl_union_pw_qpolynomial *upwqp1,
501 __isl_take isl_union_pw_qpolynomial *upwqp2);
502 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_sub(
503 __isl_take isl_union_pw_qpolynomial *upwqp1,
504 __isl_take isl_union_pw_qpolynomial *upwqp2);
505 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_mul(
506 __isl_take isl_union_pw_qpolynomial *upwqp1,
507 __isl_take isl_union_pw_qpolynomial *upwqp2);
508 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_scale_val(
509 __isl_take isl_union_pw_qpolynomial *upwqp, __isl_take isl_val *v);
510 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_scale_down_val(
511 __isl_take isl_union_pw_qpolynomial *upwqp, __isl_take isl_val *v);
513 __isl_export
514 __isl_give isl_union_set *isl_union_pw_qpolynomial_domain(
515 __isl_take isl_union_pw_qpolynomial *upwqp);
516 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_intersect_domain(
517 __isl_take isl_union_pw_qpolynomial *upwpq,
518 __isl_take isl_union_set *uset);
519 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_intersect_params(
520 __isl_take isl_union_pw_qpolynomial *upwpq,
521 __isl_take isl_set *set);
522 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_subtract_domain(
523 __isl_take isl_union_pw_qpolynomial *upwpq,
524 __isl_take isl_union_set *uset);
526 __isl_give isl_space *isl_union_pw_qpolynomial_get_space(
527 __isl_keep isl_union_pw_qpolynomial *upwqp);
529 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_set_dim_name(
530 __isl_take isl_union_pw_qpolynomial *upwqp,
531 enum isl_dim_type type, unsigned pos, const char *s);
533 int isl_union_pw_qpolynomial_find_dim_by_name(
534 __isl_keep isl_union_pw_qpolynomial *upwqp,
535 enum isl_dim_type type, const char *name);
537 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_drop_dims(
538 __isl_take isl_union_pw_qpolynomial *upwqp,
539 enum isl_dim_type type, unsigned first, unsigned n);
540 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_reset_user(
541 __isl_take isl_union_pw_qpolynomial *upwqp);
543 __isl_export
544 __isl_give isl_val *isl_union_pw_qpolynomial_eval(
545 __isl_take isl_union_pw_qpolynomial *upwqp, __isl_take isl_point *pnt);
547 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_coalesce(
548 __isl_take isl_union_pw_qpolynomial *upwqp);
549 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_gist(
550 __isl_take isl_union_pw_qpolynomial *upwqp,
551 __isl_take isl_union_set *context);
552 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_gist_params(
553 __isl_take isl_union_pw_qpolynomial *upwqp,
554 __isl_take isl_set *context);
556 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_align_params(
557 __isl_take isl_union_pw_qpolynomial *upwqp,
558 __isl_take isl_space *model);
560 int isl_union_pw_qpolynomial_n_pw_qpolynomial(
561 __isl_keep isl_union_pw_qpolynomial *upwqp);
562 isl_stat isl_union_pw_qpolynomial_foreach_pw_qpolynomial(
563 __isl_keep isl_union_pw_qpolynomial *upwqp,
564 isl_stat (*fn)(__isl_take isl_pw_qpolynomial *pwqp, void *user),
565 void *user);
566 __isl_give isl_pw_qpolynomial *isl_union_pw_qpolynomial_extract_pw_qpolynomial(
567 __isl_keep isl_union_pw_qpolynomial *upwqp, __isl_take isl_space *dim);
569 __isl_give isl_printer *isl_printer_print_union_pw_qpolynomial(
570 __isl_take isl_printer *p, __isl_keep isl_union_pw_qpolynomial *upwqp);
572 isl_ctx *isl_union_pw_qpolynomial_fold_get_ctx(
573 __isl_keep isl_union_pw_qpolynomial_fold *upwf);
575 unsigned isl_union_pw_qpolynomial_fold_dim(
576 __isl_keep isl_union_pw_qpolynomial_fold *upwf, enum isl_dim_type type);
578 isl_bool isl_union_pw_qpolynomial_fold_involves_nan(
579 __isl_keep isl_union_pw_qpolynomial_fold *upwf);
580 isl_bool isl_union_pw_qpolynomial_fold_plain_is_equal(
581 __isl_keep isl_union_pw_qpolynomial_fold *upwf1,
582 __isl_keep isl_union_pw_qpolynomial_fold *upwf2);
584 __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_from_pw_qpolynomial_fold(__isl_take isl_pw_qpolynomial_fold *pwf);
585 __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_zero(
586 __isl_take isl_space *dim, enum isl_fold type);
587 __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_fold_pw_qpolynomial_fold(
588 __isl_take isl_union_pw_qpolynomial_fold *upwqp,
589 __isl_take isl_pw_qpolynomial_fold *pwqp);
590 __isl_null isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_free(
591 __isl_take isl_union_pw_qpolynomial_fold *upwf);
592 __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_copy(
593 __isl_keep isl_union_pw_qpolynomial_fold *upwf);
595 __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_fold(
596 __isl_take isl_union_pw_qpolynomial_fold *upwf1,
597 __isl_take isl_union_pw_qpolynomial_fold *upwf2);
598 __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_add_union_pw_qpolynomial(
599 __isl_take isl_union_pw_qpolynomial_fold *upwf,
600 __isl_take isl_union_pw_qpolynomial *upwqp);
601 __isl_give isl_union_pw_qpolynomial_fold *
602 isl_union_pw_qpolynomial_fold_scale_val(
603 __isl_take isl_union_pw_qpolynomial_fold *upwf, __isl_take isl_val *v);
604 __isl_give isl_union_pw_qpolynomial_fold *
605 isl_union_pw_qpolynomial_fold_scale_down_val(
606 __isl_take isl_union_pw_qpolynomial_fold *upwf, __isl_take isl_val *v);
608 __isl_give isl_union_set *isl_union_pw_qpolynomial_fold_domain(
609 __isl_take isl_union_pw_qpolynomial_fold *upwf);
610 __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_intersect_domain(
611 __isl_take isl_union_pw_qpolynomial_fold *upwf,
612 __isl_take isl_union_set *uset);
613 __isl_give isl_union_pw_qpolynomial_fold *
614 isl_union_pw_qpolynomial_fold_intersect_params(
615 __isl_take isl_union_pw_qpolynomial_fold *upwf,
616 __isl_take isl_set *set);
617 __isl_give isl_union_pw_qpolynomial_fold *
618 isl_union_pw_qpolynomial_fold_subtract_domain(
619 __isl_take isl_union_pw_qpolynomial_fold *upwf,
620 __isl_take isl_union_set *uset);
622 enum isl_fold isl_union_pw_qpolynomial_fold_get_type(
623 __isl_keep isl_union_pw_qpolynomial_fold *upwf);
624 __isl_give isl_space *isl_union_pw_qpolynomial_fold_get_space(
625 __isl_keep isl_union_pw_qpolynomial_fold *upwf);
627 __isl_give isl_union_pw_qpolynomial_fold *
628 isl_union_pw_qpolynomial_fold_set_dim_name(
629 __isl_take isl_union_pw_qpolynomial_fold *upwf,
630 enum isl_dim_type type, unsigned pos, const char *s);
632 int isl_union_pw_qpolynomial_fold_find_dim_by_name(
633 __isl_keep isl_union_pw_qpolynomial_fold *upwf,
634 enum isl_dim_type type, const char *name);
636 __isl_give isl_union_pw_qpolynomial_fold *
637 isl_union_pw_qpolynomial_fold_drop_dims(
638 __isl_take isl_union_pw_qpolynomial_fold *upwf,
639 enum isl_dim_type type, unsigned first, unsigned n);
640 __isl_give isl_union_pw_qpolynomial_fold *
641 isl_union_pw_qpolynomial_fold_reset_user(
642 __isl_take isl_union_pw_qpolynomial_fold *upwf);
644 __isl_give isl_val *isl_union_pw_qpolynomial_fold_eval(
645 __isl_take isl_union_pw_qpolynomial_fold *upwf,
646 __isl_take isl_point *pnt);
648 __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_coalesce(
649 __isl_take isl_union_pw_qpolynomial_fold *upwf);
650 __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_gist(
651 __isl_take isl_union_pw_qpolynomial_fold *upwf,
652 __isl_take isl_union_set *context);
653 __isl_give isl_union_pw_qpolynomial_fold *
654 isl_union_pw_qpolynomial_fold_gist_params(
655 __isl_take isl_union_pw_qpolynomial_fold *upwf,
656 __isl_take isl_set *context);
658 __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_align_params(
659 __isl_take isl_union_pw_qpolynomial_fold *upwf,
660 __isl_take isl_space *model);
662 int isl_union_pw_qpolynomial_fold_n_pw_qpolynomial_fold(
663 __isl_keep isl_union_pw_qpolynomial_fold *upwf);
664 isl_stat isl_union_pw_qpolynomial_fold_foreach_pw_qpolynomial_fold(
665 __isl_keep isl_union_pw_qpolynomial_fold *upwf,
666 isl_stat (*fn)(__isl_take isl_pw_qpolynomial_fold *pwf,
667 void *user), void *user);
668 __isl_give isl_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_extract_pw_qpolynomial_fold(
669 __isl_keep isl_union_pw_qpolynomial_fold *upwf, __isl_take isl_space *dim);
671 __isl_give isl_printer *isl_printer_print_union_pw_qpolynomial_fold(
672 __isl_take isl_printer *p,
673 __isl_keep isl_union_pw_qpolynomial_fold *upwf);
675 __isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_bound(
676 __isl_take isl_union_pw_qpolynomial *upwqp,
677 enum isl_fold type, int *tight);
678 __isl_give isl_union_pw_qpolynomial_fold *isl_union_set_apply_union_pw_qpolynomial_fold(
679 __isl_take isl_union_set *uset,
680 __isl_take isl_union_pw_qpolynomial_fold *upwf, int *tight);
681 __isl_give isl_union_pw_qpolynomial_fold *isl_union_map_apply_union_pw_qpolynomial_fold(
682 __isl_take isl_union_map *umap,
683 __isl_take isl_union_pw_qpolynomial_fold *upwf, int *tight);
685 __isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_to_polynomial(
686 __isl_take isl_union_pw_qpolynomial *upwqp, int sign);
688 #if defined(__cplusplus)
690 #endif
692 #endif