isl_basic_map_gist: allow existentially quantified variables
[isl.git] / interface / isl.py.core
blobc4edc579cae5fff741fbf6728205408bcd59b4d7
2 class union_pw_multi_aff(object):
3     def __init__(self, *args, **keywords):
4         if "ptr" in keywords:
5             self.ctx = keywords["ctx"]
6             self.ptr = keywords["ptr"]
7             return
8         if len(args) == 1 and args[0].__class__ is multi_aff:
9             self.ctx = Context.getDefaultInstance()
10             self.ptr = isl.isl_union_pw_multi_aff_from_multi_aff(isl.isl_multi_aff_copy(args[0].ptr))
11             return
12         if len(args) == 1 and args[0].__class__ is pw_multi_aff:
13             self.ctx = Context.getDefaultInstance()
14             self.ptr = isl.isl_union_pw_multi_aff_from_pw_multi_aff(isl.isl_pw_multi_aff_copy(args[0].ptr))
15             return
16         if len(args) == 1 and args[0].__class__ is union_pw_aff:
17             self.ctx = Context.getDefaultInstance()
18             self.ptr = isl.isl_union_pw_multi_aff_from_union_pw_aff(isl.isl_union_pw_aff_copy(args[0].ptr))
19             return
20         if len(args) == 1 and type(args[0]) == str:
21             self.ctx = Context.getDefaultInstance()
22             self.ptr = isl.isl_union_pw_multi_aff_read_from_str(self.ctx, args[0].encode('ascii'))
23             return
24         raise Error
25     def __del__(self):
26         if hasattr(self, 'ptr'):
27             isl.isl_union_pw_multi_aff_free(self.ptr)
28     def __str__(arg0):
29         try:
30             if not arg0.__class__ is union_pw_multi_aff:
31                 arg0 = union_pw_multi_aff(arg0)
32         except:
33             raise
34         ptr = isl.isl_union_pw_multi_aff_to_str(arg0.ptr)
35         res = cast(ptr, c_char_p).value.decode('ascii')
36         libc.free(ptr)
37         return res
38     def __repr__(self):
39         s = str(self)
40         if '"' in s:
41             return 'isl.union_pw_multi_aff("""%s""")' % s
42         else:
43             return 'isl.union_pw_multi_aff("%s")' % s
44     def add(arg0, arg1):
45         try:
46             if not arg0.__class__ is union_pw_multi_aff:
47                 arg0 = union_pw_multi_aff(arg0)
48         except:
49             raise
50         try:
51             if not arg1.__class__ is union_pw_multi_aff:
52                 arg1 = union_pw_multi_aff(arg1)
53         except:
54             raise
55         ctx = arg0.ctx
56         res = isl.isl_union_pw_multi_aff_add(isl.isl_union_pw_multi_aff_copy(arg0.ptr), isl.isl_union_pw_multi_aff_copy(arg1.ptr))
57         obj = union_pw_multi_aff(ctx=ctx, ptr=res)
58         return obj
59     def apply(*args):
60         if len(args) == 2 and args[1].__class__ is union_pw_multi_aff:
61             args = list(args)
62             try:
63                 if not args[0].__class__ is union_pw_multi_aff:
64                     args[0] = union_pw_multi_aff(args[0])
65             except:
66                 raise
67             ctx = args[0].ctx
68             res = isl.isl_union_pw_multi_aff_apply_union_pw_multi_aff(isl.isl_union_pw_multi_aff_copy(args[0].ptr), isl.isl_union_pw_multi_aff_copy(args[1].ptr))
69             obj = union_pw_multi_aff(ctx=ctx, ptr=res)
70             return obj
71         raise Error
72     def as_multi_union_pw_aff(arg0):
73         try:
74             if not arg0.__class__ is union_pw_multi_aff:
75                 arg0 = union_pw_multi_aff(arg0)
76         except:
77             raise
78         ctx = arg0.ctx
79         res = isl.isl_union_pw_multi_aff_as_multi_union_pw_aff(isl.isl_union_pw_multi_aff_copy(arg0.ptr))
80         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
81         return obj
82     def as_pw_multi_aff(arg0):
83         try:
84             if not arg0.__class__ is union_pw_multi_aff:
85                 arg0 = union_pw_multi_aff(arg0)
86         except:
87             raise
88         ctx = arg0.ctx
89         res = isl.isl_union_pw_multi_aff_as_pw_multi_aff(isl.isl_union_pw_multi_aff_copy(arg0.ptr))
90         obj = pw_multi_aff(ctx=ctx, ptr=res)
91         return obj
92     def as_union_map(arg0):
93         try:
94             if not arg0.__class__ is union_pw_multi_aff:
95                 arg0 = union_pw_multi_aff(arg0)
96         except:
97             raise
98         ctx = arg0.ctx
99         res = isl.isl_union_pw_multi_aff_as_union_map(isl.isl_union_pw_multi_aff_copy(arg0.ptr))
100         obj = union_map(ctx=ctx, ptr=res)
101         return obj
102     def coalesce(arg0):
103         try:
104             if not arg0.__class__ is union_pw_multi_aff:
105                 arg0 = union_pw_multi_aff(arg0)
106         except:
107             raise
108         ctx = arg0.ctx
109         res = isl.isl_union_pw_multi_aff_coalesce(isl.isl_union_pw_multi_aff_copy(arg0.ptr))
110         obj = union_pw_multi_aff(ctx=ctx, ptr=res)
111         return obj
112     def domain(arg0):
113         try:
114             if not arg0.__class__ is union_pw_multi_aff:
115                 arg0 = union_pw_multi_aff(arg0)
116         except:
117             raise
118         ctx = arg0.ctx
119         res = isl.isl_union_pw_multi_aff_domain(isl.isl_union_pw_multi_aff_copy(arg0.ptr))
120         obj = union_set(ctx=ctx, ptr=res)
121         return obj
122     def drop_unused_params(arg0):
123         try:
124             if not arg0.__class__ is union_pw_multi_aff:
125                 arg0 = union_pw_multi_aff(arg0)
126         except:
127             raise
128         ctx = arg0.ctx
129         res = isl.isl_union_pw_multi_aff_drop_unused_params(isl.isl_union_pw_multi_aff_copy(arg0.ptr))
130         obj = union_pw_multi_aff(ctx=ctx, ptr=res)
131         return obj
132     @staticmethod
133     def empty(*args):
134         if len(args) == 0:
135             ctx = Context.getDefaultInstance()
136             res = isl.isl_union_pw_multi_aff_empty_ctx(ctx)
137             obj = union_pw_multi_aff(ctx=ctx, ptr=res)
138             return obj
139         raise Error
140     def extract_pw_multi_aff(arg0, arg1):
141         try:
142             if not arg0.__class__ is union_pw_multi_aff:
143                 arg0 = union_pw_multi_aff(arg0)
144         except:
145             raise
146         try:
147             if not arg1.__class__ is space:
148                 arg1 = space(arg1)
149         except:
150             raise
151         ctx = arg0.ctx
152         res = isl.isl_union_pw_multi_aff_extract_pw_multi_aff(arg0.ptr, isl.isl_space_copy(arg1.ptr))
153         obj = pw_multi_aff(ctx=ctx, ptr=res)
154         return obj
155     def flat_range_product(arg0, arg1):
156         try:
157             if not arg0.__class__ is union_pw_multi_aff:
158                 arg0 = union_pw_multi_aff(arg0)
159         except:
160             raise
161         try:
162             if not arg1.__class__ is union_pw_multi_aff:
163                 arg1 = union_pw_multi_aff(arg1)
164         except:
165             raise
166         ctx = arg0.ctx
167         res = isl.isl_union_pw_multi_aff_flat_range_product(isl.isl_union_pw_multi_aff_copy(arg0.ptr), isl.isl_union_pw_multi_aff_copy(arg1.ptr))
168         obj = union_pw_multi_aff(ctx=ctx, ptr=res)
169         return obj
170     def gist(arg0, arg1):
171         try:
172             if not arg0.__class__ is union_pw_multi_aff:
173                 arg0 = union_pw_multi_aff(arg0)
174         except:
175             raise
176         try:
177             if not arg1.__class__ is union_set:
178                 arg1 = union_set(arg1)
179         except:
180             raise
181         ctx = arg0.ctx
182         res = isl.isl_union_pw_multi_aff_gist(isl.isl_union_pw_multi_aff_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
183         obj = union_pw_multi_aff(ctx=ctx, ptr=res)
184         return obj
185     def intersect_domain(*args):
186         if len(args) == 2 and args[1].__class__ is space:
187             args = list(args)
188             try:
189                 if not args[0].__class__ is union_pw_multi_aff:
190                     args[0] = union_pw_multi_aff(args[0])
191             except:
192                 raise
193             ctx = args[0].ctx
194             res = isl.isl_union_pw_multi_aff_intersect_domain_space(isl.isl_union_pw_multi_aff_copy(args[0].ptr), isl.isl_space_copy(args[1].ptr))
195             obj = union_pw_multi_aff(ctx=ctx, ptr=res)
196             return obj
197         if len(args) == 2 and args[1].__class__ is union_set:
198             args = list(args)
199             try:
200                 if not args[0].__class__ is union_pw_multi_aff:
201                     args[0] = union_pw_multi_aff(args[0])
202             except:
203                 raise
204             ctx = args[0].ctx
205             res = isl.isl_union_pw_multi_aff_intersect_domain_union_set(isl.isl_union_pw_multi_aff_copy(args[0].ptr), isl.isl_union_set_copy(args[1].ptr))
206             obj = union_pw_multi_aff(ctx=ctx, ptr=res)
207             return obj
208         raise Error
209     def intersect_domain_wrapped_domain(arg0, arg1):
210         try:
211             if not arg0.__class__ is union_pw_multi_aff:
212                 arg0 = union_pw_multi_aff(arg0)
213         except:
214             raise
215         try:
216             if not arg1.__class__ is union_set:
217                 arg1 = union_set(arg1)
218         except:
219             raise
220         ctx = arg0.ctx
221         res = isl.isl_union_pw_multi_aff_intersect_domain_wrapped_domain(isl.isl_union_pw_multi_aff_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
222         obj = union_pw_multi_aff(ctx=ctx, ptr=res)
223         return obj
224     def intersect_domain_wrapped_range(arg0, arg1):
225         try:
226             if not arg0.__class__ is union_pw_multi_aff:
227                 arg0 = union_pw_multi_aff(arg0)
228         except:
229             raise
230         try:
231             if not arg1.__class__ is union_set:
232                 arg1 = union_set(arg1)
233         except:
234             raise
235         ctx = arg0.ctx
236         res = isl.isl_union_pw_multi_aff_intersect_domain_wrapped_range(isl.isl_union_pw_multi_aff_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
237         obj = union_pw_multi_aff(ctx=ctx, ptr=res)
238         return obj
239     def intersect_params(arg0, arg1):
240         try:
241             if not arg0.__class__ is union_pw_multi_aff:
242                 arg0 = union_pw_multi_aff(arg0)
243         except:
244             raise
245         try:
246             if not arg1.__class__ is set:
247                 arg1 = set(arg1)
248         except:
249             raise
250         ctx = arg0.ctx
251         res = isl.isl_union_pw_multi_aff_intersect_params(isl.isl_union_pw_multi_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
252         obj = union_pw_multi_aff(ctx=ctx, ptr=res)
253         return obj
254     def involves_locals(arg0):
255         try:
256             if not arg0.__class__ is union_pw_multi_aff:
257                 arg0 = union_pw_multi_aff(arg0)
258         except:
259             raise
260         ctx = arg0.ctx
261         res = isl.isl_union_pw_multi_aff_involves_locals(arg0.ptr)
262         if res < 0:
263             raise Error
264         return bool(res)
265     def isa_pw_multi_aff(arg0):
266         try:
267             if not arg0.__class__ is union_pw_multi_aff:
268                 arg0 = union_pw_multi_aff(arg0)
269         except:
270             raise
271         ctx = arg0.ctx
272         res = isl.isl_union_pw_multi_aff_isa_pw_multi_aff(arg0.ptr)
273         if res < 0:
274             raise Error
275         return bool(res)
276     def plain_is_empty(arg0):
277         try:
278             if not arg0.__class__ is union_pw_multi_aff:
279                 arg0 = union_pw_multi_aff(arg0)
280         except:
281             raise
282         ctx = arg0.ctx
283         res = isl.isl_union_pw_multi_aff_plain_is_empty(arg0.ptr)
284         if res < 0:
285             raise Error
286         return bool(res)
287     def plain_is_equal(arg0, arg1):
288         try:
289             if not arg0.__class__ is union_pw_multi_aff:
290                 arg0 = union_pw_multi_aff(arg0)
291         except:
292             raise
293         try:
294             if not arg1.__class__ is union_pw_multi_aff:
295                 arg1 = union_pw_multi_aff(arg1)
296         except:
297             raise
298         ctx = arg0.ctx
299         res = isl.isl_union_pw_multi_aff_plain_is_equal(arg0.ptr, arg1.ptr)
300         if res < 0:
301             raise Error
302         return bool(res)
303     def preimage_domain_wrapped_domain(*args):
304         if len(args) == 2 and args[1].__class__ is union_pw_multi_aff:
305             args = list(args)
306             try:
307                 if not args[0].__class__ is union_pw_multi_aff:
308                     args[0] = union_pw_multi_aff(args[0])
309             except:
310                 raise
311             ctx = args[0].ctx
312             res = isl.isl_union_pw_multi_aff_preimage_domain_wrapped_domain_union_pw_multi_aff(isl.isl_union_pw_multi_aff_copy(args[0].ptr), isl.isl_union_pw_multi_aff_copy(args[1].ptr))
313             obj = union_pw_multi_aff(ctx=ctx, ptr=res)
314             return obj
315         raise Error
316     def pullback(*args):
317         if len(args) == 2 and args[1].__class__ is union_pw_multi_aff:
318             args = list(args)
319             try:
320                 if not args[0].__class__ is union_pw_multi_aff:
321                     args[0] = union_pw_multi_aff(args[0])
322             except:
323                 raise
324             ctx = args[0].ctx
325             res = isl.isl_union_pw_multi_aff_pullback_union_pw_multi_aff(isl.isl_union_pw_multi_aff_copy(args[0].ptr), isl.isl_union_pw_multi_aff_copy(args[1].ptr))
326             obj = union_pw_multi_aff(ctx=ctx, ptr=res)
327             return obj
328         raise Error
329     def pw_multi_aff_list(arg0):
330         try:
331             if not arg0.__class__ is union_pw_multi_aff:
332                 arg0 = union_pw_multi_aff(arg0)
333         except:
334             raise
335         ctx = arg0.ctx
336         res = isl.isl_union_pw_multi_aff_get_pw_multi_aff_list(arg0.ptr)
337         obj = pw_multi_aff_list(ctx=ctx, ptr=res)
338         return obj
339     def get_pw_multi_aff_list(arg0):
340         return arg0.pw_multi_aff_list()
341     def range_factor_domain(arg0):
342         try:
343             if not arg0.__class__ is union_pw_multi_aff:
344                 arg0 = union_pw_multi_aff(arg0)
345         except:
346             raise
347         ctx = arg0.ctx
348         res = isl.isl_union_pw_multi_aff_range_factor_domain(isl.isl_union_pw_multi_aff_copy(arg0.ptr))
349         obj = union_pw_multi_aff(ctx=ctx, ptr=res)
350         return obj
351     def range_factor_range(arg0):
352         try:
353             if not arg0.__class__ is union_pw_multi_aff:
354                 arg0 = union_pw_multi_aff(arg0)
355         except:
356             raise
357         ctx = arg0.ctx
358         res = isl.isl_union_pw_multi_aff_range_factor_range(isl.isl_union_pw_multi_aff_copy(arg0.ptr))
359         obj = union_pw_multi_aff(ctx=ctx, ptr=res)
360         return obj
361     def range_product(arg0, arg1):
362         try:
363             if not arg0.__class__ is union_pw_multi_aff:
364                 arg0 = union_pw_multi_aff(arg0)
365         except:
366             raise
367         try:
368             if not arg1.__class__ is union_pw_multi_aff:
369                 arg1 = union_pw_multi_aff(arg1)
370         except:
371             raise
372         ctx = arg0.ctx
373         res = isl.isl_union_pw_multi_aff_range_product(isl.isl_union_pw_multi_aff_copy(arg0.ptr), isl.isl_union_pw_multi_aff_copy(arg1.ptr))
374         obj = union_pw_multi_aff(ctx=ctx, ptr=res)
375         return obj
376     def space(arg0):
377         try:
378             if not arg0.__class__ is union_pw_multi_aff:
379                 arg0 = union_pw_multi_aff(arg0)
380         except:
381             raise
382         ctx = arg0.ctx
383         res = isl.isl_union_pw_multi_aff_get_space(arg0.ptr)
384         obj = space(ctx=ctx, ptr=res)
385         return obj
386     def get_space(arg0):
387         return arg0.space()
388     def sub(arg0, arg1):
389         try:
390             if not arg0.__class__ is union_pw_multi_aff:
391                 arg0 = union_pw_multi_aff(arg0)
392         except:
393             raise
394         try:
395             if not arg1.__class__ is union_pw_multi_aff:
396                 arg1 = union_pw_multi_aff(arg1)
397         except:
398             raise
399         ctx = arg0.ctx
400         res = isl.isl_union_pw_multi_aff_sub(isl.isl_union_pw_multi_aff_copy(arg0.ptr), isl.isl_union_pw_multi_aff_copy(arg1.ptr))
401         obj = union_pw_multi_aff(ctx=ctx, ptr=res)
402         return obj
403     def subtract_domain(*args):
404         if len(args) == 2 and args[1].__class__ is space:
405             args = list(args)
406             try:
407                 if not args[0].__class__ is union_pw_multi_aff:
408                     args[0] = union_pw_multi_aff(args[0])
409             except:
410                 raise
411             ctx = args[0].ctx
412             res = isl.isl_union_pw_multi_aff_subtract_domain_space(isl.isl_union_pw_multi_aff_copy(args[0].ptr), isl.isl_space_copy(args[1].ptr))
413             obj = union_pw_multi_aff(ctx=ctx, ptr=res)
414             return obj
415         if len(args) == 2 and args[1].__class__ is union_set:
416             args = list(args)
417             try:
418                 if not args[0].__class__ is union_pw_multi_aff:
419                     args[0] = union_pw_multi_aff(args[0])
420             except:
421                 raise
422             ctx = args[0].ctx
423             res = isl.isl_union_pw_multi_aff_subtract_domain_union_set(isl.isl_union_pw_multi_aff_copy(args[0].ptr), isl.isl_union_set_copy(args[1].ptr))
424             obj = union_pw_multi_aff(ctx=ctx, ptr=res)
425             return obj
426         raise Error
427     def union_add(arg0, arg1):
428         try:
429             if not arg0.__class__ is union_pw_multi_aff:
430                 arg0 = union_pw_multi_aff(arg0)
431         except:
432             raise
433         try:
434             if not arg1.__class__ is union_pw_multi_aff:
435                 arg1 = union_pw_multi_aff(arg1)
436         except:
437             raise
438         ctx = arg0.ctx
439         res = isl.isl_union_pw_multi_aff_union_add(isl.isl_union_pw_multi_aff_copy(arg0.ptr), isl.isl_union_pw_multi_aff_copy(arg1.ptr))
440         obj = union_pw_multi_aff(ctx=ctx, ptr=res)
441         return obj
443 isl.isl_union_pw_multi_aff_from_multi_aff.restype = c_void_p
444 isl.isl_union_pw_multi_aff_from_multi_aff.argtypes = [c_void_p]
445 isl.isl_union_pw_multi_aff_from_pw_multi_aff.restype = c_void_p
446 isl.isl_union_pw_multi_aff_from_pw_multi_aff.argtypes = [c_void_p]
447 isl.isl_union_pw_multi_aff_from_union_pw_aff.restype = c_void_p
448 isl.isl_union_pw_multi_aff_from_union_pw_aff.argtypes = [c_void_p]
449 isl.isl_union_pw_multi_aff_read_from_str.restype = c_void_p
450 isl.isl_union_pw_multi_aff_read_from_str.argtypes = [Context, c_char_p]
451 isl.isl_union_pw_multi_aff_add.restype = c_void_p
452 isl.isl_union_pw_multi_aff_add.argtypes = [c_void_p, c_void_p]
453 isl.isl_union_pw_multi_aff_apply_union_pw_multi_aff.restype = c_void_p
454 isl.isl_union_pw_multi_aff_apply_union_pw_multi_aff.argtypes = [c_void_p, c_void_p]
455 isl.isl_union_pw_multi_aff_as_multi_union_pw_aff.restype = c_void_p
456 isl.isl_union_pw_multi_aff_as_multi_union_pw_aff.argtypes = [c_void_p]
457 isl.isl_union_pw_multi_aff_as_pw_multi_aff.restype = c_void_p
458 isl.isl_union_pw_multi_aff_as_pw_multi_aff.argtypes = [c_void_p]
459 isl.isl_union_pw_multi_aff_as_union_map.restype = c_void_p
460 isl.isl_union_pw_multi_aff_as_union_map.argtypes = [c_void_p]
461 isl.isl_union_pw_multi_aff_coalesce.restype = c_void_p
462 isl.isl_union_pw_multi_aff_coalesce.argtypes = [c_void_p]
463 isl.isl_union_pw_multi_aff_domain.restype = c_void_p
464 isl.isl_union_pw_multi_aff_domain.argtypes = [c_void_p]
465 isl.isl_union_pw_multi_aff_drop_unused_params.restype = c_void_p
466 isl.isl_union_pw_multi_aff_drop_unused_params.argtypes = [c_void_p]
467 isl.isl_union_pw_multi_aff_empty_ctx.restype = c_void_p
468 isl.isl_union_pw_multi_aff_empty_ctx.argtypes = [Context]
469 isl.isl_union_pw_multi_aff_extract_pw_multi_aff.restype = c_void_p
470 isl.isl_union_pw_multi_aff_extract_pw_multi_aff.argtypes = [c_void_p, c_void_p]
471 isl.isl_union_pw_multi_aff_flat_range_product.restype = c_void_p
472 isl.isl_union_pw_multi_aff_flat_range_product.argtypes = [c_void_p, c_void_p]
473 isl.isl_union_pw_multi_aff_gist.restype = c_void_p
474 isl.isl_union_pw_multi_aff_gist.argtypes = [c_void_p, c_void_p]
475 isl.isl_union_pw_multi_aff_intersect_domain_space.restype = c_void_p
476 isl.isl_union_pw_multi_aff_intersect_domain_space.argtypes = [c_void_p, c_void_p]
477 isl.isl_union_pw_multi_aff_intersect_domain_union_set.restype = c_void_p
478 isl.isl_union_pw_multi_aff_intersect_domain_union_set.argtypes = [c_void_p, c_void_p]
479 isl.isl_union_pw_multi_aff_intersect_domain_wrapped_domain.restype = c_void_p
480 isl.isl_union_pw_multi_aff_intersect_domain_wrapped_domain.argtypes = [c_void_p, c_void_p]
481 isl.isl_union_pw_multi_aff_intersect_domain_wrapped_range.restype = c_void_p
482 isl.isl_union_pw_multi_aff_intersect_domain_wrapped_range.argtypes = [c_void_p, c_void_p]
483 isl.isl_union_pw_multi_aff_intersect_params.restype = c_void_p
484 isl.isl_union_pw_multi_aff_intersect_params.argtypes = [c_void_p, c_void_p]
485 isl.isl_union_pw_multi_aff_involves_locals.argtypes = [c_void_p]
486 isl.isl_union_pw_multi_aff_isa_pw_multi_aff.argtypes = [c_void_p]
487 isl.isl_union_pw_multi_aff_plain_is_empty.argtypes = [c_void_p]
488 isl.isl_union_pw_multi_aff_plain_is_equal.argtypes = [c_void_p, c_void_p]
489 isl.isl_union_pw_multi_aff_preimage_domain_wrapped_domain_union_pw_multi_aff.restype = c_void_p
490 isl.isl_union_pw_multi_aff_preimage_domain_wrapped_domain_union_pw_multi_aff.argtypes = [c_void_p, c_void_p]
491 isl.isl_union_pw_multi_aff_pullback_union_pw_multi_aff.restype = c_void_p
492 isl.isl_union_pw_multi_aff_pullback_union_pw_multi_aff.argtypes = [c_void_p, c_void_p]
493 isl.isl_union_pw_multi_aff_get_pw_multi_aff_list.restype = c_void_p
494 isl.isl_union_pw_multi_aff_get_pw_multi_aff_list.argtypes = [c_void_p]
495 isl.isl_union_pw_multi_aff_range_factor_domain.restype = c_void_p
496 isl.isl_union_pw_multi_aff_range_factor_domain.argtypes = [c_void_p]
497 isl.isl_union_pw_multi_aff_range_factor_range.restype = c_void_p
498 isl.isl_union_pw_multi_aff_range_factor_range.argtypes = [c_void_p]
499 isl.isl_union_pw_multi_aff_range_product.restype = c_void_p
500 isl.isl_union_pw_multi_aff_range_product.argtypes = [c_void_p, c_void_p]
501 isl.isl_union_pw_multi_aff_get_space.restype = c_void_p
502 isl.isl_union_pw_multi_aff_get_space.argtypes = [c_void_p]
503 isl.isl_union_pw_multi_aff_sub.restype = c_void_p
504 isl.isl_union_pw_multi_aff_sub.argtypes = [c_void_p, c_void_p]
505 isl.isl_union_pw_multi_aff_subtract_domain_space.restype = c_void_p
506 isl.isl_union_pw_multi_aff_subtract_domain_space.argtypes = [c_void_p, c_void_p]
507 isl.isl_union_pw_multi_aff_subtract_domain_union_set.restype = c_void_p
508 isl.isl_union_pw_multi_aff_subtract_domain_union_set.argtypes = [c_void_p, c_void_p]
509 isl.isl_union_pw_multi_aff_union_add.restype = c_void_p
510 isl.isl_union_pw_multi_aff_union_add.argtypes = [c_void_p, c_void_p]
511 isl.isl_union_pw_multi_aff_copy.restype = c_void_p
512 isl.isl_union_pw_multi_aff_copy.argtypes = [c_void_p]
513 isl.isl_union_pw_multi_aff_free.restype = c_void_p
514 isl.isl_union_pw_multi_aff_free.argtypes = [c_void_p]
515 isl.isl_union_pw_multi_aff_to_str.restype = POINTER(c_char)
516 isl.isl_union_pw_multi_aff_to_str.argtypes = [c_void_p]
518 class multi_union_pw_aff(object):
519     def __init__(self, *args, **keywords):
520         if "ptr" in keywords:
521             self.ctx = keywords["ctx"]
522             self.ptr = keywords["ptr"]
523             return
524         if len(args) == 1 and args[0].__class__ is multi_pw_aff:
525             self.ctx = Context.getDefaultInstance()
526             self.ptr = isl.isl_multi_union_pw_aff_from_multi_pw_aff(isl.isl_multi_pw_aff_copy(args[0].ptr))
527             return
528         if len(args) == 1 and args[0].__class__ is union_pw_aff:
529             self.ctx = Context.getDefaultInstance()
530             self.ptr = isl.isl_multi_union_pw_aff_from_union_pw_aff(isl.isl_union_pw_aff_copy(args[0].ptr))
531             return
532         if len(args) == 2 and args[0].__class__ is space and args[1].__class__ is union_pw_aff_list:
533             self.ctx = Context.getDefaultInstance()
534             self.ptr = isl.isl_multi_union_pw_aff_from_union_pw_aff_list(isl.isl_space_copy(args[0].ptr), isl.isl_union_pw_aff_list_copy(args[1].ptr))
535             return
536         if len(args) == 1 and type(args[0]) == str:
537             self.ctx = Context.getDefaultInstance()
538             self.ptr = isl.isl_multi_union_pw_aff_read_from_str(self.ctx, args[0].encode('ascii'))
539             return
540         raise Error
541     def __del__(self):
542         if hasattr(self, 'ptr'):
543             isl.isl_multi_union_pw_aff_free(self.ptr)
544     def __str__(arg0):
545         try:
546             if not arg0.__class__ is multi_union_pw_aff:
547                 arg0 = multi_union_pw_aff(arg0)
548         except:
549             raise
550         ptr = isl.isl_multi_union_pw_aff_to_str(arg0.ptr)
551         res = cast(ptr, c_char_p).value.decode('ascii')
552         libc.free(ptr)
553         return res
554     def __repr__(self):
555         s = str(self)
556         if '"' in s:
557             return 'isl.multi_union_pw_aff("""%s""")' % s
558         else:
559             return 'isl.multi_union_pw_aff("%s")' % s
560     def add(arg0, arg1):
561         try:
562             if not arg0.__class__ is multi_union_pw_aff:
563                 arg0 = multi_union_pw_aff(arg0)
564         except:
565             raise
566         try:
567             if not arg1.__class__ is multi_union_pw_aff:
568                 arg1 = multi_union_pw_aff(arg1)
569         except:
570             raise
571         ctx = arg0.ctx
572         res = isl.isl_multi_union_pw_aff_add(isl.isl_multi_union_pw_aff_copy(arg0.ptr), isl.isl_multi_union_pw_aff_copy(arg1.ptr))
573         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
574         return obj
575     def at(arg0, arg1):
576         try:
577             if not arg0.__class__ is multi_union_pw_aff:
578                 arg0 = multi_union_pw_aff(arg0)
579         except:
580             raise
581         ctx = arg0.ctx
582         res = isl.isl_multi_union_pw_aff_get_at(arg0.ptr, arg1)
583         obj = union_pw_aff(ctx=ctx, ptr=res)
584         return obj
585     def get_at(arg0, arg1):
586         return arg0.at(arg1)
587     def bind(arg0, arg1):
588         try:
589             if not arg0.__class__ is multi_union_pw_aff:
590                 arg0 = multi_union_pw_aff(arg0)
591         except:
592             raise
593         try:
594             if not arg1.__class__ is multi_id:
595                 arg1 = multi_id(arg1)
596         except:
597             raise
598         ctx = arg0.ctx
599         res = isl.isl_multi_union_pw_aff_bind(isl.isl_multi_union_pw_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
600         obj = union_set(ctx=ctx, ptr=res)
601         return obj
602     def coalesce(arg0):
603         try:
604             if not arg0.__class__ is multi_union_pw_aff:
605                 arg0 = multi_union_pw_aff(arg0)
606         except:
607             raise
608         ctx = arg0.ctx
609         res = isl.isl_multi_union_pw_aff_coalesce(isl.isl_multi_union_pw_aff_copy(arg0.ptr))
610         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
611         return obj
612     def domain(arg0):
613         try:
614             if not arg0.__class__ is multi_union_pw_aff:
615                 arg0 = multi_union_pw_aff(arg0)
616         except:
617             raise
618         ctx = arg0.ctx
619         res = isl.isl_multi_union_pw_aff_domain(isl.isl_multi_union_pw_aff_copy(arg0.ptr))
620         obj = union_set(ctx=ctx, ptr=res)
621         return obj
622     def flat_range_product(arg0, arg1):
623         try:
624             if not arg0.__class__ is multi_union_pw_aff:
625                 arg0 = multi_union_pw_aff(arg0)
626         except:
627             raise
628         try:
629             if not arg1.__class__ is multi_union_pw_aff:
630                 arg1 = multi_union_pw_aff(arg1)
631         except:
632             raise
633         ctx = arg0.ctx
634         res = isl.isl_multi_union_pw_aff_flat_range_product(isl.isl_multi_union_pw_aff_copy(arg0.ptr), isl.isl_multi_union_pw_aff_copy(arg1.ptr))
635         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
636         return obj
637     def gist(arg0, arg1):
638         try:
639             if not arg0.__class__ is multi_union_pw_aff:
640                 arg0 = multi_union_pw_aff(arg0)
641         except:
642             raise
643         try:
644             if not arg1.__class__ is union_set:
645                 arg1 = union_set(arg1)
646         except:
647             raise
648         ctx = arg0.ctx
649         res = isl.isl_multi_union_pw_aff_gist(isl.isl_multi_union_pw_aff_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
650         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
651         return obj
652     def gist_params(arg0, arg1):
653         try:
654             if not arg0.__class__ is multi_union_pw_aff:
655                 arg0 = multi_union_pw_aff(arg0)
656         except:
657             raise
658         try:
659             if not arg1.__class__ is set:
660                 arg1 = set(arg1)
661         except:
662             raise
663         ctx = arg0.ctx
664         res = isl.isl_multi_union_pw_aff_gist_params(isl.isl_multi_union_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
665         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
666         return obj
667     def has_range_tuple_id(arg0):
668         try:
669             if not arg0.__class__ is multi_union_pw_aff:
670                 arg0 = multi_union_pw_aff(arg0)
671         except:
672             raise
673         ctx = arg0.ctx
674         res = isl.isl_multi_union_pw_aff_has_range_tuple_id(arg0.ptr)
675         if res < 0:
676             raise Error
677         return bool(res)
678     def intersect_domain(arg0, arg1):
679         try:
680             if not arg0.__class__ is multi_union_pw_aff:
681                 arg0 = multi_union_pw_aff(arg0)
682         except:
683             raise
684         try:
685             if not arg1.__class__ is union_set:
686                 arg1 = union_set(arg1)
687         except:
688             raise
689         ctx = arg0.ctx
690         res = isl.isl_multi_union_pw_aff_intersect_domain(isl.isl_multi_union_pw_aff_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
691         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
692         return obj
693     def intersect_params(arg0, arg1):
694         try:
695             if not arg0.__class__ is multi_union_pw_aff:
696                 arg0 = multi_union_pw_aff(arg0)
697         except:
698             raise
699         try:
700             if not arg1.__class__ is set:
701                 arg1 = set(arg1)
702         except:
703             raise
704         ctx = arg0.ctx
705         res = isl.isl_multi_union_pw_aff_intersect_params(isl.isl_multi_union_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
706         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
707         return obj
708     def involves_nan(arg0):
709         try:
710             if not arg0.__class__ is multi_union_pw_aff:
711                 arg0 = multi_union_pw_aff(arg0)
712         except:
713             raise
714         ctx = arg0.ctx
715         res = isl.isl_multi_union_pw_aff_involves_nan(arg0.ptr)
716         if res < 0:
717             raise Error
718         return bool(res)
719     def list(arg0):
720         try:
721             if not arg0.__class__ is multi_union_pw_aff:
722                 arg0 = multi_union_pw_aff(arg0)
723         except:
724             raise
725         ctx = arg0.ctx
726         res = isl.isl_multi_union_pw_aff_get_list(arg0.ptr)
727         obj = union_pw_aff_list(ctx=ctx, ptr=res)
728         return obj
729     def get_list(arg0):
730         return arg0.list()
731     def neg(arg0):
732         try:
733             if not arg0.__class__ is multi_union_pw_aff:
734                 arg0 = multi_union_pw_aff(arg0)
735         except:
736             raise
737         ctx = arg0.ctx
738         res = isl.isl_multi_union_pw_aff_neg(isl.isl_multi_union_pw_aff_copy(arg0.ptr))
739         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
740         return obj
741     def plain_is_equal(arg0, arg1):
742         try:
743             if not arg0.__class__ is multi_union_pw_aff:
744                 arg0 = multi_union_pw_aff(arg0)
745         except:
746             raise
747         try:
748             if not arg1.__class__ is multi_union_pw_aff:
749                 arg1 = multi_union_pw_aff(arg1)
750         except:
751             raise
752         ctx = arg0.ctx
753         res = isl.isl_multi_union_pw_aff_plain_is_equal(arg0.ptr, arg1.ptr)
754         if res < 0:
755             raise Error
756         return bool(res)
757     def pullback(*args):
758         if len(args) == 2 and args[1].__class__ is union_pw_multi_aff:
759             args = list(args)
760             try:
761                 if not args[0].__class__ is multi_union_pw_aff:
762                     args[0] = multi_union_pw_aff(args[0])
763             except:
764                 raise
765             ctx = args[0].ctx
766             res = isl.isl_multi_union_pw_aff_pullback_union_pw_multi_aff(isl.isl_multi_union_pw_aff_copy(args[0].ptr), isl.isl_union_pw_multi_aff_copy(args[1].ptr))
767             obj = multi_union_pw_aff(ctx=ctx, ptr=res)
768             return obj
769         raise Error
770     def range_product(arg0, arg1):
771         try:
772             if not arg0.__class__ is multi_union_pw_aff:
773                 arg0 = multi_union_pw_aff(arg0)
774         except:
775             raise
776         try:
777             if not arg1.__class__ is multi_union_pw_aff:
778                 arg1 = multi_union_pw_aff(arg1)
779         except:
780             raise
781         ctx = arg0.ctx
782         res = isl.isl_multi_union_pw_aff_range_product(isl.isl_multi_union_pw_aff_copy(arg0.ptr), isl.isl_multi_union_pw_aff_copy(arg1.ptr))
783         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
784         return obj
785     def range_tuple_id(arg0):
786         try:
787             if not arg0.__class__ is multi_union_pw_aff:
788                 arg0 = multi_union_pw_aff(arg0)
789         except:
790             raise
791         ctx = arg0.ctx
792         res = isl.isl_multi_union_pw_aff_get_range_tuple_id(arg0.ptr)
793         obj = id(ctx=ctx, ptr=res)
794         return obj
795     def get_range_tuple_id(arg0):
796         return arg0.range_tuple_id()
797     def reset_range_tuple_id(arg0):
798         try:
799             if not arg0.__class__ is multi_union_pw_aff:
800                 arg0 = multi_union_pw_aff(arg0)
801         except:
802             raise
803         ctx = arg0.ctx
804         res = isl.isl_multi_union_pw_aff_reset_range_tuple_id(isl.isl_multi_union_pw_aff_copy(arg0.ptr))
805         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
806         return obj
807     def scale(*args):
808         if len(args) == 2 and args[1].__class__ is multi_val:
809             args = list(args)
810             try:
811                 if not args[0].__class__ is multi_union_pw_aff:
812                     args[0] = multi_union_pw_aff(args[0])
813             except:
814                 raise
815             ctx = args[0].ctx
816             res = isl.isl_multi_union_pw_aff_scale_multi_val(isl.isl_multi_union_pw_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
817             obj = multi_union_pw_aff(ctx=ctx, ptr=res)
818             return obj
819         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
820             args = list(args)
821             try:
822                 if not args[0].__class__ is multi_union_pw_aff:
823                     args[0] = multi_union_pw_aff(args[0])
824             except:
825                 raise
826             try:
827                 if not args[1].__class__ is val:
828                     args[1] = val(args[1])
829             except:
830                 raise
831             ctx = args[0].ctx
832             res = isl.isl_multi_union_pw_aff_scale_val(isl.isl_multi_union_pw_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
833             obj = multi_union_pw_aff(ctx=ctx, ptr=res)
834             return obj
835         raise Error
836     def scale_down(*args):
837         if len(args) == 2 and args[1].__class__ is multi_val:
838             args = list(args)
839             try:
840                 if not args[0].__class__ is multi_union_pw_aff:
841                     args[0] = multi_union_pw_aff(args[0])
842             except:
843                 raise
844             ctx = args[0].ctx
845             res = isl.isl_multi_union_pw_aff_scale_down_multi_val(isl.isl_multi_union_pw_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
846             obj = multi_union_pw_aff(ctx=ctx, ptr=res)
847             return obj
848         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
849             args = list(args)
850             try:
851                 if not args[0].__class__ is multi_union_pw_aff:
852                     args[0] = multi_union_pw_aff(args[0])
853             except:
854                 raise
855             try:
856                 if not args[1].__class__ is val:
857                     args[1] = val(args[1])
858             except:
859                 raise
860             ctx = args[0].ctx
861             res = isl.isl_multi_union_pw_aff_scale_down_val(isl.isl_multi_union_pw_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
862             obj = multi_union_pw_aff(ctx=ctx, ptr=res)
863             return obj
864         raise Error
865     def set_at(arg0, arg1, arg2):
866         try:
867             if not arg0.__class__ is multi_union_pw_aff:
868                 arg0 = multi_union_pw_aff(arg0)
869         except:
870             raise
871         try:
872             if not arg2.__class__ is union_pw_aff:
873                 arg2 = union_pw_aff(arg2)
874         except:
875             raise
876         ctx = arg0.ctx
877         res = isl.isl_multi_union_pw_aff_set_at(isl.isl_multi_union_pw_aff_copy(arg0.ptr), arg1, isl.isl_union_pw_aff_copy(arg2.ptr))
878         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
879         return obj
880     def set_range_tuple(*args):
881         if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
882             args = list(args)
883             try:
884                 if not args[0].__class__ is multi_union_pw_aff:
885                     args[0] = multi_union_pw_aff(args[0])
886             except:
887                 raise
888             try:
889                 if not args[1].__class__ is id:
890                     args[1] = id(args[1])
891             except:
892                 raise
893             ctx = args[0].ctx
894             res = isl.isl_multi_union_pw_aff_set_range_tuple_id(isl.isl_multi_union_pw_aff_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
895             obj = multi_union_pw_aff(ctx=ctx, ptr=res)
896             return obj
897         raise Error
898     def size(arg0):
899         try:
900             if not arg0.__class__ is multi_union_pw_aff:
901                 arg0 = multi_union_pw_aff(arg0)
902         except:
903             raise
904         ctx = arg0.ctx
905         res = isl.isl_multi_union_pw_aff_size(arg0.ptr)
906         if res < 0:
907             raise Error
908         return int(res)
909     def space(arg0):
910         try:
911             if not arg0.__class__ is multi_union_pw_aff:
912                 arg0 = multi_union_pw_aff(arg0)
913         except:
914             raise
915         ctx = arg0.ctx
916         res = isl.isl_multi_union_pw_aff_get_space(arg0.ptr)
917         obj = space(ctx=ctx, ptr=res)
918         return obj
919     def get_space(arg0):
920         return arg0.space()
921     def sub(arg0, arg1):
922         try:
923             if not arg0.__class__ is multi_union_pw_aff:
924                 arg0 = multi_union_pw_aff(arg0)
925         except:
926             raise
927         try:
928             if not arg1.__class__ is multi_union_pw_aff:
929                 arg1 = multi_union_pw_aff(arg1)
930         except:
931             raise
932         ctx = arg0.ctx
933         res = isl.isl_multi_union_pw_aff_sub(isl.isl_multi_union_pw_aff_copy(arg0.ptr), isl.isl_multi_union_pw_aff_copy(arg1.ptr))
934         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
935         return obj
936     def union_add(arg0, arg1):
937         try:
938             if not arg0.__class__ is multi_union_pw_aff:
939                 arg0 = multi_union_pw_aff(arg0)
940         except:
941             raise
942         try:
943             if not arg1.__class__ is multi_union_pw_aff:
944                 arg1 = multi_union_pw_aff(arg1)
945         except:
946             raise
947         ctx = arg0.ctx
948         res = isl.isl_multi_union_pw_aff_union_add(isl.isl_multi_union_pw_aff_copy(arg0.ptr), isl.isl_multi_union_pw_aff_copy(arg1.ptr))
949         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
950         return obj
951     @staticmethod
952     def zero(arg0):
953         try:
954             if not arg0.__class__ is space:
955                 arg0 = space(arg0)
956         except:
957             raise
958         ctx = arg0.ctx
959         res = isl.isl_multi_union_pw_aff_zero(isl.isl_space_copy(arg0.ptr))
960         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
961         return obj
963 isl.isl_multi_union_pw_aff_from_multi_pw_aff.restype = c_void_p
964 isl.isl_multi_union_pw_aff_from_multi_pw_aff.argtypes = [c_void_p]
965 isl.isl_multi_union_pw_aff_from_union_pw_aff.restype = c_void_p
966 isl.isl_multi_union_pw_aff_from_union_pw_aff.argtypes = [c_void_p]
967 isl.isl_multi_union_pw_aff_from_union_pw_aff_list.restype = c_void_p
968 isl.isl_multi_union_pw_aff_from_union_pw_aff_list.argtypes = [c_void_p, c_void_p]
969 isl.isl_multi_union_pw_aff_read_from_str.restype = c_void_p
970 isl.isl_multi_union_pw_aff_read_from_str.argtypes = [Context, c_char_p]
971 isl.isl_multi_union_pw_aff_add.restype = c_void_p
972 isl.isl_multi_union_pw_aff_add.argtypes = [c_void_p, c_void_p]
973 isl.isl_multi_union_pw_aff_get_at.restype = c_void_p
974 isl.isl_multi_union_pw_aff_get_at.argtypes = [c_void_p, c_int]
975 isl.isl_multi_union_pw_aff_bind.restype = c_void_p
976 isl.isl_multi_union_pw_aff_bind.argtypes = [c_void_p, c_void_p]
977 isl.isl_multi_union_pw_aff_coalesce.restype = c_void_p
978 isl.isl_multi_union_pw_aff_coalesce.argtypes = [c_void_p]
979 isl.isl_multi_union_pw_aff_domain.restype = c_void_p
980 isl.isl_multi_union_pw_aff_domain.argtypes = [c_void_p]
981 isl.isl_multi_union_pw_aff_flat_range_product.restype = c_void_p
982 isl.isl_multi_union_pw_aff_flat_range_product.argtypes = [c_void_p, c_void_p]
983 isl.isl_multi_union_pw_aff_gist.restype = c_void_p
984 isl.isl_multi_union_pw_aff_gist.argtypes = [c_void_p, c_void_p]
985 isl.isl_multi_union_pw_aff_gist_params.restype = c_void_p
986 isl.isl_multi_union_pw_aff_gist_params.argtypes = [c_void_p, c_void_p]
987 isl.isl_multi_union_pw_aff_has_range_tuple_id.argtypes = [c_void_p]
988 isl.isl_multi_union_pw_aff_intersect_domain.restype = c_void_p
989 isl.isl_multi_union_pw_aff_intersect_domain.argtypes = [c_void_p, c_void_p]
990 isl.isl_multi_union_pw_aff_intersect_params.restype = c_void_p
991 isl.isl_multi_union_pw_aff_intersect_params.argtypes = [c_void_p, c_void_p]
992 isl.isl_multi_union_pw_aff_involves_nan.argtypes = [c_void_p]
993 isl.isl_multi_union_pw_aff_get_list.restype = c_void_p
994 isl.isl_multi_union_pw_aff_get_list.argtypes = [c_void_p]
995 isl.isl_multi_union_pw_aff_neg.restype = c_void_p
996 isl.isl_multi_union_pw_aff_neg.argtypes = [c_void_p]
997 isl.isl_multi_union_pw_aff_plain_is_equal.argtypes = [c_void_p, c_void_p]
998 isl.isl_multi_union_pw_aff_pullback_union_pw_multi_aff.restype = c_void_p
999 isl.isl_multi_union_pw_aff_pullback_union_pw_multi_aff.argtypes = [c_void_p, c_void_p]
1000 isl.isl_multi_union_pw_aff_range_product.restype = c_void_p
1001 isl.isl_multi_union_pw_aff_range_product.argtypes = [c_void_p, c_void_p]
1002 isl.isl_multi_union_pw_aff_get_range_tuple_id.restype = c_void_p
1003 isl.isl_multi_union_pw_aff_get_range_tuple_id.argtypes = [c_void_p]
1004 isl.isl_multi_union_pw_aff_reset_range_tuple_id.restype = c_void_p
1005 isl.isl_multi_union_pw_aff_reset_range_tuple_id.argtypes = [c_void_p]
1006 isl.isl_multi_union_pw_aff_scale_multi_val.restype = c_void_p
1007 isl.isl_multi_union_pw_aff_scale_multi_val.argtypes = [c_void_p, c_void_p]
1008 isl.isl_multi_union_pw_aff_scale_val.restype = c_void_p
1009 isl.isl_multi_union_pw_aff_scale_val.argtypes = [c_void_p, c_void_p]
1010 isl.isl_multi_union_pw_aff_scale_down_multi_val.restype = c_void_p
1011 isl.isl_multi_union_pw_aff_scale_down_multi_val.argtypes = [c_void_p, c_void_p]
1012 isl.isl_multi_union_pw_aff_scale_down_val.restype = c_void_p
1013 isl.isl_multi_union_pw_aff_scale_down_val.argtypes = [c_void_p, c_void_p]
1014 isl.isl_multi_union_pw_aff_set_at.restype = c_void_p
1015 isl.isl_multi_union_pw_aff_set_at.argtypes = [c_void_p, c_int, c_void_p]
1016 isl.isl_multi_union_pw_aff_set_range_tuple_id.restype = c_void_p
1017 isl.isl_multi_union_pw_aff_set_range_tuple_id.argtypes = [c_void_p, c_void_p]
1018 isl.isl_multi_union_pw_aff_size.argtypes = [c_void_p]
1019 isl.isl_multi_union_pw_aff_get_space.restype = c_void_p
1020 isl.isl_multi_union_pw_aff_get_space.argtypes = [c_void_p]
1021 isl.isl_multi_union_pw_aff_sub.restype = c_void_p
1022 isl.isl_multi_union_pw_aff_sub.argtypes = [c_void_p, c_void_p]
1023 isl.isl_multi_union_pw_aff_union_add.restype = c_void_p
1024 isl.isl_multi_union_pw_aff_union_add.argtypes = [c_void_p, c_void_p]
1025 isl.isl_multi_union_pw_aff_zero.restype = c_void_p
1026 isl.isl_multi_union_pw_aff_zero.argtypes = [c_void_p]
1027 isl.isl_multi_union_pw_aff_copy.restype = c_void_p
1028 isl.isl_multi_union_pw_aff_copy.argtypes = [c_void_p]
1029 isl.isl_multi_union_pw_aff_free.restype = c_void_p
1030 isl.isl_multi_union_pw_aff_free.argtypes = [c_void_p]
1031 isl.isl_multi_union_pw_aff_to_str.restype = POINTER(c_char)
1032 isl.isl_multi_union_pw_aff_to_str.argtypes = [c_void_p]
1034 class union_pw_aff(union_pw_multi_aff, multi_union_pw_aff):
1035     def __init__(self, *args, **keywords):
1036         if "ptr" in keywords:
1037             self.ctx = keywords["ctx"]
1038             self.ptr = keywords["ptr"]
1039             return
1040         if len(args) == 1 and args[0].__class__ is aff:
1041             self.ctx = Context.getDefaultInstance()
1042             self.ptr = isl.isl_union_pw_aff_from_aff(isl.isl_aff_copy(args[0].ptr))
1043             return
1044         if len(args) == 1 and args[0].__class__ is pw_aff:
1045             self.ctx = Context.getDefaultInstance()
1046             self.ptr = isl.isl_union_pw_aff_from_pw_aff(isl.isl_pw_aff_copy(args[0].ptr))
1047             return
1048         if len(args) == 1 and type(args[0]) == str:
1049             self.ctx = Context.getDefaultInstance()
1050             self.ptr = isl.isl_union_pw_aff_read_from_str(self.ctx, args[0].encode('ascii'))
1051             return
1052         raise Error
1053     def __del__(self):
1054         if hasattr(self, 'ptr'):
1055             isl.isl_union_pw_aff_free(self.ptr)
1056     def __str__(arg0):
1057         try:
1058             if not arg0.__class__ is union_pw_aff:
1059                 arg0 = union_pw_aff(arg0)
1060         except:
1061             raise
1062         ptr = isl.isl_union_pw_aff_to_str(arg0.ptr)
1063         res = cast(ptr, c_char_p).value.decode('ascii')
1064         libc.free(ptr)
1065         return res
1066     def __repr__(self):
1067         s = str(self)
1068         if '"' in s:
1069             return 'isl.union_pw_aff("""%s""")' % s
1070         else:
1071             return 'isl.union_pw_aff("%s")' % s
1072     def add(arg0, arg1):
1073         try:
1074             if not arg0.__class__ is union_pw_aff:
1075                 arg0 = union_pw_aff(arg0)
1076         except:
1077             raise
1078         try:
1079             if not arg1.__class__ is union_pw_aff:
1080                 arg1 = union_pw_aff(arg1)
1081         except:
1082             return union_pw_multi_aff(arg0).add(arg1)
1083         ctx = arg0.ctx
1084         res = isl.isl_union_pw_aff_add(isl.isl_union_pw_aff_copy(arg0.ptr), isl.isl_union_pw_aff_copy(arg1.ptr))
1085         obj = union_pw_aff(ctx=ctx, ptr=res)
1086         return obj
1087     def bind(*args):
1088         if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
1089             args = list(args)
1090             try:
1091                 if not args[0].__class__ is union_pw_aff:
1092                     args[0] = union_pw_aff(args[0])
1093             except:
1094                 raise
1095             try:
1096                 if not args[1].__class__ is id:
1097                     args[1] = id(args[1])
1098             except:
1099                 raise
1100             ctx = args[0].ctx
1101             res = isl.isl_union_pw_aff_bind_id(isl.isl_union_pw_aff_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
1102             obj = union_set(ctx=ctx, ptr=res)
1103             return obj
1104         raise Error
1105     def coalesce(arg0):
1106         try:
1107             if not arg0.__class__ is union_pw_aff:
1108                 arg0 = union_pw_aff(arg0)
1109         except:
1110             raise
1111         ctx = arg0.ctx
1112         res = isl.isl_union_pw_aff_coalesce(isl.isl_union_pw_aff_copy(arg0.ptr))
1113         obj = union_pw_aff(ctx=ctx, ptr=res)
1114         return obj
1115     def domain(arg0):
1116         try:
1117             if not arg0.__class__ is union_pw_aff:
1118                 arg0 = union_pw_aff(arg0)
1119         except:
1120             raise
1121         ctx = arg0.ctx
1122         res = isl.isl_union_pw_aff_domain(isl.isl_union_pw_aff_copy(arg0.ptr))
1123         obj = union_set(ctx=ctx, ptr=res)
1124         return obj
1125     def drop_unused_params(arg0):
1126         try:
1127             if not arg0.__class__ is union_pw_aff:
1128                 arg0 = union_pw_aff(arg0)
1129         except:
1130             raise
1131         ctx = arg0.ctx
1132         res = isl.isl_union_pw_aff_drop_unused_params(isl.isl_union_pw_aff_copy(arg0.ptr))
1133         obj = union_pw_aff(ctx=ctx, ptr=res)
1134         return obj
1135     def gist(arg0, arg1):
1136         try:
1137             if not arg0.__class__ is union_pw_aff:
1138                 arg0 = union_pw_aff(arg0)
1139         except:
1140             raise
1141         try:
1142             if not arg1.__class__ is union_set:
1143                 arg1 = union_set(arg1)
1144         except:
1145             return union_pw_multi_aff(arg0).gist(arg1)
1146         ctx = arg0.ctx
1147         res = isl.isl_union_pw_aff_gist(isl.isl_union_pw_aff_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
1148         obj = union_pw_aff(ctx=ctx, ptr=res)
1149         return obj
1150     def intersect_domain(*args):
1151         if len(args) == 2 and args[1].__class__ is space:
1152             args = list(args)
1153             try:
1154                 if not args[0].__class__ is union_pw_aff:
1155                     args[0] = union_pw_aff(args[0])
1156             except:
1157                 raise
1158             ctx = args[0].ctx
1159             res = isl.isl_union_pw_aff_intersect_domain_space(isl.isl_union_pw_aff_copy(args[0].ptr), isl.isl_space_copy(args[1].ptr))
1160             obj = union_pw_aff(ctx=ctx, ptr=res)
1161             return obj
1162         if len(args) == 2 and args[1].__class__ is union_set:
1163             args = list(args)
1164             try:
1165                 if not args[0].__class__ is union_pw_aff:
1166                     args[0] = union_pw_aff(args[0])
1167             except:
1168                 raise
1169             ctx = args[0].ctx
1170             res = isl.isl_union_pw_aff_intersect_domain_union_set(isl.isl_union_pw_aff_copy(args[0].ptr), isl.isl_union_set_copy(args[1].ptr))
1171             obj = union_pw_aff(ctx=ctx, ptr=res)
1172             return obj
1173         raise Error
1174     def intersect_domain_wrapped_domain(arg0, arg1):
1175         try:
1176             if not arg0.__class__ is union_pw_aff:
1177                 arg0 = union_pw_aff(arg0)
1178         except:
1179             raise
1180         try:
1181             if not arg1.__class__ is union_set:
1182                 arg1 = union_set(arg1)
1183         except:
1184             return union_pw_multi_aff(arg0).intersect_domain_wrapped_domain(arg1)
1185         ctx = arg0.ctx
1186         res = isl.isl_union_pw_aff_intersect_domain_wrapped_domain(isl.isl_union_pw_aff_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
1187         obj = union_pw_aff(ctx=ctx, ptr=res)
1188         return obj
1189     def intersect_domain_wrapped_range(arg0, arg1):
1190         try:
1191             if not arg0.__class__ is union_pw_aff:
1192                 arg0 = union_pw_aff(arg0)
1193         except:
1194             raise
1195         try:
1196             if not arg1.__class__ is union_set:
1197                 arg1 = union_set(arg1)
1198         except:
1199             return union_pw_multi_aff(arg0).intersect_domain_wrapped_range(arg1)
1200         ctx = arg0.ctx
1201         res = isl.isl_union_pw_aff_intersect_domain_wrapped_range(isl.isl_union_pw_aff_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
1202         obj = union_pw_aff(ctx=ctx, ptr=res)
1203         return obj
1204     def intersect_params(arg0, arg1):
1205         try:
1206             if not arg0.__class__ is union_pw_aff:
1207                 arg0 = union_pw_aff(arg0)
1208         except:
1209             raise
1210         try:
1211             if not arg1.__class__ is set:
1212                 arg1 = set(arg1)
1213         except:
1214             return union_pw_multi_aff(arg0).intersect_params(arg1)
1215         ctx = arg0.ctx
1216         res = isl.isl_union_pw_aff_intersect_params(isl.isl_union_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
1217         obj = union_pw_aff(ctx=ctx, ptr=res)
1218         return obj
1219     def plain_is_equal(arg0, arg1):
1220         try:
1221             if not arg0.__class__ is union_pw_aff:
1222                 arg0 = union_pw_aff(arg0)
1223         except:
1224             raise
1225         try:
1226             if not arg1.__class__ is union_pw_aff:
1227                 arg1 = union_pw_aff(arg1)
1228         except:
1229             return union_pw_multi_aff(arg0).plain_is_equal(arg1)
1230         ctx = arg0.ctx
1231         res = isl.isl_union_pw_aff_plain_is_equal(arg0.ptr, arg1.ptr)
1232         if res < 0:
1233             raise Error
1234         return bool(res)
1235     def pullback(*args):
1236         if len(args) == 2 and args[1].__class__ is union_pw_multi_aff:
1237             args = list(args)
1238             try:
1239                 if not args[0].__class__ is union_pw_aff:
1240                     args[0] = union_pw_aff(args[0])
1241             except:
1242                 raise
1243             ctx = args[0].ctx
1244             res = isl.isl_union_pw_aff_pullback_union_pw_multi_aff(isl.isl_union_pw_aff_copy(args[0].ptr), isl.isl_union_pw_multi_aff_copy(args[1].ptr))
1245             obj = union_pw_aff(ctx=ctx, ptr=res)
1246             return obj
1247         raise Error
1248     def space(arg0):
1249         try:
1250             if not arg0.__class__ is union_pw_aff:
1251                 arg0 = union_pw_aff(arg0)
1252         except:
1253             raise
1254         ctx = arg0.ctx
1255         res = isl.isl_union_pw_aff_get_space(arg0.ptr)
1256         obj = space(ctx=ctx, ptr=res)
1257         return obj
1258     def get_space(arg0):
1259         return arg0.space()
1260     def sub(arg0, arg1):
1261         try:
1262             if not arg0.__class__ is union_pw_aff:
1263                 arg0 = union_pw_aff(arg0)
1264         except:
1265             raise
1266         try:
1267             if not arg1.__class__ is union_pw_aff:
1268                 arg1 = union_pw_aff(arg1)
1269         except:
1270             return union_pw_multi_aff(arg0).sub(arg1)
1271         ctx = arg0.ctx
1272         res = isl.isl_union_pw_aff_sub(isl.isl_union_pw_aff_copy(arg0.ptr), isl.isl_union_pw_aff_copy(arg1.ptr))
1273         obj = union_pw_aff(ctx=ctx, ptr=res)
1274         return obj
1275     def subtract_domain(*args):
1276         if len(args) == 2 and args[1].__class__ is space:
1277             args = list(args)
1278             try:
1279                 if not args[0].__class__ is union_pw_aff:
1280                     args[0] = union_pw_aff(args[0])
1281             except:
1282                 raise
1283             ctx = args[0].ctx
1284             res = isl.isl_union_pw_aff_subtract_domain_space(isl.isl_union_pw_aff_copy(args[0].ptr), isl.isl_space_copy(args[1].ptr))
1285             obj = union_pw_aff(ctx=ctx, ptr=res)
1286             return obj
1287         if len(args) == 2 and args[1].__class__ is union_set:
1288             args = list(args)
1289             try:
1290                 if not args[0].__class__ is union_pw_aff:
1291                     args[0] = union_pw_aff(args[0])
1292             except:
1293                 raise
1294             ctx = args[0].ctx
1295             res = isl.isl_union_pw_aff_subtract_domain_union_set(isl.isl_union_pw_aff_copy(args[0].ptr), isl.isl_union_set_copy(args[1].ptr))
1296             obj = union_pw_aff(ctx=ctx, ptr=res)
1297             return obj
1298         raise Error
1299     def to_list(arg0):
1300         try:
1301             if not arg0.__class__ is union_pw_aff:
1302                 arg0 = union_pw_aff(arg0)
1303         except:
1304             raise
1305         ctx = arg0.ctx
1306         res = isl.isl_union_pw_aff_to_list(isl.isl_union_pw_aff_copy(arg0.ptr))
1307         obj = union_pw_aff_list(ctx=ctx, ptr=res)
1308         return obj
1309     def union_add(arg0, arg1):
1310         try:
1311             if not arg0.__class__ is union_pw_aff:
1312                 arg0 = union_pw_aff(arg0)
1313         except:
1314             raise
1315         try:
1316             if not arg1.__class__ is union_pw_aff:
1317                 arg1 = union_pw_aff(arg1)
1318         except:
1319             return union_pw_multi_aff(arg0).union_add(arg1)
1320         ctx = arg0.ctx
1321         res = isl.isl_union_pw_aff_union_add(isl.isl_union_pw_aff_copy(arg0.ptr), isl.isl_union_pw_aff_copy(arg1.ptr))
1322         obj = union_pw_aff(ctx=ctx, ptr=res)
1323         return obj
1325 isl.isl_union_pw_aff_from_aff.restype = c_void_p
1326 isl.isl_union_pw_aff_from_aff.argtypes = [c_void_p]
1327 isl.isl_union_pw_aff_from_pw_aff.restype = c_void_p
1328 isl.isl_union_pw_aff_from_pw_aff.argtypes = [c_void_p]
1329 isl.isl_union_pw_aff_read_from_str.restype = c_void_p
1330 isl.isl_union_pw_aff_read_from_str.argtypes = [Context, c_char_p]
1331 isl.isl_union_pw_aff_add.restype = c_void_p
1332 isl.isl_union_pw_aff_add.argtypes = [c_void_p, c_void_p]
1333 isl.isl_union_pw_aff_bind_id.restype = c_void_p
1334 isl.isl_union_pw_aff_bind_id.argtypes = [c_void_p, c_void_p]
1335 isl.isl_union_pw_aff_coalesce.restype = c_void_p
1336 isl.isl_union_pw_aff_coalesce.argtypes = [c_void_p]
1337 isl.isl_union_pw_aff_domain.restype = c_void_p
1338 isl.isl_union_pw_aff_domain.argtypes = [c_void_p]
1339 isl.isl_union_pw_aff_drop_unused_params.restype = c_void_p
1340 isl.isl_union_pw_aff_drop_unused_params.argtypes = [c_void_p]
1341 isl.isl_union_pw_aff_gist.restype = c_void_p
1342 isl.isl_union_pw_aff_gist.argtypes = [c_void_p, c_void_p]
1343 isl.isl_union_pw_aff_intersect_domain_space.restype = c_void_p
1344 isl.isl_union_pw_aff_intersect_domain_space.argtypes = [c_void_p, c_void_p]
1345 isl.isl_union_pw_aff_intersect_domain_union_set.restype = c_void_p
1346 isl.isl_union_pw_aff_intersect_domain_union_set.argtypes = [c_void_p, c_void_p]
1347 isl.isl_union_pw_aff_intersect_domain_wrapped_domain.restype = c_void_p
1348 isl.isl_union_pw_aff_intersect_domain_wrapped_domain.argtypes = [c_void_p, c_void_p]
1349 isl.isl_union_pw_aff_intersect_domain_wrapped_range.restype = c_void_p
1350 isl.isl_union_pw_aff_intersect_domain_wrapped_range.argtypes = [c_void_p, c_void_p]
1351 isl.isl_union_pw_aff_intersect_params.restype = c_void_p
1352 isl.isl_union_pw_aff_intersect_params.argtypes = [c_void_p, c_void_p]
1353 isl.isl_union_pw_aff_plain_is_equal.argtypes = [c_void_p, c_void_p]
1354 isl.isl_union_pw_aff_pullback_union_pw_multi_aff.restype = c_void_p
1355 isl.isl_union_pw_aff_pullback_union_pw_multi_aff.argtypes = [c_void_p, c_void_p]
1356 isl.isl_union_pw_aff_get_space.restype = c_void_p
1357 isl.isl_union_pw_aff_get_space.argtypes = [c_void_p]
1358 isl.isl_union_pw_aff_sub.restype = c_void_p
1359 isl.isl_union_pw_aff_sub.argtypes = [c_void_p, c_void_p]
1360 isl.isl_union_pw_aff_subtract_domain_space.restype = c_void_p
1361 isl.isl_union_pw_aff_subtract_domain_space.argtypes = [c_void_p, c_void_p]
1362 isl.isl_union_pw_aff_subtract_domain_union_set.restype = c_void_p
1363 isl.isl_union_pw_aff_subtract_domain_union_set.argtypes = [c_void_p, c_void_p]
1364 isl.isl_union_pw_aff_to_list.restype = c_void_p
1365 isl.isl_union_pw_aff_to_list.argtypes = [c_void_p]
1366 isl.isl_union_pw_aff_union_add.restype = c_void_p
1367 isl.isl_union_pw_aff_union_add.argtypes = [c_void_p, c_void_p]
1368 isl.isl_union_pw_aff_copy.restype = c_void_p
1369 isl.isl_union_pw_aff_copy.argtypes = [c_void_p]
1370 isl.isl_union_pw_aff_free.restype = c_void_p
1371 isl.isl_union_pw_aff_free.argtypes = [c_void_p]
1372 isl.isl_union_pw_aff_to_str.restype = POINTER(c_char)
1373 isl.isl_union_pw_aff_to_str.argtypes = [c_void_p]
1375 class multi_pw_aff(multi_union_pw_aff):
1376     def __init__(self, *args, **keywords):
1377         if "ptr" in keywords:
1378             self.ctx = keywords["ctx"]
1379             self.ptr = keywords["ptr"]
1380             return
1381         if len(args) == 1 and args[0].__class__ is aff:
1382             self.ctx = Context.getDefaultInstance()
1383             self.ptr = isl.isl_multi_pw_aff_from_aff(isl.isl_aff_copy(args[0].ptr))
1384             return
1385         if len(args) == 1 and args[0].__class__ is multi_aff:
1386             self.ctx = Context.getDefaultInstance()
1387             self.ptr = isl.isl_multi_pw_aff_from_multi_aff(isl.isl_multi_aff_copy(args[0].ptr))
1388             return
1389         if len(args) == 1 and args[0].__class__ is pw_aff:
1390             self.ctx = Context.getDefaultInstance()
1391             self.ptr = isl.isl_multi_pw_aff_from_pw_aff(isl.isl_pw_aff_copy(args[0].ptr))
1392             return
1393         if len(args) == 2 and args[0].__class__ is space and args[1].__class__ is pw_aff_list:
1394             self.ctx = Context.getDefaultInstance()
1395             self.ptr = isl.isl_multi_pw_aff_from_pw_aff_list(isl.isl_space_copy(args[0].ptr), isl.isl_pw_aff_list_copy(args[1].ptr))
1396             return
1397         if len(args) == 1 and args[0].__class__ is pw_multi_aff:
1398             self.ctx = Context.getDefaultInstance()
1399             self.ptr = isl.isl_multi_pw_aff_from_pw_multi_aff(isl.isl_pw_multi_aff_copy(args[0].ptr))
1400             return
1401         if len(args) == 1 and type(args[0]) == str:
1402             self.ctx = Context.getDefaultInstance()
1403             self.ptr = isl.isl_multi_pw_aff_read_from_str(self.ctx, args[0].encode('ascii'))
1404             return
1405         raise Error
1406     def __del__(self):
1407         if hasattr(self, 'ptr'):
1408             isl.isl_multi_pw_aff_free(self.ptr)
1409     def __str__(arg0):
1410         try:
1411             if not arg0.__class__ is multi_pw_aff:
1412                 arg0 = multi_pw_aff(arg0)
1413         except:
1414             raise
1415         ptr = isl.isl_multi_pw_aff_to_str(arg0.ptr)
1416         res = cast(ptr, c_char_p).value.decode('ascii')
1417         libc.free(ptr)
1418         return res
1419     def __repr__(self):
1420         s = str(self)
1421         if '"' in s:
1422             return 'isl.multi_pw_aff("""%s""")' % s
1423         else:
1424             return 'isl.multi_pw_aff("%s")' % s
1425     def add(arg0, arg1):
1426         try:
1427             if not arg0.__class__ is multi_pw_aff:
1428                 arg0 = multi_pw_aff(arg0)
1429         except:
1430             raise
1431         try:
1432             if not arg1.__class__ is multi_pw_aff:
1433                 arg1 = multi_pw_aff(arg1)
1434         except:
1435             return multi_union_pw_aff(arg0).add(arg1)
1436         ctx = arg0.ctx
1437         res = isl.isl_multi_pw_aff_add(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_pw_aff_copy(arg1.ptr))
1438         obj = multi_pw_aff(ctx=ctx, ptr=res)
1439         return obj
1440     def add_constant(*args):
1441         if len(args) == 2 and args[1].__class__ is multi_val:
1442             args = list(args)
1443             try:
1444                 if not args[0].__class__ is multi_pw_aff:
1445                     args[0] = multi_pw_aff(args[0])
1446             except:
1447                 raise
1448             ctx = args[0].ctx
1449             res = isl.isl_multi_pw_aff_add_constant_multi_val(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
1450             obj = multi_pw_aff(ctx=ctx, ptr=res)
1451             return obj
1452         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
1453             args = list(args)
1454             try:
1455                 if not args[0].__class__ is multi_pw_aff:
1456                     args[0] = multi_pw_aff(args[0])
1457             except:
1458                 raise
1459             try:
1460                 if not args[1].__class__ is val:
1461                     args[1] = val(args[1])
1462             except:
1463                 raise
1464             ctx = args[0].ctx
1465             res = isl.isl_multi_pw_aff_add_constant_val(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
1466             obj = multi_pw_aff(ctx=ctx, ptr=res)
1467             return obj
1468         raise Error
1469     def as_map(arg0):
1470         try:
1471             if not arg0.__class__ is multi_pw_aff:
1472                 arg0 = multi_pw_aff(arg0)
1473         except:
1474             raise
1475         ctx = arg0.ctx
1476         res = isl.isl_multi_pw_aff_as_map(isl.isl_multi_pw_aff_copy(arg0.ptr))
1477         obj = map(ctx=ctx, ptr=res)
1478         return obj
1479     def as_multi_aff(arg0):
1480         try:
1481             if not arg0.__class__ is multi_pw_aff:
1482                 arg0 = multi_pw_aff(arg0)
1483         except:
1484             raise
1485         ctx = arg0.ctx
1486         res = isl.isl_multi_pw_aff_as_multi_aff(isl.isl_multi_pw_aff_copy(arg0.ptr))
1487         obj = multi_aff(ctx=ctx, ptr=res)
1488         return obj
1489     def as_set(arg0):
1490         try:
1491             if not arg0.__class__ is multi_pw_aff:
1492                 arg0 = multi_pw_aff(arg0)
1493         except:
1494             raise
1495         ctx = arg0.ctx
1496         res = isl.isl_multi_pw_aff_as_set(isl.isl_multi_pw_aff_copy(arg0.ptr))
1497         obj = set(ctx=ctx, ptr=res)
1498         return obj
1499     def at(arg0, arg1):
1500         try:
1501             if not arg0.__class__ is multi_pw_aff:
1502                 arg0 = multi_pw_aff(arg0)
1503         except:
1504             raise
1505         ctx = arg0.ctx
1506         res = isl.isl_multi_pw_aff_get_at(arg0.ptr, arg1)
1507         obj = pw_aff(ctx=ctx, ptr=res)
1508         return obj
1509     def get_at(arg0, arg1):
1510         return arg0.at(arg1)
1511     def bind(arg0, arg1):
1512         try:
1513             if not arg0.__class__ is multi_pw_aff:
1514                 arg0 = multi_pw_aff(arg0)
1515         except:
1516             raise
1517         try:
1518             if not arg1.__class__ is multi_id:
1519                 arg1 = multi_id(arg1)
1520         except:
1521             return multi_union_pw_aff(arg0).bind(arg1)
1522         ctx = arg0.ctx
1523         res = isl.isl_multi_pw_aff_bind(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
1524         obj = set(ctx=ctx, ptr=res)
1525         return obj
1526     def bind_domain(arg0, arg1):
1527         try:
1528             if not arg0.__class__ is multi_pw_aff:
1529                 arg0 = multi_pw_aff(arg0)
1530         except:
1531             raise
1532         try:
1533             if not arg1.__class__ is multi_id:
1534                 arg1 = multi_id(arg1)
1535         except:
1536             return multi_union_pw_aff(arg0).bind_domain(arg1)
1537         ctx = arg0.ctx
1538         res = isl.isl_multi_pw_aff_bind_domain(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
1539         obj = multi_pw_aff(ctx=ctx, ptr=res)
1540         return obj
1541     def bind_domain_wrapped_domain(arg0, arg1):
1542         try:
1543             if not arg0.__class__ is multi_pw_aff:
1544                 arg0 = multi_pw_aff(arg0)
1545         except:
1546             raise
1547         try:
1548             if not arg1.__class__ is multi_id:
1549                 arg1 = multi_id(arg1)
1550         except:
1551             return multi_union_pw_aff(arg0).bind_domain_wrapped_domain(arg1)
1552         ctx = arg0.ctx
1553         res = isl.isl_multi_pw_aff_bind_domain_wrapped_domain(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
1554         obj = multi_pw_aff(ctx=ctx, ptr=res)
1555         return obj
1556     def coalesce(arg0):
1557         try:
1558             if not arg0.__class__ is multi_pw_aff:
1559                 arg0 = multi_pw_aff(arg0)
1560         except:
1561             raise
1562         ctx = arg0.ctx
1563         res = isl.isl_multi_pw_aff_coalesce(isl.isl_multi_pw_aff_copy(arg0.ptr))
1564         obj = multi_pw_aff(ctx=ctx, ptr=res)
1565         return obj
1566     def domain(arg0):
1567         try:
1568             if not arg0.__class__ is multi_pw_aff:
1569                 arg0 = multi_pw_aff(arg0)
1570         except:
1571             raise
1572         ctx = arg0.ctx
1573         res = isl.isl_multi_pw_aff_domain(isl.isl_multi_pw_aff_copy(arg0.ptr))
1574         obj = set(ctx=ctx, ptr=res)
1575         return obj
1576     def domain_reverse(arg0):
1577         try:
1578             if not arg0.__class__ is multi_pw_aff:
1579                 arg0 = multi_pw_aff(arg0)
1580         except:
1581             raise
1582         ctx = arg0.ctx
1583         res = isl.isl_multi_pw_aff_domain_reverse(isl.isl_multi_pw_aff_copy(arg0.ptr))
1584         obj = multi_pw_aff(ctx=ctx, ptr=res)
1585         return obj
1586     def flat_range_product(arg0, arg1):
1587         try:
1588             if not arg0.__class__ is multi_pw_aff:
1589                 arg0 = multi_pw_aff(arg0)
1590         except:
1591             raise
1592         try:
1593             if not arg1.__class__ is multi_pw_aff:
1594                 arg1 = multi_pw_aff(arg1)
1595         except:
1596             return multi_union_pw_aff(arg0).flat_range_product(arg1)
1597         ctx = arg0.ctx
1598         res = isl.isl_multi_pw_aff_flat_range_product(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_pw_aff_copy(arg1.ptr))
1599         obj = multi_pw_aff(ctx=ctx, ptr=res)
1600         return obj
1601     def gist(arg0, arg1):
1602         try:
1603             if not arg0.__class__ is multi_pw_aff:
1604                 arg0 = multi_pw_aff(arg0)
1605         except:
1606             raise
1607         try:
1608             if not arg1.__class__ is set:
1609                 arg1 = set(arg1)
1610         except:
1611             return multi_union_pw_aff(arg0).gist(arg1)
1612         ctx = arg0.ctx
1613         res = isl.isl_multi_pw_aff_gist(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
1614         obj = multi_pw_aff(ctx=ctx, ptr=res)
1615         return obj
1616     def gist_params(arg0, arg1):
1617         try:
1618             if not arg0.__class__ is multi_pw_aff:
1619                 arg0 = multi_pw_aff(arg0)
1620         except:
1621             raise
1622         try:
1623             if not arg1.__class__ is set:
1624                 arg1 = set(arg1)
1625         except:
1626             return multi_union_pw_aff(arg0).gist_params(arg1)
1627         ctx = arg0.ctx
1628         res = isl.isl_multi_pw_aff_gist_params(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
1629         obj = multi_pw_aff(ctx=ctx, ptr=res)
1630         return obj
1631     def has_range_tuple_id(arg0):
1632         try:
1633             if not arg0.__class__ is multi_pw_aff:
1634                 arg0 = multi_pw_aff(arg0)
1635         except:
1636             raise
1637         ctx = arg0.ctx
1638         res = isl.isl_multi_pw_aff_has_range_tuple_id(arg0.ptr)
1639         if res < 0:
1640             raise Error
1641         return bool(res)
1642     def identity(*args):
1643         if len(args) == 1:
1644             args = list(args)
1645             try:
1646                 if not args[0].__class__ is multi_pw_aff:
1647                     args[0] = multi_pw_aff(args[0])
1648             except:
1649                 raise
1650             ctx = args[0].ctx
1651             res = isl.isl_multi_pw_aff_identity_multi_pw_aff(isl.isl_multi_pw_aff_copy(args[0].ptr))
1652             obj = multi_pw_aff(ctx=ctx, ptr=res)
1653             return obj
1654         raise Error
1655     @staticmethod
1656     def identity_on_domain(*args):
1657         if len(args) == 1 and args[0].__class__ is space:
1658             ctx = args[0].ctx
1659             res = isl.isl_multi_pw_aff_identity_on_domain_space(isl.isl_space_copy(args[0].ptr))
1660             obj = multi_pw_aff(ctx=ctx, ptr=res)
1661             return obj
1662         raise Error
1663     def insert_domain(arg0, arg1):
1664         try:
1665             if not arg0.__class__ is multi_pw_aff:
1666                 arg0 = multi_pw_aff(arg0)
1667         except:
1668             raise
1669         try:
1670             if not arg1.__class__ is space:
1671                 arg1 = space(arg1)
1672         except:
1673             return multi_union_pw_aff(arg0).insert_domain(arg1)
1674         ctx = arg0.ctx
1675         res = isl.isl_multi_pw_aff_insert_domain(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_space_copy(arg1.ptr))
1676         obj = multi_pw_aff(ctx=ctx, ptr=res)
1677         return obj
1678     def intersect_domain(arg0, arg1):
1679         try:
1680             if not arg0.__class__ is multi_pw_aff:
1681                 arg0 = multi_pw_aff(arg0)
1682         except:
1683             raise
1684         try:
1685             if not arg1.__class__ is set:
1686                 arg1 = set(arg1)
1687         except:
1688             return multi_union_pw_aff(arg0).intersect_domain(arg1)
1689         ctx = arg0.ctx
1690         res = isl.isl_multi_pw_aff_intersect_domain(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
1691         obj = multi_pw_aff(ctx=ctx, ptr=res)
1692         return obj
1693     def intersect_params(arg0, arg1):
1694         try:
1695             if not arg0.__class__ is multi_pw_aff:
1696                 arg0 = multi_pw_aff(arg0)
1697         except:
1698             raise
1699         try:
1700             if not arg1.__class__ is set:
1701                 arg1 = set(arg1)
1702         except:
1703             return multi_union_pw_aff(arg0).intersect_params(arg1)
1704         ctx = arg0.ctx
1705         res = isl.isl_multi_pw_aff_intersect_params(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
1706         obj = multi_pw_aff(ctx=ctx, ptr=res)
1707         return obj
1708     def involves_nan(arg0):
1709         try:
1710             if not arg0.__class__ is multi_pw_aff:
1711                 arg0 = multi_pw_aff(arg0)
1712         except:
1713             raise
1714         ctx = arg0.ctx
1715         res = isl.isl_multi_pw_aff_involves_nan(arg0.ptr)
1716         if res < 0:
1717             raise Error
1718         return bool(res)
1719     def involves_param(*args):
1720         if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
1721             args = list(args)
1722             try:
1723                 if not args[0].__class__ is multi_pw_aff:
1724                     args[0] = multi_pw_aff(args[0])
1725             except:
1726                 raise
1727             try:
1728                 if not args[1].__class__ is id:
1729                     args[1] = id(args[1])
1730             except:
1731                 raise
1732             ctx = args[0].ctx
1733             res = isl.isl_multi_pw_aff_involves_param_id(args[0].ptr, args[1].ptr)
1734             if res < 0:
1735                 raise Error
1736             return bool(res)
1737         if len(args) == 2 and args[1].__class__ is id_list:
1738             args = list(args)
1739             try:
1740                 if not args[0].__class__ is multi_pw_aff:
1741                     args[0] = multi_pw_aff(args[0])
1742             except:
1743                 raise
1744             ctx = args[0].ctx
1745             res = isl.isl_multi_pw_aff_involves_param_id_list(args[0].ptr, args[1].ptr)
1746             if res < 0:
1747                 raise Error
1748             return bool(res)
1749         raise Error
1750     def isa_multi_aff(arg0):
1751         try:
1752             if not arg0.__class__ is multi_pw_aff:
1753                 arg0 = multi_pw_aff(arg0)
1754         except:
1755             raise
1756         ctx = arg0.ctx
1757         res = isl.isl_multi_pw_aff_isa_multi_aff(arg0.ptr)
1758         if res < 0:
1759             raise Error
1760         return bool(res)
1761     def list(arg0):
1762         try:
1763             if not arg0.__class__ is multi_pw_aff:
1764                 arg0 = multi_pw_aff(arg0)
1765         except:
1766             raise
1767         ctx = arg0.ctx
1768         res = isl.isl_multi_pw_aff_get_list(arg0.ptr)
1769         obj = pw_aff_list(ctx=ctx, ptr=res)
1770         return obj
1771     def get_list(arg0):
1772         return arg0.list()
1773     def max(arg0, arg1):
1774         try:
1775             if not arg0.__class__ is multi_pw_aff:
1776                 arg0 = multi_pw_aff(arg0)
1777         except:
1778             raise
1779         try:
1780             if not arg1.__class__ is multi_pw_aff:
1781                 arg1 = multi_pw_aff(arg1)
1782         except:
1783             return multi_union_pw_aff(arg0).max(arg1)
1784         ctx = arg0.ctx
1785         res = isl.isl_multi_pw_aff_max(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_pw_aff_copy(arg1.ptr))
1786         obj = multi_pw_aff(ctx=ctx, ptr=res)
1787         return obj
1788     def max_multi_val(arg0):
1789         try:
1790             if not arg0.__class__ is multi_pw_aff:
1791                 arg0 = multi_pw_aff(arg0)
1792         except:
1793             raise
1794         ctx = arg0.ctx
1795         res = isl.isl_multi_pw_aff_max_multi_val(isl.isl_multi_pw_aff_copy(arg0.ptr))
1796         obj = multi_val(ctx=ctx, ptr=res)
1797         return obj
1798     def min(arg0, arg1):
1799         try:
1800             if not arg0.__class__ is multi_pw_aff:
1801                 arg0 = multi_pw_aff(arg0)
1802         except:
1803             raise
1804         try:
1805             if not arg1.__class__ is multi_pw_aff:
1806                 arg1 = multi_pw_aff(arg1)
1807         except:
1808             return multi_union_pw_aff(arg0).min(arg1)
1809         ctx = arg0.ctx
1810         res = isl.isl_multi_pw_aff_min(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_pw_aff_copy(arg1.ptr))
1811         obj = multi_pw_aff(ctx=ctx, ptr=res)
1812         return obj
1813     def min_multi_val(arg0):
1814         try:
1815             if not arg0.__class__ is multi_pw_aff:
1816                 arg0 = multi_pw_aff(arg0)
1817         except:
1818             raise
1819         ctx = arg0.ctx
1820         res = isl.isl_multi_pw_aff_min_multi_val(isl.isl_multi_pw_aff_copy(arg0.ptr))
1821         obj = multi_val(ctx=ctx, ptr=res)
1822         return obj
1823     def neg(arg0):
1824         try:
1825             if not arg0.__class__ is multi_pw_aff:
1826                 arg0 = multi_pw_aff(arg0)
1827         except:
1828             raise
1829         ctx = arg0.ctx
1830         res = isl.isl_multi_pw_aff_neg(isl.isl_multi_pw_aff_copy(arg0.ptr))
1831         obj = multi_pw_aff(ctx=ctx, ptr=res)
1832         return obj
1833     def plain_is_equal(arg0, arg1):
1834         try:
1835             if not arg0.__class__ is multi_pw_aff:
1836                 arg0 = multi_pw_aff(arg0)
1837         except:
1838             raise
1839         try:
1840             if not arg1.__class__ is multi_pw_aff:
1841                 arg1 = multi_pw_aff(arg1)
1842         except:
1843             return multi_union_pw_aff(arg0).plain_is_equal(arg1)
1844         ctx = arg0.ctx
1845         res = isl.isl_multi_pw_aff_plain_is_equal(arg0.ptr, arg1.ptr)
1846         if res < 0:
1847             raise Error
1848         return bool(res)
1849     def product(arg0, arg1):
1850         try:
1851             if not arg0.__class__ is multi_pw_aff:
1852                 arg0 = multi_pw_aff(arg0)
1853         except:
1854             raise
1855         try:
1856             if not arg1.__class__ is multi_pw_aff:
1857                 arg1 = multi_pw_aff(arg1)
1858         except:
1859             return multi_union_pw_aff(arg0).product(arg1)
1860         ctx = arg0.ctx
1861         res = isl.isl_multi_pw_aff_product(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_pw_aff_copy(arg1.ptr))
1862         obj = multi_pw_aff(ctx=ctx, ptr=res)
1863         return obj
1864     def pullback(*args):
1865         if len(args) == 2 and args[1].__class__ is multi_aff:
1866             args = list(args)
1867             try:
1868                 if not args[0].__class__ is multi_pw_aff:
1869                     args[0] = multi_pw_aff(args[0])
1870             except:
1871                 raise
1872             ctx = args[0].ctx
1873             res = isl.isl_multi_pw_aff_pullback_multi_aff(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
1874             obj = multi_pw_aff(ctx=ctx, ptr=res)
1875             return obj
1876         if len(args) == 2 and args[1].__class__ is multi_pw_aff:
1877             args = list(args)
1878             try:
1879                 if not args[0].__class__ is multi_pw_aff:
1880                     args[0] = multi_pw_aff(args[0])
1881             except:
1882                 raise
1883             ctx = args[0].ctx
1884             res = isl.isl_multi_pw_aff_pullback_multi_pw_aff(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
1885             obj = multi_pw_aff(ctx=ctx, ptr=res)
1886             return obj
1887         if len(args) == 2 and args[1].__class__ is pw_multi_aff:
1888             args = list(args)
1889             try:
1890                 if not args[0].__class__ is multi_pw_aff:
1891                     args[0] = multi_pw_aff(args[0])
1892             except:
1893                 raise
1894             ctx = args[0].ctx
1895             res = isl.isl_multi_pw_aff_pullback_pw_multi_aff(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
1896             obj = multi_pw_aff(ctx=ctx, ptr=res)
1897             return obj
1898         raise Error
1899     def range_product(arg0, arg1):
1900         try:
1901             if not arg0.__class__ is multi_pw_aff:
1902                 arg0 = multi_pw_aff(arg0)
1903         except:
1904             raise
1905         try:
1906             if not arg1.__class__ is multi_pw_aff:
1907                 arg1 = multi_pw_aff(arg1)
1908         except:
1909             return multi_union_pw_aff(arg0).range_product(arg1)
1910         ctx = arg0.ctx
1911         res = isl.isl_multi_pw_aff_range_product(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_pw_aff_copy(arg1.ptr))
1912         obj = multi_pw_aff(ctx=ctx, ptr=res)
1913         return obj
1914     def range_tuple_id(arg0):
1915         try:
1916             if not arg0.__class__ is multi_pw_aff:
1917                 arg0 = multi_pw_aff(arg0)
1918         except:
1919             raise
1920         ctx = arg0.ctx
1921         res = isl.isl_multi_pw_aff_get_range_tuple_id(arg0.ptr)
1922         obj = id(ctx=ctx, ptr=res)
1923         return obj
1924     def get_range_tuple_id(arg0):
1925         return arg0.range_tuple_id()
1926     def reset_range_tuple_id(arg0):
1927         try:
1928             if not arg0.__class__ is multi_pw_aff:
1929                 arg0 = multi_pw_aff(arg0)
1930         except:
1931             raise
1932         ctx = arg0.ctx
1933         res = isl.isl_multi_pw_aff_reset_range_tuple_id(isl.isl_multi_pw_aff_copy(arg0.ptr))
1934         obj = multi_pw_aff(ctx=ctx, ptr=res)
1935         return obj
1936     def scale(*args):
1937         if len(args) == 2 and args[1].__class__ is multi_val:
1938             args = list(args)
1939             try:
1940                 if not args[0].__class__ is multi_pw_aff:
1941                     args[0] = multi_pw_aff(args[0])
1942             except:
1943                 raise
1944             ctx = args[0].ctx
1945             res = isl.isl_multi_pw_aff_scale_multi_val(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
1946             obj = multi_pw_aff(ctx=ctx, ptr=res)
1947             return obj
1948         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
1949             args = list(args)
1950             try:
1951                 if not args[0].__class__ is multi_pw_aff:
1952                     args[0] = multi_pw_aff(args[0])
1953             except:
1954                 raise
1955             try:
1956                 if not args[1].__class__ is val:
1957                     args[1] = val(args[1])
1958             except:
1959                 raise
1960             ctx = args[0].ctx
1961             res = isl.isl_multi_pw_aff_scale_val(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
1962             obj = multi_pw_aff(ctx=ctx, ptr=res)
1963             return obj
1964         raise Error
1965     def scale_down(*args):
1966         if len(args) == 2 and args[1].__class__ is multi_val:
1967             args = list(args)
1968             try:
1969                 if not args[0].__class__ is multi_pw_aff:
1970                     args[0] = multi_pw_aff(args[0])
1971             except:
1972                 raise
1973             ctx = args[0].ctx
1974             res = isl.isl_multi_pw_aff_scale_down_multi_val(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
1975             obj = multi_pw_aff(ctx=ctx, ptr=res)
1976             return obj
1977         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
1978             args = list(args)
1979             try:
1980                 if not args[0].__class__ is multi_pw_aff:
1981                     args[0] = multi_pw_aff(args[0])
1982             except:
1983                 raise
1984             try:
1985                 if not args[1].__class__ is val:
1986                     args[1] = val(args[1])
1987             except:
1988                 raise
1989             ctx = args[0].ctx
1990             res = isl.isl_multi_pw_aff_scale_down_val(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
1991             obj = multi_pw_aff(ctx=ctx, ptr=res)
1992             return obj
1993         raise Error
1994     def set_at(arg0, arg1, arg2):
1995         try:
1996             if not arg0.__class__ is multi_pw_aff:
1997                 arg0 = multi_pw_aff(arg0)
1998         except:
1999             raise
2000         try:
2001             if not arg2.__class__ is pw_aff:
2002                 arg2 = pw_aff(arg2)
2003         except:
2004             return multi_union_pw_aff(arg0).set_at(arg1, arg2)
2005         ctx = arg0.ctx
2006         res = isl.isl_multi_pw_aff_set_at(isl.isl_multi_pw_aff_copy(arg0.ptr), arg1, isl.isl_pw_aff_copy(arg2.ptr))
2007         obj = multi_pw_aff(ctx=ctx, ptr=res)
2008         return obj
2009     def set_range_tuple(*args):
2010         if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
2011             args = list(args)
2012             try:
2013                 if not args[0].__class__ is multi_pw_aff:
2014                     args[0] = multi_pw_aff(args[0])
2015             except:
2016                 raise
2017             try:
2018                 if not args[1].__class__ is id:
2019                     args[1] = id(args[1])
2020             except:
2021                 raise
2022             ctx = args[0].ctx
2023             res = isl.isl_multi_pw_aff_set_range_tuple_id(isl.isl_multi_pw_aff_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
2024             obj = multi_pw_aff(ctx=ctx, ptr=res)
2025             return obj
2026         raise Error
2027     def size(arg0):
2028         try:
2029             if not arg0.__class__ is multi_pw_aff:
2030                 arg0 = multi_pw_aff(arg0)
2031         except:
2032             raise
2033         ctx = arg0.ctx
2034         res = isl.isl_multi_pw_aff_size(arg0.ptr)
2035         if res < 0:
2036             raise Error
2037         return int(res)
2038     def space(arg0):
2039         try:
2040             if not arg0.__class__ is multi_pw_aff:
2041                 arg0 = multi_pw_aff(arg0)
2042         except:
2043             raise
2044         ctx = arg0.ctx
2045         res = isl.isl_multi_pw_aff_get_space(arg0.ptr)
2046         obj = space(ctx=ctx, ptr=res)
2047         return obj
2048     def get_space(arg0):
2049         return arg0.space()
2050     def sub(arg0, arg1):
2051         try:
2052             if not arg0.__class__ is multi_pw_aff:
2053                 arg0 = multi_pw_aff(arg0)
2054         except:
2055             raise
2056         try:
2057             if not arg1.__class__ is multi_pw_aff:
2058                 arg1 = multi_pw_aff(arg1)
2059         except:
2060             return multi_union_pw_aff(arg0).sub(arg1)
2061         ctx = arg0.ctx
2062         res = isl.isl_multi_pw_aff_sub(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_pw_aff_copy(arg1.ptr))
2063         obj = multi_pw_aff(ctx=ctx, ptr=res)
2064         return obj
2065     def unbind_params_insert_domain(arg0, arg1):
2066         try:
2067             if not arg0.__class__ is multi_pw_aff:
2068                 arg0 = multi_pw_aff(arg0)
2069         except:
2070             raise
2071         try:
2072             if not arg1.__class__ is multi_id:
2073                 arg1 = multi_id(arg1)
2074         except:
2075             return multi_union_pw_aff(arg0).unbind_params_insert_domain(arg1)
2076         ctx = arg0.ctx
2077         res = isl.isl_multi_pw_aff_unbind_params_insert_domain(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
2078         obj = multi_pw_aff(ctx=ctx, ptr=res)
2079         return obj
2080     def union_add(arg0, arg1):
2081         try:
2082             if not arg0.__class__ is multi_pw_aff:
2083                 arg0 = multi_pw_aff(arg0)
2084         except:
2085             raise
2086         try:
2087             if not arg1.__class__ is multi_pw_aff:
2088                 arg1 = multi_pw_aff(arg1)
2089         except:
2090             return multi_union_pw_aff(arg0).union_add(arg1)
2091         ctx = arg0.ctx
2092         res = isl.isl_multi_pw_aff_union_add(isl.isl_multi_pw_aff_copy(arg0.ptr), isl.isl_multi_pw_aff_copy(arg1.ptr))
2093         obj = multi_pw_aff(ctx=ctx, ptr=res)
2094         return obj
2095     @staticmethod
2096     def zero(arg0):
2097         try:
2098             if not arg0.__class__ is space:
2099                 arg0 = space(arg0)
2100         except:
2101             raise
2102         ctx = arg0.ctx
2103         res = isl.isl_multi_pw_aff_zero(isl.isl_space_copy(arg0.ptr))
2104         obj = multi_pw_aff(ctx=ctx, ptr=res)
2105         return obj
2107 isl.isl_multi_pw_aff_from_aff.restype = c_void_p
2108 isl.isl_multi_pw_aff_from_aff.argtypes = [c_void_p]
2109 isl.isl_multi_pw_aff_from_multi_aff.restype = c_void_p
2110 isl.isl_multi_pw_aff_from_multi_aff.argtypes = [c_void_p]
2111 isl.isl_multi_pw_aff_from_pw_aff.restype = c_void_p
2112 isl.isl_multi_pw_aff_from_pw_aff.argtypes = [c_void_p]
2113 isl.isl_multi_pw_aff_from_pw_aff_list.restype = c_void_p
2114 isl.isl_multi_pw_aff_from_pw_aff_list.argtypes = [c_void_p, c_void_p]
2115 isl.isl_multi_pw_aff_from_pw_multi_aff.restype = c_void_p
2116 isl.isl_multi_pw_aff_from_pw_multi_aff.argtypes = [c_void_p]
2117 isl.isl_multi_pw_aff_read_from_str.restype = c_void_p
2118 isl.isl_multi_pw_aff_read_from_str.argtypes = [Context, c_char_p]
2119 isl.isl_multi_pw_aff_add.restype = c_void_p
2120 isl.isl_multi_pw_aff_add.argtypes = [c_void_p, c_void_p]
2121 isl.isl_multi_pw_aff_add_constant_multi_val.restype = c_void_p
2122 isl.isl_multi_pw_aff_add_constant_multi_val.argtypes = [c_void_p, c_void_p]
2123 isl.isl_multi_pw_aff_add_constant_val.restype = c_void_p
2124 isl.isl_multi_pw_aff_add_constant_val.argtypes = [c_void_p, c_void_p]
2125 isl.isl_multi_pw_aff_as_map.restype = c_void_p
2126 isl.isl_multi_pw_aff_as_map.argtypes = [c_void_p]
2127 isl.isl_multi_pw_aff_as_multi_aff.restype = c_void_p
2128 isl.isl_multi_pw_aff_as_multi_aff.argtypes = [c_void_p]
2129 isl.isl_multi_pw_aff_as_set.restype = c_void_p
2130 isl.isl_multi_pw_aff_as_set.argtypes = [c_void_p]
2131 isl.isl_multi_pw_aff_get_at.restype = c_void_p
2132 isl.isl_multi_pw_aff_get_at.argtypes = [c_void_p, c_int]
2133 isl.isl_multi_pw_aff_bind.restype = c_void_p
2134 isl.isl_multi_pw_aff_bind.argtypes = [c_void_p, c_void_p]
2135 isl.isl_multi_pw_aff_bind_domain.restype = c_void_p
2136 isl.isl_multi_pw_aff_bind_domain.argtypes = [c_void_p, c_void_p]
2137 isl.isl_multi_pw_aff_bind_domain_wrapped_domain.restype = c_void_p
2138 isl.isl_multi_pw_aff_bind_domain_wrapped_domain.argtypes = [c_void_p, c_void_p]
2139 isl.isl_multi_pw_aff_coalesce.restype = c_void_p
2140 isl.isl_multi_pw_aff_coalesce.argtypes = [c_void_p]
2141 isl.isl_multi_pw_aff_domain.restype = c_void_p
2142 isl.isl_multi_pw_aff_domain.argtypes = [c_void_p]
2143 isl.isl_multi_pw_aff_domain_reverse.restype = c_void_p
2144 isl.isl_multi_pw_aff_domain_reverse.argtypes = [c_void_p]
2145 isl.isl_multi_pw_aff_flat_range_product.restype = c_void_p
2146 isl.isl_multi_pw_aff_flat_range_product.argtypes = [c_void_p, c_void_p]
2147 isl.isl_multi_pw_aff_gist.restype = c_void_p
2148 isl.isl_multi_pw_aff_gist.argtypes = [c_void_p, c_void_p]
2149 isl.isl_multi_pw_aff_gist_params.restype = c_void_p
2150 isl.isl_multi_pw_aff_gist_params.argtypes = [c_void_p, c_void_p]
2151 isl.isl_multi_pw_aff_has_range_tuple_id.argtypes = [c_void_p]
2152 isl.isl_multi_pw_aff_identity_multi_pw_aff.restype = c_void_p
2153 isl.isl_multi_pw_aff_identity_multi_pw_aff.argtypes = [c_void_p]
2154 isl.isl_multi_pw_aff_identity_on_domain_space.restype = c_void_p
2155 isl.isl_multi_pw_aff_identity_on_domain_space.argtypes = [c_void_p]
2156 isl.isl_multi_pw_aff_insert_domain.restype = c_void_p
2157 isl.isl_multi_pw_aff_insert_domain.argtypes = [c_void_p, c_void_p]
2158 isl.isl_multi_pw_aff_intersect_domain.restype = c_void_p
2159 isl.isl_multi_pw_aff_intersect_domain.argtypes = [c_void_p, c_void_p]
2160 isl.isl_multi_pw_aff_intersect_params.restype = c_void_p
2161 isl.isl_multi_pw_aff_intersect_params.argtypes = [c_void_p, c_void_p]
2162 isl.isl_multi_pw_aff_involves_nan.argtypes = [c_void_p]
2163 isl.isl_multi_pw_aff_involves_param_id.argtypes = [c_void_p, c_void_p]
2164 isl.isl_multi_pw_aff_involves_param_id_list.argtypes = [c_void_p, c_void_p]
2165 isl.isl_multi_pw_aff_isa_multi_aff.argtypes = [c_void_p]
2166 isl.isl_multi_pw_aff_get_list.restype = c_void_p
2167 isl.isl_multi_pw_aff_get_list.argtypes = [c_void_p]
2168 isl.isl_multi_pw_aff_max.restype = c_void_p
2169 isl.isl_multi_pw_aff_max.argtypes = [c_void_p, c_void_p]
2170 isl.isl_multi_pw_aff_max_multi_val.restype = c_void_p
2171 isl.isl_multi_pw_aff_max_multi_val.argtypes = [c_void_p]
2172 isl.isl_multi_pw_aff_min.restype = c_void_p
2173 isl.isl_multi_pw_aff_min.argtypes = [c_void_p, c_void_p]
2174 isl.isl_multi_pw_aff_min_multi_val.restype = c_void_p
2175 isl.isl_multi_pw_aff_min_multi_val.argtypes = [c_void_p]
2176 isl.isl_multi_pw_aff_neg.restype = c_void_p
2177 isl.isl_multi_pw_aff_neg.argtypes = [c_void_p]
2178 isl.isl_multi_pw_aff_plain_is_equal.argtypes = [c_void_p, c_void_p]
2179 isl.isl_multi_pw_aff_product.restype = c_void_p
2180 isl.isl_multi_pw_aff_product.argtypes = [c_void_p, c_void_p]
2181 isl.isl_multi_pw_aff_pullback_multi_aff.restype = c_void_p
2182 isl.isl_multi_pw_aff_pullback_multi_aff.argtypes = [c_void_p, c_void_p]
2183 isl.isl_multi_pw_aff_pullback_multi_pw_aff.restype = c_void_p
2184 isl.isl_multi_pw_aff_pullback_multi_pw_aff.argtypes = [c_void_p, c_void_p]
2185 isl.isl_multi_pw_aff_pullback_pw_multi_aff.restype = c_void_p
2186 isl.isl_multi_pw_aff_pullback_pw_multi_aff.argtypes = [c_void_p, c_void_p]
2187 isl.isl_multi_pw_aff_range_product.restype = c_void_p
2188 isl.isl_multi_pw_aff_range_product.argtypes = [c_void_p, c_void_p]
2189 isl.isl_multi_pw_aff_get_range_tuple_id.restype = c_void_p
2190 isl.isl_multi_pw_aff_get_range_tuple_id.argtypes = [c_void_p]
2191 isl.isl_multi_pw_aff_reset_range_tuple_id.restype = c_void_p
2192 isl.isl_multi_pw_aff_reset_range_tuple_id.argtypes = [c_void_p]
2193 isl.isl_multi_pw_aff_scale_multi_val.restype = c_void_p
2194 isl.isl_multi_pw_aff_scale_multi_val.argtypes = [c_void_p, c_void_p]
2195 isl.isl_multi_pw_aff_scale_val.restype = c_void_p
2196 isl.isl_multi_pw_aff_scale_val.argtypes = [c_void_p, c_void_p]
2197 isl.isl_multi_pw_aff_scale_down_multi_val.restype = c_void_p
2198 isl.isl_multi_pw_aff_scale_down_multi_val.argtypes = [c_void_p, c_void_p]
2199 isl.isl_multi_pw_aff_scale_down_val.restype = c_void_p
2200 isl.isl_multi_pw_aff_scale_down_val.argtypes = [c_void_p, c_void_p]
2201 isl.isl_multi_pw_aff_set_at.restype = c_void_p
2202 isl.isl_multi_pw_aff_set_at.argtypes = [c_void_p, c_int, c_void_p]
2203 isl.isl_multi_pw_aff_set_range_tuple_id.restype = c_void_p
2204 isl.isl_multi_pw_aff_set_range_tuple_id.argtypes = [c_void_p, c_void_p]
2205 isl.isl_multi_pw_aff_size.argtypes = [c_void_p]
2206 isl.isl_multi_pw_aff_get_space.restype = c_void_p
2207 isl.isl_multi_pw_aff_get_space.argtypes = [c_void_p]
2208 isl.isl_multi_pw_aff_sub.restype = c_void_p
2209 isl.isl_multi_pw_aff_sub.argtypes = [c_void_p, c_void_p]
2210 isl.isl_multi_pw_aff_unbind_params_insert_domain.restype = c_void_p
2211 isl.isl_multi_pw_aff_unbind_params_insert_domain.argtypes = [c_void_p, c_void_p]
2212 isl.isl_multi_pw_aff_union_add.restype = c_void_p
2213 isl.isl_multi_pw_aff_union_add.argtypes = [c_void_p, c_void_p]
2214 isl.isl_multi_pw_aff_zero.restype = c_void_p
2215 isl.isl_multi_pw_aff_zero.argtypes = [c_void_p]
2216 isl.isl_multi_pw_aff_copy.restype = c_void_p
2217 isl.isl_multi_pw_aff_copy.argtypes = [c_void_p]
2218 isl.isl_multi_pw_aff_free.restype = c_void_p
2219 isl.isl_multi_pw_aff_free.argtypes = [c_void_p]
2220 isl.isl_multi_pw_aff_to_str.restype = POINTER(c_char)
2221 isl.isl_multi_pw_aff_to_str.argtypes = [c_void_p]
2223 class pw_multi_aff(union_pw_multi_aff, multi_pw_aff):
2224     def __init__(self, *args, **keywords):
2225         if "ptr" in keywords:
2226             self.ctx = keywords["ctx"]
2227             self.ptr = keywords["ptr"]
2228             return
2229         if len(args) == 1 and args[0].__class__ is multi_aff:
2230             self.ctx = Context.getDefaultInstance()
2231             self.ptr = isl.isl_pw_multi_aff_from_multi_aff(isl.isl_multi_aff_copy(args[0].ptr))
2232             return
2233         if len(args) == 1 and args[0].__class__ is pw_aff:
2234             self.ctx = Context.getDefaultInstance()
2235             self.ptr = isl.isl_pw_multi_aff_from_pw_aff(isl.isl_pw_aff_copy(args[0].ptr))
2236             return
2237         if len(args) == 1 and type(args[0]) == str:
2238             self.ctx = Context.getDefaultInstance()
2239             self.ptr = isl.isl_pw_multi_aff_read_from_str(self.ctx, args[0].encode('ascii'))
2240             return
2241         raise Error
2242     def __del__(self):
2243         if hasattr(self, 'ptr'):
2244             isl.isl_pw_multi_aff_free(self.ptr)
2245     def __str__(arg0):
2246         try:
2247             if not arg0.__class__ is pw_multi_aff:
2248                 arg0 = pw_multi_aff(arg0)
2249         except:
2250             raise
2251         ptr = isl.isl_pw_multi_aff_to_str(arg0.ptr)
2252         res = cast(ptr, c_char_p).value.decode('ascii')
2253         libc.free(ptr)
2254         return res
2255     def __repr__(self):
2256         s = str(self)
2257         if '"' in s:
2258             return 'isl.pw_multi_aff("""%s""")' % s
2259         else:
2260             return 'isl.pw_multi_aff("%s")' % s
2261     def add(arg0, arg1):
2262         try:
2263             if not arg0.__class__ is pw_multi_aff:
2264                 arg0 = pw_multi_aff(arg0)
2265         except:
2266             raise
2267         try:
2268             if not arg1.__class__ is pw_multi_aff:
2269                 arg1 = pw_multi_aff(arg1)
2270         except:
2271             return union_pw_multi_aff(arg0).add(arg1)
2272         ctx = arg0.ctx
2273         res = isl.isl_pw_multi_aff_add(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_pw_multi_aff_copy(arg1.ptr))
2274         obj = pw_multi_aff(ctx=ctx, ptr=res)
2275         return obj
2276     def add_constant(*args):
2277         if len(args) == 2 and args[1].__class__ is multi_val:
2278             args = list(args)
2279             try:
2280                 if not args[0].__class__ is pw_multi_aff:
2281                     args[0] = pw_multi_aff(args[0])
2282             except:
2283                 raise
2284             ctx = args[0].ctx
2285             res = isl.isl_pw_multi_aff_add_constant_multi_val(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
2286             obj = pw_multi_aff(ctx=ctx, ptr=res)
2287             return obj
2288         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
2289             args = list(args)
2290             try:
2291                 if not args[0].__class__ is pw_multi_aff:
2292                     args[0] = pw_multi_aff(args[0])
2293             except:
2294                 raise
2295             try:
2296                 if not args[1].__class__ is val:
2297                     args[1] = val(args[1])
2298             except:
2299                 raise
2300             ctx = args[0].ctx
2301             res = isl.isl_pw_multi_aff_add_constant_val(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
2302             obj = pw_multi_aff(ctx=ctx, ptr=res)
2303             return obj
2304         raise Error
2305     def as_map(arg0):
2306         try:
2307             if not arg0.__class__ is pw_multi_aff:
2308                 arg0 = pw_multi_aff(arg0)
2309         except:
2310             raise
2311         ctx = arg0.ctx
2312         res = isl.isl_pw_multi_aff_as_map(isl.isl_pw_multi_aff_copy(arg0.ptr))
2313         obj = map(ctx=ctx, ptr=res)
2314         return obj
2315     def as_multi_aff(arg0):
2316         try:
2317             if not arg0.__class__ is pw_multi_aff:
2318                 arg0 = pw_multi_aff(arg0)
2319         except:
2320             raise
2321         ctx = arg0.ctx
2322         res = isl.isl_pw_multi_aff_as_multi_aff(isl.isl_pw_multi_aff_copy(arg0.ptr))
2323         obj = multi_aff(ctx=ctx, ptr=res)
2324         return obj
2325     def as_set(arg0):
2326         try:
2327             if not arg0.__class__ is pw_multi_aff:
2328                 arg0 = pw_multi_aff(arg0)
2329         except:
2330             raise
2331         ctx = arg0.ctx
2332         res = isl.isl_pw_multi_aff_as_set(isl.isl_pw_multi_aff_copy(arg0.ptr))
2333         obj = set(ctx=ctx, ptr=res)
2334         return obj
2335     def at(arg0, arg1):
2336         try:
2337             if not arg0.__class__ is pw_multi_aff:
2338                 arg0 = pw_multi_aff(arg0)
2339         except:
2340             raise
2341         ctx = arg0.ctx
2342         res = isl.isl_pw_multi_aff_get_at(arg0.ptr, arg1)
2343         obj = pw_aff(ctx=ctx, ptr=res)
2344         return obj
2345     def get_at(arg0, arg1):
2346         return arg0.at(arg1)
2347     def bind_domain(arg0, arg1):
2348         try:
2349             if not arg0.__class__ is pw_multi_aff:
2350                 arg0 = pw_multi_aff(arg0)
2351         except:
2352             raise
2353         try:
2354             if not arg1.__class__ is multi_id:
2355                 arg1 = multi_id(arg1)
2356         except:
2357             return union_pw_multi_aff(arg0).bind_domain(arg1)
2358         ctx = arg0.ctx
2359         res = isl.isl_pw_multi_aff_bind_domain(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
2360         obj = pw_multi_aff(ctx=ctx, ptr=res)
2361         return obj
2362     def bind_domain_wrapped_domain(arg0, arg1):
2363         try:
2364             if not arg0.__class__ is pw_multi_aff:
2365                 arg0 = pw_multi_aff(arg0)
2366         except:
2367             raise
2368         try:
2369             if not arg1.__class__ is multi_id:
2370                 arg1 = multi_id(arg1)
2371         except:
2372             return union_pw_multi_aff(arg0).bind_domain_wrapped_domain(arg1)
2373         ctx = arg0.ctx
2374         res = isl.isl_pw_multi_aff_bind_domain_wrapped_domain(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
2375         obj = pw_multi_aff(ctx=ctx, ptr=res)
2376         return obj
2377     def coalesce(arg0):
2378         try:
2379             if not arg0.__class__ is pw_multi_aff:
2380                 arg0 = pw_multi_aff(arg0)
2381         except:
2382             raise
2383         ctx = arg0.ctx
2384         res = isl.isl_pw_multi_aff_coalesce(isl.isl_pw_multi_aff_copy(arg0.ptr))
2385         obj = pw_multi_aff(ctx=ctx, ptr=res)
2386         return obj
2387     def domain(arg0):
2388         try:
2389             if not arg0.__class__ is pw_multi_aff:
2390                 arg0 = pw_multi_aff(arg0)
2391         except:
2392             raise
2393         ctx = arg0.ctx
2394         res = isl.isl_pw_multi_aff_domain(isl.isl_pw_multi_aff_copy(arg0.ptr))
2395         obj = set(ctx=ctx, ptr=res)
2396         return obj
2397     @staticmethod
2398     def domain_map(arg0):
2399         try:
2400             if not arg0.__class__ is space:
2401                 arg0 = space(arg0)
2402         except:
2403             raise
2404         ctx = arg0.ctx
2405         res = isl.isl_pw_multi_aff_domain_map(isl.isl_space_copy(arg0.ptr))
2406         obj = pw_multi_aff(ctx=ctx, ptr=res)
2407         return obj
2408     def domain_reverse(arg0):
2409         try:
2410             if not arg0.__class__ is pw_multi_aff:
2411                 arg0 = pw_multi_aff(arg0)
2412         except:
2413             raise
2414         ctx = arg0.ctx
2415         res = isl.isl_pw_multi_aff_domain_reverse(isl.isl_pw_multi_aff_copy(arg0.ptr))
2416         obj = pw_multi_aff(ctx=ctx, ptr=res)
2417         return obj
2418     def drop_unused_params(arg0):
2419         try:
2420             if not arg0.__class__ is pw_multi_aff:
2421                 arg0 = pw_multi_aff(arg0)
2422         except:
2423             raise
2424         ctx = arg0.ctx
2425         res = isl.isl_pw_multi_aff_drop_unused_params(isl.isl_pw_multi_aff_copy(arg0.ptr))
2426         obj = pw_multi_aff(ctx=ctx, ptr=res)
2427         return obj
2428     def flat_range_product(arg0, arg1):
2429         try:
2430             if not arg0.__class__ is pw_multi_aff:
2431                 arg0 = pw_multi_aff(arg0)
2432         except:
2433             raise
2434         try:
2435             if not arg1.__class__ is pw_multi_aff:
2436                 arg1 = pw_multi_aff(arg1)
2437         except:
2438             return union_pw_multi_aff(arg0).flat_range_product(arg1)
2439         ctx = arg0.ctx
2440         res = isl.isl_pw_multi_aff_flat_range_product(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_pw_multi_aff_copy(arg1.ptr))
2441         obj = pw_multi_aff(ctx=ctx, ptr=res)
2442         return obj
2443     def foreach_piece(arg0, arg1):
2444         try:
2445             if not arg0.__class__ is pw_multi_aff:
2446                 arg0 = pw_multi_aff(arg0)
2447         except:
2448             raise
2449         exc_info = [None]
2450         fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
2451         def cb_func(cb_arg0, cb_arg1, cb_arg2):
2452             cb_arg0 = set(ctx=arg0.ctx, ptr=(cb_arg0))
2453             cb_arg1 = multi_aff(ctx=arg0.ctx, ptr=(cb_arg1))
2454             try:
2455                 arg1(cb_arg0, cb_arg1)
2456             except BaseException as e:
2457                 exc_info[0] = e
2458                 return -1
2459             return 0
2460         cb1 = fn(cb_func)
2461         ctx = arg0.ctx
2462         res = isl.isl_pw_multi_aff_foreach_piece(arg0.ptr, cb1, None)
2463         if exc_info[0] is not None:
2464             raise exc_info[0]
2465         if res < 0:
2466             raise Error
2467     def gist(arg0, arg1):
2468         try:
2469             if not arg0.__class__ is pw_multi_aff:
2470                 arg0 = pw_multi_aff(arg0)
2471         except:
2472             raise
2473         try:
2474             if not arg1.__class__ is set:
2475                 arg1 = set(arg1)
2476         except:
2477             return union_pw_multi_aff(arg0).gist(arg1)
2478         ctx = arg0.ctx
2479         res = isl.isl_pw_multi_aff_gist(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
2480         obj = pw_multi_aff(ctx=ctx, ptr=res)
2481         return obj
2482     def gist_params(arg0, arg1):
2483         try:
2484             if not arg0.__class__ is pw_multi_aff:
2485                 arg0 = pw_multi_aff(arg0)
2486         except:
2487             raise
2488         try:
2489             if not arg1.__class__ is set:
2490                 arg1 = set(arg1)
2491         except:
2492             return union_pw_multi_aff(arg0).gist_params(arg1)
2493         ctx = arg0.ctx
2494         res = isl.isl_pw_multi_aff_gist_params(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
2495         obj = pw_multi_aff(ctx=ctx, ptr=res)
2496         return obj
2497     def has_range_tuple_id(arg0):
2498         try:
2499             if not arg0.__class__ is pw_multi_aff:
2500                 arg0 = pw_multi_aff(arg0)
2501         except:
2502             raise
2503         ctx = arg0.ctx
2504         res = isl.isl_pw_multi_aff_has_range_tuple_id(arg0.ptr)
2505         if res < 0:
2506             raise Error
2507         return bool(res)
2508     @staticmethod
2509     def identity_on_domain(*args):
2510         if len(args) == 1 and args[0].__class__ is space:
2511             ctx = args[0].ctx
2512             res = isl.isl_pw_multi_aff_identity_on_domain_space(isl.isl_space_copy(args[0].ptr))
2513             obj = pw_multi_aff(ctx=ctx, ptr=res)
2514             return obj
2515         raise Error
2516     def insert_domain(arg0, arg1):
2517         try:
2518             if not arg0.__class__ is pw_multi_aff:
2519                 arg0 = pw_multi_aff(arg0)
2520         except:
2521             raise
2522         try:
2523             if not arg1.__class__ is space:
2524                 arg1 = space(arg1)
2525         except:
2526             return union_pw_multi_aff(arg0).insert_domain(arg1)
2527         ctx = arg0.ctx
2528         res = isl.isl_pw_multi_aff_insert_domain(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_space_copy(arg1.ptr))
2529         obj = pw_multi_aff(ctx=ctx, ptr=res)
2530         return obj
2531     def intersect_domain(arg0, arg1):
2532         try:
2533             if not arg0.__class__ is pw_multi_aff:
2534                 arg0 = pw_multi_aff(arg0)
2535         except:
2536             raise
2537         try:
2538             if not arg1.__class__ is set:
2539                 arg1 = set(arg1)
2540         except:
2541             return union_pw_multi_aff(arg0).intersect_domain(arg1)
2542         ctx = arg0.ctx
2543         res = isl.isl_pw_multi_aff_intersect_domain(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
2544         obj = pw_multi_aff(ctx=ctx, ptr=res)
2545         return obj
2546     def intersect_params(arg0, arg1):
2547         try:
2548             if not arg0.__class__ is pw_multi_aff:
2549                 arg0 = pw_multi_aff(arg0)
2550         except:
2551             raise
2552         try:
2553             if not arg1.__class__ is set:
2554                 arg1 = set(arg1)
2555         except:
2556             return union_pw_multi_aff(arg0).intersect_params(arg1)
2557         ctx = arg0.ctx
2558         res = isl.isl_pw_multi_aff_intersect_params(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
2559         obj = pw_multi_aff(ctx=ctx, ptr=res)
2560         return obj
2561     def involves_locals(arg0):
2562         try:
2563             if not arg0.__class__ is pw_multi_aff:
2564                 arg0 = pw_multi_aff(arg0)
2565         except:
2566             raise
2567         ctx = arg0.ctx
2568         res = isl.isl_pw_multi_aff_involves_locals(arg0.ptr)
2569         if res < 0:
2570             raise Error
2571         return bool(res)
2572     def isa_multi_aff(arg0):
2573         try:
2574             if not arg0.__class__ is pw_multi_aff:
2575                 arg0 = pw_multi_aff(arg0)
2576         except:
2577             raise
2578         ctx = arg0.ctx
2579         res = isl.isl_pw_multi_aff_isa_multi_aff(arg0.ptr)
2580         if res < 0:
2581             raise Error
2582         return bool(res)
2583     def max_multi_val(arg0):
2584         try:
2585             if not arg0.__class__ is pw_multi_aff:
2586                 arg0 = pw_multi_aff(arg0)
2587         except:
2588             raise
2589         ctx = arg0.ctx
2590         res = isl.isl_pw_multi_aff_max_multi_val(isl.isl_pw_multi_aff_copy(arg0.ptr))
2591         obj = multi_val(ctx=ctx, ptr=res)
2592         return obj
2593     def min_multi_val(arg0):
2594         try:
2595             if not arg0.__class__ is pw_multi_aff:
2596                 arg0 = pw_multi_aff(arg0)
2597         except:
2598             raise
2599         ctx = arg0.ctx
2600         res = isl.isl_pw_multi_aff_min_multi_val(isl.isl_pw_multi_aff_copy(arg0.ptr))
2601         obj = multi_val(ctx=ctx, ptr=res)
2602         return obj
2603     @staticmethod
2604     def multi_val_on_domain(arg0, arg1):
2605         try:
2606             if not arg0.__class__ is set:
2607                 arg0 = set(arg0)
2608         except:
2609             raise
2610         try:
2611             if not arg1.__class__ is multi_val:
2612                 arg1 = multi_val(arg1)
2613         except:
2614             return union_pw_multi_aff(arg0).multi_val_on_domain(arg1)
2615         ctx = arg0.ctx
2616         res = isl.isl_pw_multi_aff_multi_val_on_domain(isl.isl_set_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
2617         obj = pw_multi_aff(ctx=ctx, ptr=res)
2618         return obj
2619     def n_piece(arg0):
2620         try:
2621             if not arg0.__class__ is pw_multi_aff:
2622                 arg0 = pw_multi_aff(arg0)
2623         except:
2624             raise
2625         ctx = arg0.ctx
2626         res = isl.isl_pw_multi_aff_n_piece(arg0.ptr)
2627         if res < 0:
2628             raise Error
2629         return int(res)
2630     def plain_is_equal(arg0, arg1):
2631         try:
2632             if not arg0.__class__ is pw_multi_aff:
2633                 arg0 = pw_multi_aff(arg0)
2634         except:
2635             raise
2636         try:
2637             if not arg1.__class__ is pw_multi_aff:
2638                 arg1 = pw_multi_aff(arg1)
2639         except:
2640             return union_pw_multi_aff(arg0).plain_is_equal(arg1)
2641         ctx = arg0.ctx
2642         res = isl.isl_pw_multi_aff_plain_is_equal(arg0.ptr, arg1.ptr)
2643         if res < 0:
2644             raise Error
2645         return bool(res)
2646     def preimage_domain_wrapped_domain(*args):
2647         if len(args) == 2 and args[1].__class__ is pw_multi_aff:
2648             args = list(args)
2649             try:
2650                 if not args[0].__class__ is pw_multi_aff:
2651                     args[0] = pw_multi_aff(args[0])
2652             except:
2653                 raise
2654             ctx = args[0].ctx
2655             res = isl.isl_pw_multi_aff_preimage_domain_wrapped_domain_pw_multi_aff(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
2656             obj = pw_multi_aff(ctx=ctx, ptr=res)
2657             return obj
2658         raise Error
2659     def product(arg0, arg1):
2660         try:
2661             if not arg0.__class__ is pw_multi_aff:
2662                 arg0 = pw_multi_aff(arg0)
2663         except:
2664             raise
2665         try:
2666             if not arg1.__class__ is pw_multi_aff:
2667                 arg1 = pw_multi_aff(arg1)
2668         except:
2669             return union_pw_multi_aff(arg0).product(arg1)
2670         ctx = arg0.ctx
2671         res = isl.isl_pw_multi_aff_product(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_pw_multi_aff_copy(arg1.ptr))
2672         obj = pw_multi_aff(ctx=ctx, ptr=res)
2673         return obj
2674     def pullback(*args):
2675         if len(args) == 2 and args[1].__class__ is multi_aff:
2676             args = list(args)
2677             try:
2678                 if not args[0].__class__ is pw_multi_aff:
2679                     args[0] = pw_multi_aff(args[0])
2680             except:
2681                 raise
2682             ctx = args[0].ctx
2683             res = isl.isl_pw_multi_aff_pullback_multi_aff(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
2684             obj = pw_multi_aff(ctx=ctx, ptr=res)
2685             return obj
2686         if len(args) == 2 and args[1].__class__ is pw_multi_aff:
2687             args = list(args)
2688             try:
2689                 if not args[0].__class__ is pw_multi_aff:
2690                     args[0] = pw_multi_aff(args[0])
2691             except:
2692                 raise
2693             ctx = args[0].ctx
2694             res = isl.isl_pw_multi_aff_pullback_pw_multi_aff(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
2695             obj = pw_multi_aff(ctx=ctx, ptr=res)
2696             return obj
2697         raise Error
2698     def range_factor_domain(arg0):
2699         try:
2700             if not arg0.__class__ is pw_multi_aff:
2701                 arg0 = pw_multi_aff(arg0)
2702         except:
2703             raise
2704         ctx = arg0.ctx
2705         res = isl.isl_pw_multi_aff_range_factor_domain(isl.isl_pw_multi_aff_copy(arg0.ptr))
2706         obj = pw_multi_aff(ctx=ctx, ptr=res)
2707         return obj
2708     def range_factor_range(arg0):
2709         try:
2710             if not arg0.__class__ is pw_multi_aff:
2711                 arg0 = pw_multi_aff(arg0)
2712         except:
2713             raise
2714         ctx = arg0.ctx
2715         res = isl.isl_pw_multi_aff_range_factor_range(isl.isl_pw_multi_aff_copy(arg0.ptr))
2716         obj = pw_multi_aff(ctx=ctx, ptr=res)
2717         return obj
2718     @staticmethod
2719     def range_map(arg0):
2720         try:
2721             if not arg0.__class__ is space:
2722                 arg0 = space(arg0)
2723         except:
2724             raise
2725         ctx = arg0.ctx
2726         res = isl.isl_pw_multi_aff_range_map(isl.isl_space_copy(arg0.ptr))
2727         obj = pw_multi_aff(ctx=ctx, ptr=res)
2728         return obj
2729     def range_product(arg0, arg1):
2730         try:
2731             if not arg0.__class__ is pw_multi_aff:
2732                 arg0 = pw_multi_aff(arg0)
2733         except:
2734             raise
2735         try:
2736             if not arg1.__class__ is pw_multi_aff:
2737                 arg1 = pw_multi_aff(arg1)
2738         except:
2739             return union_pw_multi_aff(arg0).range_product(arg1)
2740         ctx = arg0.ctx
2741         res = isl.isl_pw_multi_aff_range_product(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_pw_multi_aff_copy(arg1.ptr))
2742         obj = pw_multi_aff(ctx=ctx, ptr=res)
2743         return obj
2744     def range_tuple_id(arg0):
2745         try:
2746             if not arg0.__class__ is pw_multi_aff:
2747                 arg0 = pw_multi_aff(arg0)
2748         except:
2749             raise
2750         ctx = arg0.ctx
2751         res = isl.isl_pw_multi_aff_get_range_tuple_id(arg0.ptr)
2752         obj = id(ctx=ctx, ptr=res)
2753         return obj
2754     def get_range_tuple_id(arg0):
2755         return arg0.range_tuple_id()
2756     def scale(*args):
2757         if len(args) == 2 and args[1].__class__ is multi_val:
2758             args = list(args)
2759             try:
2760                 if not args[0].__class__ is pw_multi_aff:
2761                     args[0] = pw_multi_aff(args[0])
2762             except:
2763                 raise
2764             ctx = args[0].ctx
2765             res = isl.isl_pw_multi_aff_scale_multi_val(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
2766             obj = pw_multi_aff(ctx=ctx, ptr=res)
2767             return obj
2768         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
2769             args = list(args)
2770             try:
2771                 if not args[0].__class__ is pw_multi_aff:
2772                     args[0] = pw_multi_aff(args[0])
2773             except:
2774                 raise
2775             try:
2776                 if not args[1].__class__ is val:
2777                     args[1] = val(args[1])
2778             except:
2779                 raise
2780             ctx = args[0].ctx
2781             res = isl.isl_pw_multi_aff_scale_val(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
2782             obj = pw_multi_aff(ctx=ctx, ptr=res)
2783             return obj
2784         raise Error
2785     def scale_down(*args):
2786         if len(args) == 2 and args[1].__class__ is multi_val:
2787             args = list(args)
2788             try:
2789                 if not args[0].__class__ is pw_multi_aff:
2790                     args[0] = pw_multi_aff(args[0])
2791             except:
2792                 raise
2793             ctx = args[0].ctx
2794             res = isl.isl_pw_multi_aff_scale_down_multi_val(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
2795             obj = pw_multi_aff(ctx=ctx, ptr=res)
2796             return obj
2797         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
2798             args = list(args)
2799             try:
2800                 if not args[0].__class__ is pw_multi_aff:
2801                     args[0] = pw_multi_aff(args[0])
2802             except:
2803                 raise
2804             try:
2805                 if not args[1].__class__ is val:
2806                     args[1] = val(args[1])
2807             except:
2808                 raise
2809             ctx = args[0].ctx
2810             res = isl.isl_pw_multi_aff_scale_down_val(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
2811             obj = pw_multi_aff(ctx=ctx, ptr=res)
2812             return obj
2813         raise Error
2814     def set_range_tuple(*args):
2815         if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
2816             args = list(args)
2817             try:
2818                 if not args[0].__class__ is pw_multi_aff:
2819                     args[0] = pw_multi_aff(args[0])
2820             except:
2821                 raise
2822             try:
2823                 if not args[1].__class__ is id:
2824                     args[1] = id(args[1])
2825             except:
2826                 raise
2827             ctx = args[0].ctx
2828             res = isl.isl_pw_multi_aff_set_range_tuple_id(isl.isl_pw_multi_aff_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
2829             obj = pw_multi_aff(ctx=ctx, ptr=res)
2830             return obj
2831         raise Error
2832     def space(arg0):
2833         try:
2834             if not arg0.__class__ is pw_multi_aff:
2835                 arg0 = pw_multi_aff(arg0)
2836         except:
2837             raise
2838         ctx = arg0.ctx
2839         res = isl.isl_pw_multi_aff_get_space(arg0.ptr)
2840         obj = space(ctx=ctx, ptr=res)
2841         return obj
2842     def get_space(arg0):
2843         return arg0.space()
2844     def sub(arg0, arg1):
2845         try:
2846             if not arg0.__class__ is pw_multi_aff:
2847                 arg0 = pw_multi_aff(arg0)
2848         except:
2849             raise
2850         try:
2851             if not arg1.__class__ is pw_multi_aff:
2852                 arg1 = pw_multi_aff(arg1)
2853         except:
2854             return union_pw_multi_aff(arg0).sub(arg1)
2855         ctx = arg0.ctx
2856         res = isl.isl_pw_multi_aff_sub(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_pw_multi_aff_copy(arg1.ptr))
2857         obj = pw_multi_aff(ctx=ctx, ptr=res)
2858         return obj
2859     def subtract_domain(arg0, arg1):
2860         try:
2861             if not arg0.__class__ is pw_multi_aff:
2862                 arg0 = pw_multi_aff(arg0)
2863         except:
2864             raise
2865         try:
2866             if not arg1.__class__ is set:
2867                 arg1 = set(arg1)
2868         except:
2869             return union_pw_multi_aff(arg0).subtract_domain(arg1)
2870         ctx = arg0.ctx
2871         res = isl.isl_pw_multi_aff_subtract_domain(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
2872         obj = pw_multi_aff(ctx=ctx, ptr=res)
2873         return obj
2874     def to_list(arg0):
2875         try:
2876             if not arg0.__class__ is pw_multi_aff:
2877                 arg0 = pw_multi_aff(arg0)
2878         except:
2879             raise
2880         ctx = arg0.ctx
2881         res = isl.isl_pw_multi_aff_to_list(isl.isl_pw_multi_aff_copy(arg0.ptr))
2882         obj = pw_multi_aff_list(ctx=ctx, ptr=res)
2883         return obj
2884     def to_multi_pw_aff(arg0):
2885         try:
2886             if not arg0.__class__ is pw_multi_aff:
2887                 arg0 = pw_multi_aff(arg0)
2888         except:
2889             raise
2890         ctx = arg0.ctx
2891         res = isl.isl_pw_multi_aff_to_multi_pw_aff(isl.isl_pw_multi_aff_copy(arg0.ptr))
2892         obj = multi_pw_aff(ctx=ctx, ptr=res)
2893         return obj
2894     def to_union_pw_multi_aff(arg0):
2895         try:
2896             if not arg0.__class__ is pw_multi_aff:
2897                 arg0 = pw_multi_aff(arg0)
2898         except:
2899             raise
2900         ctx = arg0.ctx
2901         res = isl.isl_pw_multi_aff_to_union_pw_multi_aff(isl.isl_pw_multi_aff_copy(arg0.ptr))
2902         obj = union_pw_multi_aff(ctx=ctx, ptr=res)
2903         return obj
2904     def union_add(arg0, arg1):
2905         try:
2906             if not arg0.__class__ is pw_multi_aff:
2907                 arg0 = pw_multi_aff(arg0)
2908         except:
2909             raise
2910         try:
2911             if not arg1.__class__ is pw_multi_aff:
2912                 arg1 = pw_multi_aff(arg1)
2913         except:
2914             return union_pw_multi_aff(arg0).union_add(arg1)
2915         ctx = arg0.ctx
2916         res = isl.isl_pw_multi_aff_union_add(isl.isl_pw_multi_aff_copy(arg0.ptr), isl.isl_pw_multi_aff_copy(arg1.ptr))
2917         obj = pw_multi_aff(ctx=ctx, ptr=res)
2918         return obj
2919     @staticmethod
2920     def zero(arg0):
2921         try:
2922             if not arg0.__class__ is space:
2923                 arg0 = space(arg0)
2924         except:
2925             raise
2926         ctx = arg0.ctx
2927         res = isl.isl_pw_multi_aff_zero(isl.isl_space_copy(arg0.ptr))
2928         obj = pw_multi_aff(ctx=ctx, ptr=res)
2929         return obj
2931 isl.isl_pw_multi_aff_from_multi_aff.restype = c_void_p
2932 isl.isl_pw_multi_aff_from_multi_aff.argtypes = [c_void_p]
2933 isl.isl_pw_multi_aff_from_pw_aff.restype = c_void_p
2934 isl.isl_pw_multi_aff_from_pw_aff.argtypes = [c_void_p]
2935 isl.isl_pw_multi_aff_read_from_str.restype = c_void_p
2936 isl.isl_pw_multi_aff_read_from_str.argtypes = [Context, c_char_p]
2937 isl.isl_pw_multi_aff_add.restype = c_void_p
2938 isl.isl_pw_multi_aff_add.argtypes = [c_void_p, c_void_p]
2939 isl.isl_pw_multi_aff_add_constant_multi_val.restype = c_void_p
2940 isl.isl_pw_multi_aff_add_constant_multi_val.argtypes = [c_void_p, c_void_p]
2941 isl.isl_pw_multi_aff_add_constant_val.restype = c_void_p
2942 isl.isl_pw_multi_aff_add_constant_val.argtypes = [c_void_p, c_void_p]
2943 isl.isl_pw_multi_aff_as_map.restype = c_void_p
2944 isl.isl_pw_multi_aff_as_map.argtypes = [c_void_p]
2945 isl.isl_pw_multi_aff_as_multi_aff.restype = c_void_p
2946 isl.isl_pw_multi_aff_as_multi_aff.argtypes = [c_void_p]
2947 isl.isl_pw_multi_aff_as_set.restype = c_void_p
2948 isl.isl_pw_multi_aff_as_set.argtypes = [c_void_p]
2949 isl.isl_pw_multi_aff_get_at.restype = c_void_p
2950 isl.isl_pw_multi_aff_get_at.argtypes = [c_void_p, c_int]
2951 isl.isl_pw_multi_aff_bind_domain.restype = c_void_p
2952 isl.isl_pw_multi_aff_bind_domain.argtypes = [c_void_p, c_void_p]
2953 isl.isl_pw_multi_aff_bind_domain_wrapped_domain.restype = c_void_p
2954 isl.isl_pw_multi_aff_bind_domain_wrapped_domain.argtypes = [c_void_p, c_void_p]
2955 isl.isl_pw_multi_aff_coalesce.restype = c_void_p
2956 isl.isl_pw_multi_aff_coalesce.argtypes = [c_void_p]
2957 isl.isl_pw_multi_aff_domain.restype = c_void_p
2958 isl.isl_pw_multi_aff_domain.argtypes = [c_void_p]
2959 isl.isl_pw_multi_aff_domain_map.restype = c_void_p
2960 isl.isl_pw_multi_aff_domain_map.argtypes = [c_void_p]
2961 isl.isl_pw_multi_aff_domain_reverse.restype = c_void_p
2962 isl.isl_pw_multi_aff_domain_reverse.argtypes = [c_void_p]
2963 isl.isl_pw_multi_aff_drop_unused_params.restype = c_void_p
2964 isl.isl_pw_multi_aff_drop_unused_params.argtypes = [c_void_p]
2965 isl.isl_pw_multi_aff_flat_range_product.restype = c_void_p
2966 isl.isl_pw_multi_aff_flat_range_product.argtypes = [c_void_p, c_void_p]
2967 isl.isl_pw_multi_aff_foreach_piece.argtypes = [c_void_p, c_void_p, c_void_p]
2968 isl.isl_pw_multi_aff_gist.restype = c_void_p
2969 isl.isl_pw_multi_aff_gist.argtypes = [c_void_p, c_void_p]
2970 isl.isl_pw_multi_aff_gist_params.restype = c_void_p
2971 isl.isl_pw_multi_aff_gist_params.argtypes = [c_void_p, c_void_p]
2972 isl.isl_pw_multi_aff_has_range_tuple_id.argtypes = [c_void_p]
2973 isl.isl_pw_multi_aff_identity_on_domain_space.restype = c_void_p
2974 isl.isl_pw_multi_aff_identity_on_domain_space.argtypes = [c_void_p]
2975 isl.isl_pw_multi_aff_insert_domain.restype = c_void_p
2976 isl.isl_pw_multi_aff_insert_domain.argtypes = [c_void_p, c_void_p]
2977 isl.isl_pw_multi_aff_intersect_domain.restype = c_void_p
2978 isl.isl_pw_multi_aff_intersect_domain.argtypes = [c_void_p, c_void_p]
2979 isl.isl_pw_multi_aff_intersect_params.restype = c_void_p
2980 isl.isl_pw_multi_aff_intersect_params.argtypes = [c_void_p, c_void_p]
2981 isl.isl_pw_multi_aff_involves_locals.argtypes = [c_void_p]
2982 isl.isl_pw_multi_aff_isa_multi_aff.argtypes = [c_void_p]
2983 isl.isl_pw_multi_aff_max_multi_val.restype = c_void_p
2984 isl.isl_pw_multi_aff_max_multi_val.argtypes = [c_void_p]
2985 isl.isl_pw_multi_aff_min_multi_val.restype = c_void_p
2986 isl.isl_pw_multi_aff_min_multi_val.argtypes = [c_void_p]
2987 isl.isl_pw_multi_aff_multi_val_on_domain.restype = c_void_p
2988 isl.isl_pw_multi_aff_multi_val_on_domain.argtypes = [c_void_p, c_void_p]
2989 isl.isl_pw_multi_aff_n_piece.argtypes = [c_void_p]
2990 isl.isl_pw_multi_aff_plain_is_equal.argtypes = [c_void_p, c_void_p]
2991 isl.isl_pw_multi_aff_preimage_domain_wrapped_domain_pw_multi_aff.restype = c_void_p
2992 isl.isl_pw_multi_aff_preimage_domain_wrapped_domain_pw_multi_aff.argtypes = [c_void_p, c_void_p]
2993 isl.isl_pw_multi_aff_product.restype = c_void_p
2994 isl.isl_pw_multi_aff_product.argtypes = [c_void_p, c_void_p]
2995 isl.isl_pw_multi_aff_pullback_multi_aff.restype = c_void_p
2996 isl.isl_pw_multi_aff_pullback_multi_aff.argtypes = [c_void_p, c_void_p]
2997 isl.isl_pw_multi_aff_pullback_pw_multi_aff.restype = c_void_p
2998 isl.isl_pw_multi_aff_pullback_pw_multi_aff.argtypes = [c_void_p, c_void_p]
2999 isl.isl_pw_multi_aff_range_factor_domain.restype = c_void_p
3000 isl.isl_pw_multi_aff_range_factor_domain.argtypes = [c_void_p]
3001 isl.isl_pw_multi_aff_range_factor_range.restype = c_void_p
3002 isl.isl_pw_multi_aff_range_factor_range.argtypes = [c_void_p]
3003 isl.isl_pw_multi_aff_range_map.restype = c_void_p
3004 isl.isl_pw_multi_aff_range_map.argtypes = [c_void_p]
3005 isl.isl_pw_multi_aff_range_product.restype = c_void_p
3006 isl.isl_pw_multi_aff_range_product.argtypes = [c_void_p, c_void_p]
3007 isl.isl_pw_multi_aff_get_range_tuple_id.restype = c_void_p
3008 isl.isl_pw_multi_aff_get_range_tuple_id.argtypes = [c_void_p]
3009 isl.isl_pw_multi_aff_scale_multi_val.restype = c_void_p
3010 isl.isl_pw_multi_aff_scale_multi_val.argtypes = [c_void_p, c_void_p]
3011 isl.isl_pw_multi_aff_scale_val.restype = c_void_p
3012 isl.isl_pw_multi_aff_scale_val.argtypes = [c_void_p, c_void_p]
3013 isl.isl_pw_multi_aff_scale_down_multi_val.restype = c_void_p
3014 isl.isl_pw_multi_aff_scale_down_multi_val.argtypes = [c_void_p, c_void_p]
3015 isl.isl_pw_multi_aff_scale_down_val.restype = c_void_p
3016 isl.isl_pw_multi_aff_scale_down_val.argtypes = [c_void_p, c_void_p]
3017 isl.isl_pw_multi_aff_set_range_tuple_id.restype = c_void_p
3018 isl.isl_pw_multi_aff_set_range_tuple_id.argtypes = [c_void_p, c_void_p]
3019 isl.isl_pw_multi_aff_get_space.restype = c_void_p
3020 isl.isl_pw_multi_aff_get_space.argtypes = [c_void_p]
3021 isl.isl_pw_multi_aff_sub.restype = c_void_p
3022 isl.isl_pw_multi_aff_sub.argtypes = [c_void_p, c_void_p]
3023 isl.isl_pw_multi_aff_subtract_domain.restype = c_void_p
3024 isl.isl_pw_multi_aff_subtract_domain.argtypes = [c_void_p, c_void_p]
3025 isl.isl_pw_multi_aff_to_list.restype = c_void_p
3026 isl.isl_pw_multi_aff_to_list.argtypes = [c_void_p]
3027 isl.isl_pw_multi_aff_to_multi_pw_aff.restype = c_void_p
3028 isl.isl_pw_multi_aff_to_multi_pw_aff.argtypes = [c_void_p]
3029 isl.isl_pw_multi_aff_to_union_pw_multi_aff.restype = c_void_p
3030 isl.isl_pw_multi_aff_to_union_pw_multi_aff.argtypes = [c_void_p]
3031 isl.isl_pw_multi_aff_union_add.restype = c_void_p
3032 isl.isl_pw_multi_aff_union_add.argtypes = [c_void_p, c_void_p]
3033 isl.isl_pw_multi_aff_zero.restype = c_void_p
3034 isl.isl_pw_multi_aff_zero.argtypes = [c_void_p]
3035 isl.isl_pw_multi_aff_copy.restype = c_void_p
3036 isl.isl_pw_multi_aff_copy.argtypes = [c_void_p]
3037 isl.isl_pw_multi_aff_free.restype = c_void_p
3038 isl.isl_pw_multi_aff_free.argtypes = [c_void_p]
3039 isl.isl_pw_multi_aff_to_str.restype = POINTER(c_char)
3040 isl.isl_pw_multi_aff_to_str.argtypes = [c_void_p]
3042 class pw_aff(union_pw_aff, pw_multi_aff, multi_pw_aff):
3043     def __init__(self, *args, **keywords):
3044         if "ptr" in keywords:
3045             self.ctx = keywords["ctx"]
3046             self.ptr = keywords["ptr"]
3047             return
3048         if len(args) == 1 and args[0].__class__ is aff:
3049             self.ctx = Context.getDefaultInstance()
3050             self.ptr = isl.isl_pw_aff_from_aff(isl.isl_aff_copy(args[0].ptr))
3051             return
3052         if len(args) == 1 and type(args[0]) == str:
3053             self.ctx = Context.getDefaultInstance()
3054             self.ptr = isl.isl_pw_aff_read_from_str(self.ctx, args[0].encode('ascii'))
3055             return
3056         raise Error
3057     def __del__(self):
3058         if hasattr(self, 'ptr'):
3059             isl.isl_pw_aff_free(self.ptr)
3060     def __str__(arg0):
3061         try:
3062             if not arg0.__class__ is pw_aff:
3063                 arg0 = pw_aff(arg0)
3064         except:
3065             raise
3066         ptr = isl.isl_pw_aff_to_str(arg0.ptr)
3067         res = cast(ptr, c_char_p).value.decode('ascii')
3068         libc.free(ptr)
3069         return res
3070     def __repr__(self):
3071         s = str(self)
3072         if '"' in s:
3073             return 'isl.pw_aff("""%s""")' % s
3074         else:
3075             return 'isl.pw_aff("%s")' % s
3076     def add(arg0, arg1):
3077         try:
3078             if not arg0.__class__ is pw_aff:
3079                 arg0 = pw_aff(arg0)
3080         except:
3081             raise
3082         try:
3083             if not arg1.__class__ is pw_aff:
3084                 arg1 = pw_aff(arg1)
3085         except:
3086             return union_pw_aff(arg0).add(arg1)
3087         ctx = arg0.ctx
3088         res = isl.isl_pw_aff_add(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3089         obj = pw_aff(ctx=ctx, ptr=res)
3090         return obj
3091     def add_constant(*args):
3092         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
3093             args = list(args)
3094             try:
3095                 if not args[0].__class__ is pw_aff:
3096                     args[0] = pw_aff(args[0])
3097             except:
3098                 raise
3099             try:
3100                 if not args[1].__class__ is val:
3101                     args[1] = val(args[1])
3102             except:
3103                 raise
3104             ctx = args[0].ctx
3105             res = isl.isl_pw_aff_add_constant_val(isl.isl_pw_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
3106             obj = pw_aff(ctx=ctx, ptr=res)
3107             return obj
3108         raise Error
3109     def as_aff(arg0):
3110         try:
3111             if not arg0.__class__ is pw_aff:
3112                 arg0 = pw_aff(arg0)
3113         except:
3114             raise
3115         ctx = arg0.ctx
3116         res = isl.isl_pw_aff_as_aff(isl.isl_pw_aff_copy(arg0.ptr))
3117         obj = aff(ctx=ctx, ptr=res)
3118         return obj
3119     def as_map(arg0):
3120         try:
3121             if not arg0.__class__ is pw_aff:
3122                 arg0 = pw_aff(arg0)
3123         except:
3124             raise
3125         ctx = arg0.ctx
3126         res = isl.isl_pw_aff_as_map(isl.isl_pw_aff_copy(arg0.ptr))
3127         obj = map(ctx=ctx, ptr=res)
3128         return obj
3129     def bind(*args):
3130         if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
3131             args = list(args)
3132             try:
3133                 if not args[0].__class__ is pw_aff:
3134                     args[0] = pw_aff(args[0])
3135             except:
3136                 raise
3137             try:
3138                 if not args[1].__class__ is id:
3139                     args[1] = id(args[1])
3140             except:
3141                 raise
3142             ctx = args[0].ctx
3143             res = isl.isl_pw_aff_bind_id(isl.isl_pw_aff_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
3144             obj = set(ctx=ctx, ptr=res)
3145             return obj
3146         raise Error
3147     def bind_domain(arg0, arg1):
3148         try:
3149             if not arg0.__class__ is pw_aff:
3150                 arg0 = pw_aff(arg0)
3151         except:
3152             raise
3153         try:
3154             if not arg1.__class__ is multi_id:
3155                 arg1 = multi_id(arg1)
3156         except:
3157             return union_pw_aff(arg0).bind_domain(arg1)
3158         ctx = arg0.ctx
3159         res = isl.isl_pw_aff_bind_domain(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
3160         obj = pw_aff(ctx=ctx, ptr=res)
3161         return obj
3162     def bind_domain_wrapped_domain(arg0, arg1):
3163         try:
3164             if not arg0.__class__ is pw_aff:
3165                 arg0 = pw_aff(arg0)
3166         except:
3167             raise
3168         try:
3169             if not arg1.__class__ is multi_id:
3170                 arg1 = multi_id(arg1)
3171         except:
3172             return union_pw_aff(arg0).bind_domain_wrapped_domain(arg1)
3173         ctx = arg0.ctx
3174         res = isl.isl_pw_aff_bind_domain_wrapped_domain(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
3175         obj = pw_aff(ctx=ctx, ptr=res)
3176         return obj
3177     def ceil(arg0):
3178         try:
3179             if not arg0.__class__ is pw_aff:
3180                 arg0 = pw_aff(arg0)
3181         except:
3182             raise
3183         ctx = arg0.ctx
3184         res = isl.isl_pw_aff_ceil(isl.isl_pw_aff_copy(arg0.ptr))
3185         obj = pw_aff(ctx=ctx, ptr=res)
3186         return obj
3187     def coalesce(arg0):
3188         try:
3189             if not arg0.__class__ is pw_aff:
3190                 arg0 = pw_aff(arg0)
3191         except:
3192             raise
3193         ctx = arg0.ctx
3194         res = isl.isl_pw_aff_coalesce(isl.isl_pw_aff_copy(arg0.ptr))
3195         obj = pw_aff(ctx=ctx, ptr=res)
3196         return obj
3197     def cond(arg0, arg1, arg2):
3198         try:
3199             if not arg0.__class__ is pw_aff:
3200                 arg0 = pw_aff(arg0)
3201         except:
3202             raise
3203         try:
3204             if not arg1.__class__ is pw_aff:
3205                 arg1 = pw_aff(arg1)
3206         except:
3207             return union_pw_aff(arg0).cond(arg1, arg2)
3208         try:
3209             if not arg2.__class__ is pw_aff:
3210                 arg2 = pw_aff(arg2)
3211         except:
3212             return union_pw_aff(arg0).cond(arg1, arg2)
3213         ctx = arg0.ctx
3214         res = isl.isl_pw_aff_cond(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr), isl.isl_pw_aff_copy(arg2.ptr))
3215         obj = pw_aff(ctx=ctx, ptr=res)
3216         return obj
3217     def div(arg0, arg1):
3218         try:
3219             if not arg0.__class__ is pw_aff:
3220                 arg0 = pw_aff(arg0)
3221         except:
3222             raise
3223         try:
3224             if not arg1.__class__ is pw_aff:
3225                 arg1 = pw_aff(arg1)
3226         except:
3227             return union_pw_aff(arg0).div(arg1)
3228         ctx = arg0.ctx
3229         res = isl.isl_pw_aff_div(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3230         obj = pw_aff(ctx=ctx, ptr=res)
3231         return obj
3232     def domain(arg0):
3233         try:
3234             if not arg0.__class__ is pw_aff:
3235                 arg0 = pw_aff(arg0)
3236         except:
3237             raise
3238         ctx = arg0.ctx
3239         res = isl.isl_pw_aff_domain(isl.isl_pw_aff_copy(arg0.ptr))
3240         obj = set(ctx=ctx, ptr=res)
3241         return obj
3242     def domain_reverse(arg0):
3243         try:
3244             if not arg0.__class__ is pw_aff:
3245                 arg0 = pw_aff(arg0)
3246         except:
3247             raise
3248         ctx = arg0.ctx
3249         res = isl.isl_pw_aff_domain_reverse(isl.isl_pw_aff_copy(arg0.ptr))
3250         obj = pw_aff(ctx=ctx, ptr=res)
3251         return obj
3252     def drop_unused_params(arg0):
3253         try:
3254             if not arg0.__class__ is pw_aff:
3255                 arg0 = pw_aff(arg0)
3256         except:
3257             raise
3258         ctx = arg0.ctx
3259         res = isl.isl_pw_aff_drop_unused_params(isl.isl_pw_aff_copy(arg0.ptr))
3260         obj = pw_aff(ctx=ctx, ptr=res)
3261         return obj
3262     def eq_set(arg0, arg1):
3263         try:
3264             if not arg0.__class__ is pw_aff:
3265                 arg0 = pw_aff(arg0)
3266         except:
3267             raise
3268         try:
3269             if not arg1.__class__ is pw_aff:
3270                 arg1 = pw_aff(arg1)
3271         except:
3272             return union_pw_aff(arg0).eq_set(arg1)
3273         ctx = arg0.ctx
3274         res = isl.isl_pw_aff_eq_set(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3275         obj = set(ctx=ctx, ptr=res)
3276         return obj
3277     def eval(arg0, arg1):
3278         try:
3279             if not arg0.__class__ is pw_aff:
3280                 arg0 = pw_aff(arg0)
3281         except:
3282             raise
3283         try:
3284             if not arg1.__class__ is point:
3285                 arg1 = point(arg1)
3286         except:
3287             return union_pw_aff(arg0).eval(arg1)
3288         ctx = arg0.ctx
3289         res = isl.isl_pw_aff_eval(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_point_copy(arg1.ptr))
3290         obj = val(ctx=ctx, ptr=res)
3291         return obj
3292     def floor(arg0):
3293         try:
3294             if not arg0.__class__ is pw_aff:
3295                 arg0 = pw_aff(arg0)
3296         except:
3297             raise
3298         ctx = arg0.ctx
3299         res = isl.isl_pw_aff_floor(isl.isl_pw_aff_copy(arg0.ptr))
3300         obj = pw_aff(ctx=ctx, ptr=res)
3301         return obj
3302     def ge_set(arg0, arg1):
3303         try:
3304             if not arg0.__class__ is pw_aff:
3305                 arg0 = pw_aff(arg0)
3306         except:
3307             raise
3308         try:
3309             if not arg1.__class__ is pw_aff:
3310                 arg1 = pw_aff(arg1)
3311         except:
3312             return union_pw_aff(arg0).ge_set(arg1)
3313         ctx = arg0.ctx
3314         res = isl.isl_pw_aff_ge_set(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3315         obj = set(ctx=ctx, ptr=res)
3316         return obj
3317     def gist(arg0, arg1):
3318         try:
3319             if not arg0.__class__ is pw_aff:
3320                 arg0 = pw_aff(arg0)
3321         except:
3322             raise
3323         try:
3324             if not arg1.__class__ is set:
3325                 arg1 = set(arg1)
3326         except:
3327             return union_pw_aff(arg0).gist(arg1)
3328         ctx = arg0.ctx
3329         res = isl.isl_pw_aff_gist(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
3330         obj = pw_aff(ctx=ctx, ptr=res)
3331         return obj
3332     def gist_params(arg0, arg1):
3333         try:
3334             if not arg0.__class__ is pw_aff:
3335                 arg0 = pw_aff(arg0)
3336         except:
3337             raise
3338         try:
3339             if not arg1.__class__ is set:
3340                 arg1 = set(arg1)
3341         except:
3342             return union_pw_aff(arg0).gist_params(arg1)
3343         ctx = arg0.ctx
3344         res = isl.isl_pw_aff_gist_params(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
3345         obj = pw_aff(ctx=ctx, ptr=res)
3346         return obj
3347     def gt_set(arg0, arg1):
3348         try:
3349             if not arg0.__class__ is pw_aff:
3350                 arg0 = pw_aff(arg0)
3351         except:
3352             raise
3353         try:
3354             if not arg1.__class__ is pw_aff:
3355                 arg1 = pw_aff(arg1)
3356         except:
3357             return union_pw_aff(arg0).gt_set(arg1)
3358         ctx = arg0.ctx
3359         res = isl.isl_pw_aff_gt_set(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3360         obj = set(ctx=ctx, ptr=res)
3361         return obj
3362     def insert_domain(arg0, arg1):
3363         try:
3364             if not arg0.__class__ is pw_aff:
3365                 arg0 = pw_aff(arg0)
3366         except:
3367             raise
3368         try:
3369             if not arg1.__class__ is space:
3370                 arg1 = space(arg1)
3371         except:
3372             return union_pw_aff(arg0).insert_domain(arg1)
3373         ctx = arg0.ctx
3374         res = isl.isl_pw_aff_insert_domain(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_space_copy(arg1.ptr))
3375         obj = pw_aff(ctx=ctx, ptr=res)
3376         return obj
3377     def intersect_domain(arg0, arg1):
3378         try:
3379             if not arg0.__class__ is pw_aff:
3380                 arg0 = pw_aff(arg0)
3381         except:
3382             raise
3383         try:
3384             if not arg1.__class__ is set:
3385                 arg1 = set(arg1)
3386         except:
3387             return union_pw_aff(arg0).intersect_domain(arg1)
3388         ctx = arg0.ctx
3389         res = isl.isl_pw_aff_intersect_domain(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
3390         obj = pw_aff(ctx=ctx, ptr=res)
3391         return obj
3392     def intersect_params(arg0, arg1):
3393         try:
3394             if not arg0.__class__ is pw_aff:
3395                 arg0 = pw_aff(arg0)
3396         except:
3397             raise
3398         try:
3399             if not arg1.__class__ is set:
3400                 arg1 = set(arg1)
3401         except:
3402             return union_pw_aff(arg0).intersect_params(arg1)
3403         ctx = arg0.ctx
3404         res = isl.isl_pw_aff_intersect_params(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
3405         obj = pw_aff(ctx=ctx, ptr=res)
3406         return obj
3407     def isa_aff(arg0):
3408         try:
3409             if not arg0.__class__ is pw_aff:
3410                 arg0 = pw_aff(arg0)
3411         except:
3412             raise
3413         ctx = arg0.ctx
3414         res = isl.isl_pw_aff_isa_aff(arg0.ptr)
3415         if res < 0:
3416             raise Error
3417         return bool(res)
3418     def le_set(arg0, arg1):
3419         try:
3420             if not arg0.__class__ is pw_aff:
3421                 arg0 = pw_aff(arg0)
3422         except:
3423             raise
3424         try:
3425             if not arg1.__class__ is pw_aff:
3426                 arg1 = pw_aff(arg1)
3427         except:
3428             return union_pw_aff(arg0).le_set(arg1)
3429         ctx = arg0.ctx
3430         res = isl.isl_pw_aff_le_set(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3431         obj = set(ctx=ctx, ptr=res)
3432         return obj
3433     def lt_set(arg0, arg1):
3434         try:
3435             if not arg0.__class__ is pw_aff:
3436                 arg0 = pw_aff(arg0)
3437         except:
3438             raise
3439         try:
3440             if not arg1.__class__ is pw_aff:
3441                 arg1 = pw_aff(arg1)
3442         except:
3443             return union_pw_aff(arg0).lt_set(arg1)
3444         ctx = arg0.ctx
3445         res = isl.isl_pw_aff_lt_set(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3446         obj = set(ctx=ctx, ptr=res)
3447         return obj
3448     def max(arg0, arg1):
3449         try:
3450             if not arg0.__class__ is pw_aff:
3451                 arg0 = pw_aff(arg0)
3452         except:
3453             raise
3454         try:
3455             if not arg1.__class__ is pw_aff:
3456                 arg1 = pw_aff(arg1)
3457         except:
3458             return union_pw_aff(arg0).max(arg1)
3459         ctx = arg0.ctx
3460         res = isl.isl_pw_aff_max(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3461         obj = pw_aff(ctx=ctx, ptr=res)
3462         return obj
3463     def max_val(arg0):
3464         try:
3465             if not arg0.__class__ is pw_aff:
3466                 arg0 = pw_aff(arg0)
3467         except:
3468             raise
3469         ctx = arg0.ctx
3470         res = isl.isl_pw_aff_max_val(isl.isl_pw_aff_copy(arg0.ptr))
3471         obj = val(ctx=ctx, ptr=res)
3472         return obj
3473     def min(arg0, arg1):
3474         try:
3475             if not arg0.__class__ is pw_aff:
3476                 arg0 = pw_aff(arg0)
3477         except:
3478             raise
3479         try:
3480             if not arg1.__class__ is pw_aff:
3481                 arg1 = pw_aff(arg1)
3482         except:
3483             return union_pw_aff(arg0).min(arg1)
3484         ctx = arg0.ctx
3485         res = isl.isl_pw_aff_min(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3486         obj = pw_aff(ctx=ctx, ptr=res)
3487         return obj
3488     def min_val(arg0):
3489         try:
3490             if not arg0.__class__ is pw_aff:
3491                 arg0 = pw_aff(arg0)
3492         except:
3493             raise
3494         ctx = arg0.ctx
3495         res = isl.isl_pw_aff_min_val(isl.isl_pw_aff_copy(arg0.ptr))
3496         obj = val(ctx=ctx, ptr=res)
3497         return obj
3498     def mod(*args):
3499         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
3500             args = list(args)
3501             try:
3502                 if not args[0].__class__ is pw_aff:
3503                     args[0] = pw_aff(args[0])
3504             except:
3505                 raise
3506             try:
3507                 if not args[1].__class__ is val:
3508                     args[1] = val(args[1])
3509             except:
3510                 raise
3511             ctx = args[0].ctx
3512             res = isl.isl_pw_aff_mod_val(isl.isl_pw_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
3513             obj = pw_aff(ctx=ctx, ptr=res)
3514             return obj
3515         raise Error
3516     def mul(arg0, arg1):
3517         try:
3518             if not arg0.__class__ is pw_aff:
3519                 arg0 = pw_aff(arg0)
3520         except:
3521             raise
3522         try:
3523             if not arg1.__class__ is pw_aff:
3524                 arg1 = pw_aff(arg1)
3525         except:
3526             return union_pw_aff(arg0).mul(arg1)
3527         ctx = arg0.ctx
3528         res = isl.isl_pw_aff_mul(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3529         obj = pw_aff(ctx=ctx, ptr=res)
3530         return obj
3531     def ne_set(arg0, arg1):
3532         try:
3533             if not arg0.__class__ is pw_aff:
3534                 arg0 = pw_aff(arg0)
3535         except:
3536             raise
3537         try:
3538             if not arg1.__class__ is pw_aff:
3539                 arg1 = pw_aff(arg1)
3540         except:
3541             return union_pw_aff(arg0).ne_set(arg1)
3542         ctx = arg0.ctx
3543         res = isl.isl_pw_aff_ne_set(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3544         obj = set(ctx=ctx, ptr=res)
3545         return obj
3546     def neg(arg0):
3547         try:
3548             if not arg0.__class__ is pw_aff:
3549                 arg0 = pw_aff(arg0)
3550         except:
3551             raise
3552         ctx = arg0.ctx
3553         res = isl.isl_pw_aff_neg(isl.isl_pw_aff_copy(arg0.ptr))
3554         obj = pw_aff(ctx=ctx, ptr=res)
3555         return obj
3556     @staticmethod
3557     def param_on_domain(*args):
3558         if len(args) == 2 and args[0].__class__ is set and (args[1].__class__ is id or type(args[1]) == str):
3559             args = list(args)
3560             try:
3561                 if not args[1].__class__ is id:
3562                     args[1] = id(args[1])
3563             except:
3564                 raise
3565             ctx = args[0].ctx
3566             res = isl.isl_pw_aff_param_on_domain_id(isl.isl_set_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
3567             obj = pw_aff(ctx=ctx, ptr=res)
3568             return obj
3569         raise Error
3570     def params(arg0):
3571         try:
3572             if not arg0.__class__ is pw_aff:
3573                 arg0 = pw_aff(arg0)
3574         except:
3575             raise
3576         ctx = arg0.ctx
3577         res = isl.isl_pw_aff_params(isl.isl_pw_aff_copy(arg0.ptr))
3578         obj = set(ctx=ctx, ptr=res)
3579         return obj
3580     def plain_is_equal(arg0, arg1):
3581         try:
3582             if not arg0.__class__ is pw_aff:
3583                 arg0 = pw_aff(arg0)
3584         except:
3585             raise
3586         try:
3587             if not arg1.__class__ is pw_aff:
3588                 arg1 = pw_aff(arg1)
3589         except:
3590             return union_pw_aff(arg0).plain_is_equal(arg1)
3591         ctx = arg0.ctx
3592         res = isl.isl_pw_aff_plain_is_equal(arg0.ptr, arg1.ptr)
3593         if res < 0:
3594             raise Error
3595         return bool(res)
3596     def pullback(*args):
3597         if len(args) == 2 and args[1].__class__ is multi_aff:
3598             args = list(args)
3599             try:
3600                 if not args[0].__class__ is pw_aff:
3601                     args[0] = pw_aff(args[0])
3602             except:
3603                 raise
3604             ctx = args[0].ctx
3605             res = isl.isl_pw_aff_pullback_multi_aff(isl.isl_pw_aff_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
3606             obj = pw_aff(ctx=ctx, ptr=res)
3607             return obj
3608         if len(args) == 2 and args[1].__class__ is multi_pw_aff:
3609             args = list(args)
3610             try:
3611                 if not args[0].__class__ is pw_aff:
3612                     args[0] = pw_aff(args[0])
3613             except:
3614                 raise
3615             ctx = args[0].ctx
3616             res = isl.isl_pw_aff_pullback_multi_pw_aff(isl.isl_pw_aff_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
3617             obj = pw_aff(ctx=ctx, ptr=res)
3618             return obj
3619         if len(args) == 2 and args[1].__class__ is pw_multi_aff:
3620             args = list(args)
3621             try:
3622                 if not args[0].__class__ is pw_aff:
3623                     args[0] = pw_aff(args[0])
3624             except:
3625                 raise
3626             ctx = args[0].ctx
3627             res = isl.isl_pw_aff_pullback_pw_multi_aff(isl.isl_pw_aff_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
3628             obj = pw_aff(ctx=ctx, ptr=res)
3629             return obj
3630         raise Error
3631     def scale(*args):
3632         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
3633             args = list(args)
3634             try:
3635                 if not args[0].__class__ is pw_aff:
3636                     args[0] = pw_aff(args[0])
3637             except:
3638                 raise
3639             try:
3640                 if not args[1].__class__ is val:
3641                     args[1] = val(args[1])
3642             except:
3643                 raise
3644             ctx = args[0].ctx
3645             res = isl.isl_pw_aff_scale_val(isl.isl_pw_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
3646             obj = pw_aff(ctx=ctx, ptr=res)
3647             return obj
3648         raise Error
3649     def scale_down(*args):
3650         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
3651             args = list(args)
3652             try:
3653                 if not args[0].__class__ is pw_aff:
3654                     args[0] = pw_aff(args[0])
3655             except:
3656                 raise
3657             try:
3658                 if not args[1].__class__ is val:
3659                     args[1] = val(args[1])
3660             except:
3661                 raise
3662             ctx = args[0].ctx
3663             res = isl.isl_pw_aff_scale_down_val(isl.isl_pw_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
3664             obj = pw_aff(ctx=ctx, ptr=res)
3665             return obj
3666         raise Error
3667     def space(arg0):
3668         try:
3669             if not arg0.__class__ is pw_aff:
3670                 arg0 = pw_aff(arg0)
3671         except:
3672             raise
3673         ctx = arg0.ctx
3674         res = isl.isl_pw_aff_get_space(arg0.ptr)
3675         obj = space(ctx=ctx, ptr=res)
3676         return obj
3677     def get_space(arg0):
3678         return arg0.space()
3679     def sub(arg0, arg1):
3680         try:
3681             if not arg0.__class__ is pw_aff:
3682                 arg0 = pw_aff(arg0)
3683         except:
3684             raise
3685         try:
3686             if not arg1.__class__ is pw_aff:
3687                 arg1 = pw_aff(arg1)
3688         except:
3689             return union_pw_aff(arg0).sub(arg1)
3690         ctx = arg0.ctx
3691         res = isl.isl_pw_aff_sub(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3692         obj = pw_aff(ctx=ctx, ptr=res)
3693         return obj
3694     def subtract_domain(arg0, arg1):
3695         try:
3696             if not arg0.__class__ is pw_aff:
3697                 arg0 = pw_aff(arg0)
3698         except:
3699             raise
3700         try:
3701             if not arg1.__class__ is set:
3702                 arg1 = set(arg1)
3703         except:
3704             return union_pw_aff(arg0).subtract_domain(arg1)
3705         ctx = arg0.ctx
3706         res = isl.isl_pw_aff_subtract_domain(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
3707         obj = pw_aff(ctx=ctx, ptr=res)
3708         return obj
3709     def tdiv_q(arg0, arg1):
3710         try:
3711             if not arg0.__class__ is pw_aff:
3712                 arg0 = pw_aff(arg0)
3713         except:
3714             raise
3715         try:
3716             if not arg1.__class__ is pw_aff:
3717                 arg1 = pw_aff(arg1)
3718         except:
3719             return union_pw_aff(arg0).tdiv_q(arg1)
3720         ctx = arg0.ctx
3721         res = isl.isl_pw_aff_tdiv_q(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3722         obj = pw_aff(ctx=ctx, ptr=res)
3723         return obj
3724     def tdiv_r(arg0, arg1):
3725         try:
3726             if not arg0.__class__ is pw_aff:
3727                 arg0 = pw_aff(arg0)
3728         except:
3729             raise
3730         try:
3731             if not arg1.__class__ is pw_aff:
3732                 arg1 = pw_aff(arg1)
3733         except:
3734             return union_pw_aff(arg0).tdiv_r(arg1)
3735         ctx = arg0.ctx
3736         res = isl.isl_pw_aff_tdiv_r(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3737         obj = pw_aff(ctx=ctx, ptr=res)
3738         return obj
3739     def to_list(arg0):
3740         try:
3741             if not arg0.__class__ is pw_aff:
3742                 arg0 = pw_aff(arg0)
3743         except:
3744             raise
3745         ctx = arg0.ctx
3746         res = isl.isl_pw_aff_to_list(isl.isl_pw_aff_copy(arg0.ptr))
3747         obj = pw_aff_list(ctx=ctx, ptr=res)
3748         return obj
3749     def to_union_pw_aff(arg0):
3750         try:
3751             if not arg0.__class__ is pw_aff:
3752                 arg0 = pw_aff(arg0)
3753         except:
3754             raise
3755         ctx = arg0.ctx
3756         res = isl.isl_pw_aff_to_union_pw_aff(isl.isl_pw_aff_copy(arg0.ptr))
3757         obj = union_pw_aff(ctx=ctx, ptr=res)
3758         return obj
3759     def union_add(arg0, arg1):
3760         try:
3761             if not arg0.__class__ is pw_aff:
3762                 arg0 = pw_aff(arg0)
3763         except:
3764             raise
3765         try:
3766             if not arg1.__class__ is pw_aff:
3767                 arg1 = pw_aff(arg1)
3768         except:
3769             return union_pw_aff(arg0).union_add(arg1)
3770         ctx = arg0.ctx
3771         res = isl.isl_pw_aff_union_add(isl.isl_pw_aff_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
3772         obj = pw_aff(ctx=ctx, ptr=res)
3773         return obj
3775 isl.isl_pw_aff_from_aff.restype = c_void_p
3776 isl.isl_pw_aff_from_aff.argtypes = [c_void_p]
3777 isl.isl_pw_aff_read_from_str.restype = c_void_p
3778 isl.isl_pw_aff_read_from_str.argtypes = [Context, c_char_p]
3779 isl.isl_pw_aff_add.restype = c_void_p
3780 isl.isl_pw_aff_add.argtypes = [c_void_p, c_void_p]
3781 isl.isl_pw_aff_add_constant_val.restype = c_void_p
3782 isl.isl_pw_aff_add_constant_val.argtypes = [c_void_p, c_void_p]
3783 isl.isl_pw_aff_as_aff.restype = c_void_p
3784 isl.isl_pw_aff_as_aff.argtypes = [c_void_p]
3785 isl.isl_pw_aff_as_map.restype = c_void_p
3786 isl.isl_pw_aff_as_map.argtypes = [c_void_p]
3787 isl.isl_pw_aff_bind_id.restype = c_void_p
3788 isl.isl_pw_aff_bind_id.argtypes = [c_void_p, c_void_p]
3789 isl.isl_pw_aff_bind_domain.restype = c_void_p
3790 isl.isl_pw_aff_bind_domain.argtypes = [c_void_p, c_void_p]
3791 isl.isl_pw_aff_bind_domain_wrapped_domain.restype = c_void_p
3792 isl.isl_pw_aff_bind_domain_wrapped_domain.argtypes = [c_void_p, c_void_p]
3793 isl.isl_pw_aff_ceil.restype = c_void_p
3794 isl.isl_pw_aff_ceil.argtypes = [c_void_p]
3795 isl.isl_pw_aff_coalesce.restype = c_void_p
3796 isl.isl_pw_aff_coalesce.argtypes = [c_void_p]
3797 isl.isl_pw_aff_cond.restype = c_void_p
3798 isl.isl_pw_aff_cond.argtypes = [c_void_p, c_void_p, c_void_p]
3799 isl.isl_pw_aff_div.restype = c_void_p
3800 isl.isl_pw_aff_div.argtypes = [c_void_p, c_void_p]
3801 isl.isl_pw_aff_domain.restype = c_void_p
3802 isl.isl_pw_aff_domain.argtypes = [c_void_p]
3803 isl.isl_pw_aff_domain_reverse.restype = c_void_p
3804 isl.isl_pw_aff_domain_reverse.argtypes = [c_void_p]
3805 isl.isl_pw_aff_drop_unused_params.restype = c_void_p
3806 isl.isl_pw_aff_drop_unused_params.argtypes = [c_void_p]
3807 isl.isl_pw_aff_eq_set.restype = c_void_p
3808 isl.isl_pw_aff_eq_set.argtypes = [c_void_p, c_void_p]
3809 isl.isl_pw_aff_eval.restype = c_void_p
3810 isl.isl_pw_aff_eval.argtypes = [c_void_p, c_void_p]
3811 isl.isl_pw_aff_floor.restype = c_void_p
3812 isl.isl_pw_aff_floor.argtypes = [c_void_p]
3813 isl.isl_pw_aff_ge_set.restype = c_void_p
3814 isl.isl_pw_aff_ge_set.argtypes = [c_void_p, c_void_p]
3815 isl.isl_pw_aff_gist.restype = c_void_p
3816 isl.isl_pw_aff_gist.argtypes = [c_void_p, c_void_p]
3817 isl.isl_pw_aff_gist_params.restype = c_void_p
3818 isl.isl_pw_aff_gist_params.argtypes = [c_void_p, c_void_p]
3819 isl.isl_pw_aff_gt_set.restype = c_void_p
3820 isl.isl_pw_aff_gt_set.argtypes = [c_void_p, c_void_p]
3821 isl.isl_pw_aff_insert_domain.restype = c_void_p
3822 isl.isl_pw_aff_insert_domain.argtypes = [c_void_p, c_void_p]
3823 isl.isl_pw_aff_intersect_domain.restype = c_void_p
3824 isl.isl_pw_aff_intersect_domain.argtypes = [c_void_p, c_void_p]
3825 isl.isl_pw_aff_intersect_params.restype = c_void_p
3826 isl.isl_pw_aff_intersect_params.argtypes = [c_void_p, c_void_p]
3827 isl.isl_pw_aff_isa_aff.argtypes = [c_void_p]
3828 isl.isl_pw_aff_le_set.restype = c_void_p
3829 isl.isl_pw_aff_le_set.argtypes = [c_void_p, c_void_p]
3830 isl.isl_pw_aff_lt_set.restype = c_void_p
3831 isl.isl_pw_aff_lt_set.argtypes = [c_void_p, c_void_p]
3832 isl.isl_pw_aff_max.restype = c_void_p
3833 isl.isl_pw_aff_max.argtypes = [c_void_p, c_void_p]
3834 isl.isl_pw_aff_max_val.restype = c_void_p
3835 isl.isl_pw_aff_max_val.argtypes = [c_void_p]
3836 isl.isl_pw_aff_min.restype = c_void_p
3837 isl.isl_pw_aff_min.argtypes = [c_void_p, c_void_p]
3838 isl.isl_pw_aff_min_val.restype = c_void_p
3839 isl.isl_pw_aff_min_val.argtypes = [c_void_p]
3840 isl.isl_pw_aff_mod_val.restype = c_void_p
3841 isl.isl_pw_aff_mod_val.argtypes = [c_void_p, c_void_p]
3842 isl.isl_pw_aff_mul.restype = c_void_p
3843 isl.isl_pw_aff_mul.argtypes = [c_void_p, c_void_p]
3844 isl.isl_pw_aff_ne_set.restype = c_void_p
3845 isl.isl_pw_aff_ne_set.argtypes = [c_void_p, c_void_p]
3846 isl.isl_pw_aff_neg.restype = c_void_p
3847 isl.isl_pw_aff_neg.argtypes = [c_void_p]
3848 isl.isl_pw_aff_param_on_domain_id.restype = c_void_p
3849 isl.isl_pw_aff_param_on_domain_id.argtypes = [c_void_p, c_void_p]
3850 isl.isl_pw_aff_params.restype = c_void_p
3851 isl.isl_pw_aff_params.argtypes = [c_void_p]
3852 isl.isl_pw_aff_plain_is_equal.argtypes = [c_void_p, c_void_p]
3853 isl.isl_pw_aff_pullback_multi_aff.restype = c_void_p
3854 isl.isl_pw_aff_pullback_multi_aff.argtypes = [c_void_p, c_void_p]
3855 isl.isl_pw_aff_pullback_multi_pw_aff.restype = c_void_p
3856 isl.isl_pw_aff_pullback_multi_pw_aff.argtypes = [c_void_p, c_void_p]
3857 isl.isl_pw_aff_pullback_pw_multi_aff.restype = c_void_p
3858 isl.isl_pw_aff_pullback_pw_multi_aff.argtypes = [c_void_p, c_void_p]
3859 isl.isl_pw_aff_scale_val.restype = c_void_p
3860 isl.isl_pw_aff_scale_val.argtypes = [c_void_p, c_void_p]
3861 isl.isl_pw_aff_scale_down_val.restype = c_void_p
3862 isl.isl_pw_aff_scale_down_val.argtypes = [c_void_p, c_void_p]
3863 isl.isl_pw_aff_get_space.restype = c_void_p
3864 isl.isl_pw_aff_get_space.argtypes = [c_void_p]
3865 isl.isl_pw_aff_sub.restype = c_void_p
3866 isl.isl_pw_aff_sub.argtypes = [c_void_p, c_void_p]
3867 isl.isl_pw_aff_subtract_domain.restype = c_void_p
3868 isl.isl_pw_aff_subtract_domain.argtypes = [c_void_p, c_void_p]
3869 isl.isl_pw_aff_tdiv_q.restype = c_void_p
3870 isl.isl_pw_aff_tdiv_q.argtypes = [c_void_p, c_void_p]
3871 isl.isl_pw_aff_tdiv_r.restype = c_void_p
3872 isl.isl_pw_aff_tdiv_r.argtypes = [c_void_p, c_void_p]
3873 isl.isl_pw_aff_to_list.restype = c_void_p
3874 isl.isl_pw_aff_to_list.argtypes = [c_void_p]
3875 isl.isl_pw_aff_to_union_pw_aff.restype = c_void_p
3876 isl.isl_pw_aff_to_union_pw_aff.argtypes = [c_void_p]
3877 isl.isl_pw_aff_union_add.restype = c_void_p
3878 isl.isl_pw_aff_union_add.argtypes = [c_void_p, c_void_p]
3879 isl.isl_pw_aff_copy.restype = c_void_p
3880 isl.isl_pw_aff_copy.argtypes = [c_void_p]
3881 isl.isl_pw_aff_free.restype = c_void_p
3882 isl.isl_pw_aff_free.argtypes = [c_void_p]
3883 isl.isl_pw_aff_to_str.restype = POINTER(c_char)
3884 isl.isl_pw_aff_to_str.argtypes = [c_void_p]
3886 class multi_aff(pw_multi_aff, multi_pw_aff):
3887     def __init__(self, *args, **keywords):
3888         if "ptr" in keywords:
3889             self.ctx = keywords["ctx"]
3890             self.ptr = keywords["ptr"]
3891             return
3892         if len(args) == 1 and args[0].__class__ is aff:
3893             self.ctx = Context.getDefaultInstance()
3894             self.ptr = isl.isl_multi_aff_from_aff(isl.isl_aff_copy(args[0].ptr))
3895             return
3896         if len(args) == 2 and args[0].__class__ is space and args[1].__class__ is aff_list:
3897             self.ctx = Context.getDefaultInstance()
3898             self.ptr = isl.isl_multi_aff_from_aff_list(isl.isl_space_copy(args[0].ptr), isl.isl_aff_list_copy(args[1].ptr))
3899             return
3900         if len(args) == 1 and type(args[0]) == str:
3901             self.ctx = Context.getDefaultInstance()
3902             self.ptr = isl.isl_multi_aff_read_from_str(self.ctx, args[0].encode('ascii'))
3903             return
3904         raise Error
3905     def __del__(self):
3906         if hasattr(self, 'ptr'):
3907             isl.isl_multi_aff_free(self.ptr)
3908     def __str__(arg0):
3909         try:
3910             if not arg0.__class__ is multi_aff:
3911                 arg0 = multi_aff(arg0)
3912         except:
3913             raise
3914         ptr = isl.isl_multi_aff_to_str(arg0.ptr)
3915         res = cast(ptr, c_char_p).value.decode('ascii')
3916         libc.free(ptr)
3917         return res
3918     def __repr__(self):
3919         s = str(self)
3920         if '"' in s:
3921             return 'isl.multi_aff("""%s""")' % s
3922         else:
3923             return 'isl.multi_aff("%s")' % s
3924     def add(arg0, arg1):
3925         try:
3926             if not arg0.__class__ is multi_aff:
3927                 arg0 = multi_aff(arg0)
3928         except:
3929             raise
3930         try:
3931             if not arg1.__class__ is multi_aff:
3932                 arg1 = multi_aff(arg1)
3933         except:
3934             return pw_multi_aff(arg0).add(arg1)
3935         ctx = arg0.ctx
3936         res = isl.isl_multi_aff_add(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_multi_aff_copy(arg1.ptr))
3937         obj = multi_aff(ctx=ctx, ptr=res)
3938         return obj
3939     def add_constant(*args):
3940         if len(args) == 2 and args[1].__class__ is multi_val:
3941             args = list(args)
3942             try:
3943                 if not args[0].__class__ is multi_aff:
3944                     args[0] = multi_aff(args[0])
3945             except:
3946                 raise
3947             ctx = args[0].ctx
3948             res = isl.isl_multi_aff_add_constant_multi_val(isl.isl_multi_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
3949             obj = multi_aff(ctx=ctx, ptr=res)
3950             return obj
3951         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
3952             args = list(args)
3953             try:
3954                 if not args[0].__class__ is multi_aff:
3955                     args[0] = multi_aff(args[0])
3956             except:
3957                 raise
3958             try:
3959                 if not args[1].__class__ is val:
3960                     args[1] = val(args[1])
3961             except:
3962                 raise
3963             ctx = args[0].ctx
3964             res = isl.isl_multi_aff_add_constant_val(isl.isl_multi_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
3965             obj = multi_aff(ctx=ctx, ptr=res)
3966             return obj
3967         raise Error
3968     def as_map(arg0):
3969         try:
3970             if not arg0.__class__ is multi_aff:
3971                 arg0 = multi_aff(arg0)
3972         except:
3973             raise
3974         ctx = arg0.ctx
3975         res = isl.isl_multi_aff_as_map(isl.isl_multi_aff_copy(arg0.ptr))
3976         obj = map(ctx=ctx, ptr=res)
3977         return obj
3978     def as_set(arg0):
3979         try:
3980             if not arg0.__class__ is multi_aff:
3981                 arg0 = multi_aff(arg0)
3982         except:
3983             raise
3984         ctx = arg0.ctx
3985         res = isl.isl_multi_aff_as_set(isl.isl_multi_aff_copy(arg0.ptr))
3986         obj = set(ctx=ctx, ptr=res)
3987         return obj
3988     def at(arg0, arg1):
3989         try:
3990             if not arg0.__class__ is multi_aff:
3991                 arg0 = multi_aff(arg0)
3992         except:
3993             raise
3994         ctx = arg0.ctx
3995         res = isl.isl_multi_aff_get_at(arg0.ptr, arg1)
3996         obj = aff(ctx=ctx, ptr=res)
3997         return obj
3998     def get_at(arg0, arg1):
3999         return arg0.at(arg1)
4000     def bind(arg0, arg1):
4001         try:
4002             if not arg0.__class__ is multi_aff:
4003                 arg0 = multi_aff(arg0)
4004         except:
4005             raise
4006         try:
4007             if not arg1.__class__ is multi_id:
4008                 arg1 = multi_id(arg1)
4009         except:
4010             return pw_multi_aff(arg0).bind(arg1)
4011         ctx = arg0.ctx
4012         res = isl.isl_multi_aff_bind(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
4013         obj = basic_set(ctx=ctx, ptr=res)
4014         return obj
4015     def bind_domain(arg0, arg1):
4016         try:
4017             if not arg0.__class__ is multi_aff:
4018                 arg0 = multi_aff(arg0)
4019         except:
4020             raise
4021         try:
4022             if not arg1.__class__ is multi_id:
4023                 arg1 = multi_id(arg1)
4024         except:
4025             return pw_multi_aff(arg0).bind_domain(arg1)
4026         ctx = arg0.ctx
4027         res = isl.isl_multi_aff_bind_domain(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
4028         obj = multi_aff(ctx=ctx, ptr=res)
4029         return obj
4030     def bind_domain_wrapped_domain(arg0, arg1):
4031         try:
4032             if not arg0.__class__ is multi_aff:
4033                 arg0 = multi_aff(arg0)
4034         except:
4035             raise
4036         try:
4037             if not arg1.__class__ is multi_id:
4038                 arg1 = multi_id(arg1)
4039         except:
4040             return pw_multi_aff(arg0).bind_domain_wrapped_domain(arg1)
4041         ctx = arg0.ctx
4042         res = isl.isl_multi_aff_bind_domain_wrapped_domain(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
4043         obj = multi_aff(ctx=ctx, ptr=res)
4044         return obj
4045     def constant_multi_val(arg0):
4046         try:
4047             if not arg0.__class__ is multi_aff:
4048                 arg0 = multi_aff(arg0)
4049         except:
4050             raise
4051         ctx = arg0.ctx
4052         res = isl.isl_multi_aff_get_constant_multi_val(arg0.ptr)
4053         obj = multi_val(ctx=ctx, ptr=res)
4054         return obj
4055     def get_constant_multi_val(arg0):
4056         return arg0.constant_multi_val()
4057     @staticmethod
4058     def domain_map(arg0):
4059         try:
4060             if not arg0.__class__ is space:
4061                 arg0 = space(arg0)
4062         except:
4063             raise
4064         ctx = arg0.ctx
4065         res = isl.isl_multi_aff_domain_map(isl.isl_space_copy(arg0.ptr))
4066         obj = multi_aff(ctx=ctx, ptr=res)
4067         return obj
4068     def domain_reverse(arg0):
4069         try:
4070             if not arg0.__class__ is multi_aff:
4071                 arg0 = multi_aff(arg0)
4072         except:
4073             raise
4074         ctx = arg0.ctx
4075         res = isl.isl_multi_aff_domain_reverse(isl.isl_multi_aff_copy(arg0.ptr))
4076         obj = multi_aff(ctx=ctx, ptr=res)
4077         return obj
4078     def flat_range_product(arg0, arg1):
4079         try:
4080             if not arg0.__class__ is multi_aff:
4081                 arg0 = multi_aff(arg0)
4082         except:
4083             raise
4084         try:
4085             if not arg1.__class__ is multi_aff:
4086                 arg1 = multi_aff(arg1)
4087         except:
4088             return pw_multi_aff(arg0).flat_range_product(arg1)
4089         ctx = arg0.ctx
4090         res = isl.isl_multi_aff_flat_range_product(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_multi_aff_copy(arg1.ptr))
4091         obj = multi_aff(ctx=ctx, ptr=res)
4092         return obj
4093     def floor(arg0):
4094         try:
4095             if not arg0.__class__ is multi_aff:
4096                 arg0 = multi_aff(arg0)
4097         except:
4098             raise
4099         ctx = arg0.ctx
4100         res = isl.isl_multi_aff_floor(isl.isl_multi_aff_copy(arg0.ptr))
4101         obj = multi_aff(ctx=ctx, ptr=res)
4102         return obj
4103     def gist(arg0, arg1):
4104         try:
4105             if not arg0.__class__ is multi_aff:
4106                 arg0 = multi_aff(arg0)
4107         except:
4108             raise
4109         try:
4110             if not arg1.__class__ is set:
4111                 arg1 = set(arg1)
4112         except:
4113             return pw_multi_aff(arg0).gist(arg1)
4114         ctx = arg0.ctx
4115         res = isl.isl_multi_aff_gist(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
4116         obj = multi_aff(ctx=ctx, ptr=res)
4117         return obj
4118     def gist_params(arg0, arg1):
4119         try:
4120             if not arg0.__class__ is multi_aff:
4121                 arg0 = multi_aff(arg0)
4122         except:
4123             raise
4124         try:
4125             if not arg1.__class__ is set:
4126                 arg1 = set(arg1)
4127         except:
4128             return pw_multi_aff(arg0).gist_params(arg1)
4129         ctx = arg0.ctx
4130         res = isl.isl_multi_aff_gist_params(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
4131         obj = multi_aff(ctx=ctx, ptr=res)
4132         return obj
4133     def has_range_tuple_id(arg0):
4134         try:
4135             if not arg0.__class__ is multi_aff:
4136                 arg0 = multi_aff(arg0)
4137         except:
4138             raise
4139         ctx = arg0.ctx
4140         res = isl.isl_multi_aff_has_range_tuple_id(arg0.ptr)
4141         if res < 0:
4142             raise Error
4143         return bool(res)
4144     def identity(*args):
4145         if len(args) == 1:
4146             args = list(args)
4147             try:
4148                 if not args[0].__class__ is multi_aff:
4149                     args[0] = multi_aff(args[0])
4150             except:
4151                 raise
4152             ctx = args[0].ctx
4153             res = isl.isl_multi_aff_identity_multi_aff(isl.isl_multi_aff_copy(args[0].ptr))
4154             obj = multi_aff(ctx=ctx, ptr=res)
4155             return obj
4156         raise Error
4157     @staticmethod
4158     def identity_on_domain(*args):
4159         if len(args) == 1 and args[0].__class__ is space:
4160             ctx = args[0].ctx
4161             res = isl.isl_multi_aff_identity_on_domain_space(isl.isl_space_copy(args[0].ptr))
4162             obj = multi_aff(ctx=ctx, ptr=res)
4163             return obj
4164         raise Error
4165     def insert_domain(arg0, arg1):
4166         try:
4167             if not arg0.__class__ is multi_aff:
4168                 arg0 = multi_aff(arg0)
4169         except:
4170             raise
4171         try:
4172             if not arg1.__class__ is space:
4173                 arg1 = space(arg1)
4174         except:
4175             return pw_multi_aff(arg0).insert_domain(arg1)
4176         ctx = arg0.ctx
4177         res = isl.isl_multi_aff_insert_domain(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_space_copy(arg1.ptr))
4178         obj = multi_aff(ctx=ctx, ptr=res)
4179         return obj
4180     def involves_locals(arg0):
4181         try:
4182             if not arg0.__class__ is multi_aff:
4183                 arg0 = multi_aff(arg0)
4184         except:
4185             raise
4186         ctx = arg0.ctx
4187         res = isl.isl_multi_aff_involves_locals(arg0.ptr)
4188         if res < 0:
4189             raise Error
4190         return bool(res)
4191     def involves_nan(arg0):
4192         try:
4193             if not arg0.__class__ is multi_aff:
4194                 arg0 = multi_aff(arg0)
4195         except:
4196             raise
4197         ctx = arg0.ctx
4198         res = isl.isl_multi_aff_involves_nan(arg0.ptr)
4199         if res < 0:
4200             raise Error
4201         return bool(res)
4202     def list(arg0):
4203         try:
4204             if not arg0.__class__ is multi_aff:
4205                 arg0 = multi_aff(arg0)
4206         except:
4207             raise
4208         ctx = arg0.ctx
4209         res = isl.isl_multi_aff_get_list(arg0.ptr)
4210         obj = aff_list(ctx=ctx, ptr=res)
4211         return obj
4212     def get_list(arg0):
4213         return arg0.list()
4214     @staticmethod
4215     def multi_val_on_domain(*args):
4216         if len(args) == 2 and args[0].__class__ is space and args[1].__class__ is multi_val:
4217             ctx = args[0].ctx
4218             res = isl.isl_multi_aff_multi_val_on_domain_space(isl.isl_space_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
4219             obj = multi_aff(ctx=ctx, ptr=res)
4220             return obj
4221         raise Error
4222     def neg(arg0):
4223         try:
4224             if not arg0.__class__ is multi_aff:
4225                 arg0 = multi_aff(arg0)
4226         except:
4227             raise
4228         ctx = arg0.ctx
4229         res = isl.isl_multi_aff_neg(isl.isl_multi_aff_copy(arg0.ptr))
4230         obj = multi_aff(ctx=ctx, ptr=res)
4231         return obj
4232     def plain_is_equal(arg0, arg1):
4233         try:
4234             if not arg0.__class__ is multi_aff:
4235                 arg0 = multi_aff(arg0)
4236         except:
4237             raise
4238         try:
4239             if not arg1.__class__ is multi_aff:
4240                 arg1 = multi_aff(arg1)
4241         except:
4242             return pw_multi_aff(arg0).plain_is_equal(arg1)
4243         ctx = arg0.ctx
4244         res = isl.isl_multi_aff_plain_is_equal(arg0.ptr, arg1.ptr)
4245         if res < 0:
4246             raise Error
4247         return bool(res)
4248     def product(arg0, arg1):
4249         try:
4250             if not arg0.__class__ is multi_aff:
4251                 arg0 = multi_aff(arg0)
4252         except:
4253             raise
4254         try:
4255             if not arg1.__class__ is multi_aff:
4256                 arg1 = multi_aff(arg1)
4257         except:
4258             return pw_multi_aff(arg0).product(arg1)
4259         ctx = arg0.ctx
4260         res = isl.isl_multi_aff_product(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_multi_aff_copy(arg1.ptr))
4261         obj = multi_aff(ctx=ctx, ptr=res)
4262         return obj
4263     def pullback(*args):
4264         if len(args) == 2 and args[1].__class__ is multi_aff:
4265             args = list(args)
4266             try:
4267                 if not args[0].__class__ is multi_aff:
4268                     args[0] = multi_aff(args[0])
4269             except:
4270                 raise
4271             ctx = args[0].ctx
4272             res = isl.isl_multi_aff_pullback_multi_aff(isl.isl_multi_aff_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
4273             obj = multi_aff(ctx=ctx, ptr=res)
4274             return obj
4275         raise Error
4276     @staticmethod
4277     def range_map(arg0):
4278         try:
4279             if not arg0.__class__ is space:
4280                 arg0 = space(arg0)
4281         except:
4282             raise
4283         ctx = arg0.ctx
4284         res = isl.isl_multi_aff_range_map(isl.isl_space_copy(arg0.ptr))
4285         obj = multi_aff(ctx=ctx, ptr=res)
4286         return obj
4287     def range_product(arg0, arg1):
4288         try:
4289             if not arg0.__class__ is multi_aff:
4290                 arg0 = multi_aff(arg0)
4291         except:
4292             raise
4293         try:
4294             if not arg1.__class__ is multi_aff:
4295                 arg1 = multi_aff(arg1)
4296         except:
4297             return pw_multi_aff(arg0).range_product(arg1)
4298         ctx = arg0.ctx
4299         res = isl.isl_multi_aff_range_product(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_multi_aff_copy(arg1.ptr))
4300         obj = multi_aff(ctx=ctx, ptr=res)
4301         return obj
4302     def range_tuple_id(arg0):
4303         try:
4304             if not arg0.__class__ is multi_aff:
4305                 arg0 = multi_aff(arg0)
4306         except:
4307             raise
4308         ctx = arg0.ctx
4309         res = isl.isl_multi_aff_get_range_tuple_id(arg0.ptr)
4310         obj = id(ctx=ctx, ptr=res)
4311         return obj
4312     def get_range_tuple_id(arg0):
4313         return arg0.range_tuple_id()
4314     def reset_range_tuple_id(arg0):
4315         try:
4316             if not arg0.__class__ is multi_aff:
4317                 arg0 = multi_aff(arg0)
4318         except:
4319             raise
4320         ctx = arg0.ctx
4321         res = isl.isl_multi_aff_reset_range_tuple_id(isl.isl_multi_aff_copy(arg0.ptr))
4322         obj = multi_aff(ctx=ctx, ptr=res)
4323         return obj
4324     def scale(*args):
4325         if len(args) == 2 and args[1].__class__ is multi_val:
4326             args = list(args)
4327             try:
4328                 if not args[0].__class__ is multi_aff:
4329                     args[0] = multi_aff(args[0])
4330             except:
4331                 raise
4332             ctx = args[0].ctx
4333             res = isl.isl_multi_aff_scale_multi_val(isl.isl_multi_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
4334             obj = multi_aff(ctx=ctx, ptr=res)
4335             return obj
4336         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
4337             args = list(args)
4338             try:
4339                 if not args[0].__class__ is multi_aff:
4340                     args[0] = multi_aff(args[0])
4341             except:
4342                 raise
4343             try:
4344                 if not args[1].__class__ is val:
4345                     args[1] = val(args[1])
4346             except:
4347                 raise
4348             ctx = args[0].ctx
4349             res = isl.isl_multi_aff_scale_val(isl.isl_multi_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
4350             obj = multi_aff(ctx=ctx, ptr=res)
4351             return obj
4352         raise Error
4353     def scale_down(*args):
4354         if len(args) == 2 and args[1].__class__ is multi_val:
4355             args = list(args)
4356             try:
4357                 if not args[0].__class__ is multi_aff:
4358                     args[0] = multi_aff(args[0])
4359             except:
4360                 raise
4361             ctx = args[0].ctx
4362             res = isl.isl_multi_aff_scale_down_multi_val(isl.isl_multi_aff_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
4363             obj = multi_aff(ctx=ctx, ptr=res)
4364             return obj
4365         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
4366             args = list(args)
4367             try:
4368                 if not args[0].__class__ is multi_aff:
4369                     args[0] = multi_aff(args[0])
4370             except:
4371                 raise
4372             try:
4373                 if not args[1].__class__ is val:
4374                     args[1] = val(args[1])
4375             except:
4376                 raise
4377             ctx = args[0].ctx
4378             res = isl.isl_multi_aff_scale_down_val(isl.isl_multi_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
4379             obj = multi_aff(ctx=ctx, ptr=res)
4380             return obj
4381         raise Error
4382     def set_at(arg0, arg1, arg2):
4383         try:
4384             if not arg0.__class__ is multi_aff:
4385                 arg0 = multi_aff(arg0)
4386         except:
4387             raise
4388         try:
4389             if not arg2.__class__ is aff:
4390                 arg2 = aff(arg2)
4391         except:
4392             return pw_multi_aff(arg0).set_at(arg1, arg2)
4393         ctx = arg0.ctx
4394         res = isl.isl_multi_aff_set_at(isl.isl_multi_aff_copy(arg0.ptr), arg1, isl.isl_aff_copy(arg2.ptr))
4395         obj = multi_aff(ctx=ctx, ptr=res)
4396         return obj
4397     def set_range_tuple(*args):
4398         if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
4399             args = list(args)
4400             try:
4401                 if not args[0].__class__ is multi_aff:
4402                     args[0] = multi_aff(args[0])
4403             except:
4404                 raise
4405             try:
4406                 if not args[1].__class__ is id:
4407                     args[1] = id(args[1])
4408             except:
4409                 raise
4410             ctx = args[0].ctx
4411             res = isl.isl_multi_aff_set_range_tuple_id(isl.isl_multi_aff_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
4412             obj = multi_aff(ctx=ctx, ptr=res)
4413             return obj
4414         raise Error
4415     def size(arg0):
4416         try:
4417             if not arg0.__class__ is multi_aff:
4418                 arg0 = multi_aff(arg0)
4419         except:
4420             raise
4421         ctx = arg0.ctx
4422         res = isl.isl_multi_aff_size(arg0.ptr)
4423         if res < 0:
4424             raise Error
4425         return int(res)
4426     def space(arg0):
4427         try:
4428             if not arg0.__class__ is multi_aff:
4429                 arg0 = multi_aff(arg0)
4430         except:
4431             raise
4432         ctx = arg0.ctx
4433         res = isl.isl_multi_aff_get_space(arg0.ptr)
4434         obj = space(ctx=ctx, ptr=res)
4435         return obj
4436     def get_space(arg0):
4437         return arg0.space()
4438     def sub(arg0, arg1):
4439         try:
4440             if not arg0.__class__ is multi_aff:
4441                 arg0 = multi_aff(arg0)
4442         except:
4443             raise
4444         try:
4445             if not arg1.__class__ is multi_aff:
4446                 arg1 = multi_aff(arg1)
4447         except:
4448             return pw_multi_aff(arg0).sub(arg1)
4449         ctx = arg0.ctx
4450         res = isl.isl_multi_aff_sub(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_multi_aff_copy(arg1.ptr))
4451         obj = multi_aff(ctx=ctx, ptr=res)
4452         return obj
4453     def to_multi_pw_aff(arg0):
4454         try:
4455             if not arg0.__class__ is multi_aff:
4456                 arg0 = multi_aff(arg0)
4457         except:
4458             raise
4459         ctx = arg0.ctx
4460         res = isl.isl_multi_aff_to_multi_pw_aff(isl.isl_multi_aff_copy(arg0.ptr))
4461         obj = multi_pw_aff(ctx=ctx, ptr=res)
4462         return obj
4463     def to_multi_union_pw_aff(arg0):
4464         try:
4465             if not arg0.__class__ is multi_aff:
4466                 arg0 = multi_aff(arg0)
4467         except:
4468             raise
4469         ctx = arg0.ctx
4470         res = isl.isl_multi_aff_to_multi_union_pw_aff(isl.isl_multi_aff_copy(arg0.ptr))
4471         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
4472         return obj
4473     def to_pw_multi_aff(arg0):
4474         try:
4475             if not arg0.__class__ is multi_aff:
4476                 arg0 = multi_aff(arg0)
4477         except:
4478             raise
4479         ctx = arg0.ctx
4480         res = isl.isl_multi_aff_to_pw_multi_aff(isl.isl_multi_aff_copy(arg0.ptr))
4481         obj = pw_multi_aff(ctx=ctx, ptr=res)
4482         return obj
4483     def unbind_params_insert_domain(arg0, arg1):
4484         try:
4485             if not arg0.__class__ is multi_aff:
4486                 arg0 = multi_aff(arg0)
4487         except:
4488             raise
4489         try:
4490             if not arg1.__class__ is multi_id:
4491                 arg1 = multi_id(arg1)
4492         except:
4493             return pw_multi_aff(arg0).unbind_params_insert_domain(arg1)
4494         ctx = arg0.ctx
4495         res = isl.isl_multi_aff_unbind_params_insert_domain(isl.isl_multi_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
4496         obj = multi_aff(ctx=ctx, ptr=res)
4497         return obj
4498     @staticmethod
4499     def zero(arg0):
4500         try:
4501             if not arg0.__class__ is space:
4502                 arg0 = space(arg0)
4503         except:
4504             raise
4505         ctx = arg0.ctx
4506         res = isl.isl_multi_aff_zero(isl.isl_space_copy(arg0.ptr))
4507         obj = multi_aff(ctx=ctx, ptr=res)
4508         return obj
4510 isl.isl_multi_aff_from_aff.restype = c_void_p
4511 isl.isl_multi_aff_from_aff.argtypes = [c_void_p]
4512 isl.isl_multi_aff_from_aff_list.restype = c_void_p
4513 isl.isl_multi_aff_from_aff_list.argtypes = [c_void_p, c_void_p]
4514 isl.isl_multi_aff_read_from_str.restype = c_void_p
4515 isl.isl_multi_aff_read_from_str.argtypes = [Context, c_char_p]
4516 isl.isl_multi_aff_add.restype = c_void_p
4517 isl.isl_multi_aff_add.argtypes = [c_void_p, c_void_p]
4518 isl.isl_multi_aff_add_constant_multi_val.restype = c_void_p
4519 isl.isl_multi_aff_add_constant_multi_val.argtypes = [c_void_p, c_void_p]
4520 isl.isl_multi_aff_add_constant_val.restype = c_void_p
4521 isl.isl_multi_aff_add_constant_val.argtypes = [c_void_p, c_void_p]
4522 isl.isl_multi_aff_as_map.restype = c_void_p
4523 isl.isl_multi_aff_as_map.argtypes = [c_void_p]
4524 isl.isl_multi_aff_as_set.restype = c_void_p
4525 isl.isl_multi_aff_as_set.argtypes = [c_void_p]
4526 isl.isl_multi_aff_get_at.restype = c_void_p
4527 isl.isl_multi_aff_get_at.argtypes = [c_void_p, c_int]
4528 isl.isl_multi_aff_bind.restype = c_void_p
4529 isl.isl_multi_aff_bind.argtypes = [c_void_p, c_void_p]
4530 isl.isl_multi_aff_bind_domain.restype = c_void_p
4531 isl.isl_multi_aff_bind_domain.argtypes = [c_void_p, c_void_p]
4532 isl.isl_multi_aff_bind_domain_wrapped_domain.restype = c_void_p
4533 isl.isl_multi_aff_bind_domain_wrapped_domain.argtypes = [c_void_p, c_void_p]
4534 isl.isl_multi_aff_get_constant_multi_val.restype = c_void_p
4535 isl.isl_multi_aff_get_constant_multi_val.argtypes = [c_void_p]
4536 isl.isl_multi_aff_domain_map.restype = c_void_p
4537 isl.isl_multi_aff_domain_map.argtypes = [c_void_p]
4538 isl.isl_multi_aff_domain_reverse.restype = c_void_p
4539 isl.isl_multi_aff_domain_reverse.argtypes = [c_void_p]
4540 isl.isl_multi_aff_flat_range_product.restype = c_void_p
4541 isl.isl_multi_aff_flat_range_product.argtypes = [c_void_p, c_void_p]
4542 isl.isl_multi_aff_floor.restype = c_void_p
4543 isl.isl_multi_aff_floor.argtypes = [c_void_p]
4544 isl.isl_multi_aff_gist.restype = c_void_p
4545 isl.isl_multi_aff_gist.argtypes = [c_void_p, c_void_p]
4546 isl.isl_multi_aff_gist_params.restype = c_void_p
4547 isl.isl_multi_aff_gist_params.argtypes = [c_void_p, c_void_p]
4548 isl.isl_multi_aff_has_range_tuple_id.argtypes = [c_void_p]
4549 isl.isl_multi_aff_identity_multi_aff.restype = c_void_p
4550 isl.isl_multi_aff_identity_multi_aff.argtypes = [c_void_p]
4551 isl.isl_multi_aff_identity_on_domain_space.restype = c_void_p
4552 isl.isl_multi_aff_identity_on_domain_space.argtypes = [c_void_p]
4553 isl.isl_multi_aff_insert_domain.restype = c_void_p
4554 isl.isl_multi_aff_insert_domain.argtypes = [c_void_p, c_void_p]
4555 isl.isl_multi_aff_involves_locals.argtypes = [c_void_p]
4556 isl.isl_multi_aff_involves_nan.argtypes = [c_void_p]
4557 isl.isl_multi_aff_get_list.restype = c_void_p
4558 isl.isl_multi_aff_get_list.argtypes = [c_void_p]
4559 isl.isl_multi_aff_multi_val_on_domain_space.restype = c_void_p
4560 isl.isl_multi_aff_multi_val_on_domain_space.argtypes = [c_void_p, c_void_p]
4561 isl.isl_multi_aff_neg.restype = c_void_p
4562 isl.isl_multi_aff_neg.argtypes = [c_void_p]
4563 isl.isl_multi_aff_plain_is_equal.argtypes = [c_void_p, c_void_p]
4564 isl.isl_multi_aff_product.restype = c_void_p
4565 isl.isl_multi_aff_product.argtypes = [c_void_p, c_void_p]
4566 isl.isl_multi_aff_pullback_multi_aff.restype = c_void_p
4567 isl.isl_multi_aff_pullback_multi_aff.argtypes = [c_void_p, c_void_p]
4568 isl.isl_multi_aff_range_map.restype = c_void_p
4569 isl.isl_multi_aff_range_map.argtypes = [c_void_p]
4570 isl.isl_multi_aff_range_product.restype = c_void_p
4571 isl.isl_multi_aff_range_product.argtypes = [c_void_p, c_void_p]
4572 isl.isl_multi_aff_get_range_tuple_id.restype = c_void_p
4573 isl.isl_multi_aff_get_range_tuple_id.argtypes = [c_void_p]
4574 isl.isl_multi_aff_reset_range_tuple_id.restype = c_void_p
4575 isl.isl_multi_aff_reset_range_tuple_id.argtypes = [c_void_p]
4576 isl.isl_multi_aff_scale_multi_val.restype = c_void_p
4577 isl.isl_multi_aff_scale_multi_val.argtypes = [c_void_p, c_void_p]
4578 isl.isl_multi_aff_scale_val.restype = c_void_p
4579 isl.isl_multi_aff_scale_val.argtypes = [c_void_p, c_void_p]
4580 isl.isl_multi_aff_scale_down_multi_val.restype = c_void_p
4581 isl.isl_multi_aff_scale_down_multi_val.argtypes = [c_void_p, c_void_p]
4582 isl.isl_multi_aff_scale_down_val.restype = c_void_p
4583 isl.isl_multi_aff_scale_down_val.argtypes = [c_void_p, c_void_p]
4584 isl.isl_multi_aff_set_at.restype = c_void_p
4585 isl.isl_multi_aff_set_at.argtypes = [c_void_p, c_int, c_void_p]
4586 isl.isl_multi_aff_set_range_tuple_id.restype = c_void_p
4587 isl.isl_multi_aff_set_range_tuple_id.argtypes = [c_void_p, c_void_p]
4588 isl.isl_multi_aff_size.argtypes = [c_void_p]
4589 isl.isl_multi_aff_get_space.restype = c_void_p
4590 isl.isl_multi_aff_get_space.argtypes = [c_void_p]
4591 isl.isl_multi_aff_sub.restype = c_void_p
4592 isl.isl_multi_aff_sub.argtypes = [c_void_p, c_void_p]
4593 isl.isl_multi_aff_to_multi_pw_aff.restype = c_void_p
4594 isl.isl_multi_aff_to_multi_pw_aff.argtypes = [c_void_p]
4595 isl.isl_multi_aff_to_multi_union_pw_aff.restype = c_void_p
4596 isl.isl_multi_aff_to_multi_union_pw_aff.argtypes = [c_void_p]
4597 isl.isl_multi_aff_to_pw_multi_aff.restype = c_void_p
4598 isl.isl_multi_aff_to_pw_multi_aff.argtypes = [c_void_p]
4599 isl.isl_multi_aff_unbind_params_insert_domain.restype = c_void_p
4600 isl.isl_multi_aff_unbind_params_insert_domain.argtypes = [c_void_p, c_void_p]
4601 isl.isl_multi_aff_zero.restype = c_void_p
4602 isl.isl_multi_aff_zero.argtypes = [c_void_p]
4603 isl.isl_multi_aff_copy.restype = c_void_p
4604 isl.isl_multi_aff_copy.argtypes = [c_void_p]
4605 isl.isl_multi_aff_free.restype = c_void_p
4606 isl.isl_multi_aff_free.argtypes = [c_void_p]
4607 isl.isl_multi_aff_to_str.restype = POINTER(c_char)
4608 isl.isl_multi_aff_to_str.argtypes = [c_void_p]
4610 class aff(pw_aff, multi_aff):
4611     def __init__(self, *args, **keywords):
4612         if "ptr" in keywords:
4613             self.ctx = keywords["ctx"]
4614             self.ptr = keywords["ptr"]
4615             return
4616         if len(args) == 1 and type(args[0]) == str:
4617             self.ctx = Context.getDefaultInstance()
4618             self.ptr = isl.isl_aff_read_from_str(self.ctx, args[0].encode('ascii'))
4619             return
4620         raise Error
4621     def __del__(self):
4622         if hasattr(self, 'ptr'):
4623             isl.isl_aff_free(self.ptr)
4624     def __str__(arg0):
4625         try:
4626             if not arg0.__class__ is aff:
4627                 arg0 = aff(arg0)
4628         except:
4629             raise
4630         ptr = isl.isl_aff_to_str(arg0.ptr)
4631         res = cast(ptr, c_char_p).value.decode('ascii')
4632         libc.free(ptr)
4633         return res
4634     def __repr__(self):
4635         s = str(self)
4636         if '"' in s:
4637             return 'isl.aff("""%s""")' % s
4638         else:
4639             return 'isl.aff("%s")' % s
4640     def add(arg0, arg1):
4641         try:
4642             if not arg0.__class__ is aff:
4643                 arg0 = aff(arg0)
4644         except:
4645             raise
4646         try:
4647             if not arg1.__class__ is aff:
4648                 arg1 = aff(arg1)
4649         except:
4650             return pw_aff(arg0).add(arg1)
4651         ctx = arg0.ctx
4652         res = isl.isl_aff_add(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
4653         obj = aff(ctx=ctx, ptr=res)
4654         return obj
4655     def add_constant(*args):
4656         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
4657             args = list(args)
4658             try:
4659                 if not args[0].__class__ is aff:
4660                     args[0] = aff(args[0])
4661             except:
4662                 raise
4663             try:
4664                 if not args[1].__class__ is val:
4665                     args[1] = val(args[1])
4666             except:
4667                 raise
4668             ctx = args[0].ctx
4669             res = isl.isl_aff_add_constant_val(isl.isl_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
4670             obj = aff(ctx=ctx, ptr=res)
4671             return obj
4672         raise Error
4673     def bind(*args):
4674         if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
4675             args = list(args)
4676             try:
4677                 if not args[0].__class__ is aff:
4678                     args[0] = aff(args[0])
4679             except:
4680                 raise
4681             try:
4682                 if not args[1].__class__ is id:
4683                     args[1] = id(args[1])
4684             except:
4685                 raise
4686             ctx = args[0].ctx
4687             res = isl.isl_aff_bind_id(isl.isl_aff_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
4688             obj = basic_set(ctx=ctx, ptr=res)
4689             return obj
4690         raise Error
4691     def ceil(arg0):
4692         try:
4693             if not arg0.__class__ is aff:
4694                 arg0 = aff(arg0)
4695         except:
4696             raise
4697         ctx = arg0.ctx
4698         res = isl.isl_aff_ceil(isl.isl_aff_copy(arg0.ptr))
4699         obj = aff(ctx=ctx, ptr=res)
4700         return obj
4701     def constant_val(arg0):
4702         try:
4703             if not arg0.__class__ is aff:
4704                 arg0 = aff(arg0)
4705         except:
4706             raise
4707         ctx = arg0.ctx
4708         res = isl.isl_aff_get_constant_val(arg0.ptr)
4709         obj = val(ctx=ctx, ptr=res)
4710         return obj
4711     def get_constant_val(arg0):
4712         return arg0.constant_val()
4713     def div(arg0, arg1):
4714         try:
4715             if not arg0.__class__ is aff:
4716                 arg0 = aff(arg0)
4717         except:
4718             raise
4719         try:
4720             if not arg1.__class__ is aff:
4721                 arg1 = aff(arg1)
4722         except:
4723             return pw_aff(arg0).div(arg1)
4724         ctx = arg0.ctx
4725         res = isl.isl_aff_div(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
4726         obj = aff(ctx=ctx, ptr=res)
4727         return obj
4728     def domain_reverse(arg0):
4729         try:
4730             if not arg0.__class__ is aff:
4731                 arg0 = aff(arg0)
4732         except:
4733             raise
4734         ctx = arg0.ctx
4735         res = isl.isl_aff_domain_reverse(isl.isl_aff_copy(arg0.ptr))
4736         obj = aff(ctx=ctx, ptr=res)
4737         return obj
4738     def eq_set(arg0, arg1):
4739         try:
4740             if not arg0.__class__ is aff:
4741                 arg0 = aff(arg0)
4742         except:
4743             raise
4744         try:
4745             if not arg1.__class__ is aff:
4746                 arg1 = aff(arg1)
4747         except:
4748             return pw_aff(arg0).eq_set(arg1)
4749         ctx = arg0.ctx
4750         res = isl.isl_aff_eq_set(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
4751         obj = set(ctx=ctx, ptr=res)
4752         return obj
4753     def eval(arg0, arg1):
4754         try:
4755             if not arg0.__class__ is aff:
4756                 arg0 = aff(arg0)
4757         except:
4758             raise
4759         try:
4760             if not arg1.__class__ is point:
4761                 arg1 = point(arg1)
4762         except:
4763             return pw_aff(arg0).eval(arg1)
4764         ctx = arg0.ctx
4765         res = isl.isl_aff_eval(isl.isl_aff_copy(arg0.ptr), isl.isl_point_copy(arg1.ptr))
4766         obj = val(ctx=ctx, ptr=res)
4767         return obj
4768     def floor(arg0):
4769         try:
4770             if not arg0.__class__ is aff:
4771                 arg0 = aff(arg0)
4772         except:
4773             raise
4774         ctx = arg0.ctx
4775         res = isl.isl_aff_floor(isl.isl_aff_copy(arg0.ptr))
4776         obj = aff(ctx=ctx, ptr=res)
4777         return obj
4778     def ge_set(arg0, arg1):
4779         try:
4780             if not arg0.__class__ is aff:
4781                 arg0 = aff(arg0)
4782         except:
4783             raise
4784         try:
4785             if not arg1.__class__ is aff:
4786                 arg1 = aff(arg1)
4787         except:
4788             return pw_aff(arg0).ge_set(arg1)
4789         ctx = arg0.ctx
4790         res = isl.isl_aff_ge_set(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
4791         obj = set(ctx=ctx, ptr=res)
4792         return obj
4793     def gist(arg0, arg1):
4794         try:
4795             if not arg0.__class__ is aff:
4796                 arg0 = aff(arg0)
4797         except:
4798             raise
4799         try:
4800             if not arg1.__class__ is set:
4801                 arg1 = set(arg1)
4802         except:
4803             return pw_aff(arg0).gist(arg1)
4804         ctx = arg0.ctx
4805         res = isl.isl_aff_gist(isl.isl_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
4806         obj = aff(ctx=ctx, ptr=res)
4807         return obj
4808     def gist_params(arg0, arg1):
4809         try:
4810             if not arg0.__class__ is aff:
4811                 arg0 = aff(arg0)
4812         except:
4813             raise
4814         try:
4815             if not arg1.__class__ is set:
4816                 arg1 = set(arg1)
4817         except:
4818             return pw_aff(arg0).gist_params(arg1)
4819         ctx = arg0.ctx
4820         res = isl.isl_aff_gist_params(isl.isl_aff_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
4821         obj = aff(ctx=ctx, ptr=res)
4822         return obj
4823     def gt_set(arg0, arg1):
4824         try:
4825             if not arg0.__class__ is aff:
4826                 arg0 = aff(arg0)
4827         except:
4828             raise
4829         try:
4830             if not arg1.__class__ is aff:
4831                 arg1 = aff(arg1)
4832         except:
4833             return pw_aff(arg0).gt_set(arg1)
4834         ctx = arg0.ctx
4835         res = isl.isl_aff_gt_set(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
4836         obj = set(ctx=ctx, ptr=res)
4837         return obj
4838     def is_cst(arg0):
4839         try:
4840             if not arg0.__class__ is aff:
4841                 arg0 = aff(arg0)
4842         except:
4843             raise
4844         ctx = arg0.ctx
4845         res = isl.isl_aff_is_cst(arg0.ptr)
4846         if res < 0:
4847             raise Error
4848         return bool(res)
4849     def le_set(arg0, arg1):
4850         try:
4851             if not arg0.__class__ is aff:
4852                 arg0 = aff(arg0)
4853         except:
4854             raise
4855         try:
4856             if not arg1.__class__ is aff:
4857                 arg1 = aff(arg1)
4858         except:
4859             return pw_aff(arg0).le_set(arg1)
4860         ctx = arg0.ctx
4861         res = isl.isl_aff_le_set(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
4862         obj = set(ctx=ctx, ptr=res)
4863         return obj
4864     def lt_set(arg0, arg1):
4865         try:
4866             if not arg0.__class__ is aff:
4867                 arg0 = aff(arg0)
4868         except:
4869             raise
4870         try:
4871             if not arg1.__class__ is aff:
4872                 arg1 = aff(arg1)
4873         except:
4874             return pw_aff(arg0).lt_set(arg1)
4875         ctx = arg0.ctx
4876         res = isl.isl_aff_lt_set(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
4877         obj = set(ctx=ctx, ptr=res)
4878         return obj
4879     def mod(*args):
4880         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
4881             args = list(args)
4882             try:
4883                 if not args[0].__class__ is aff:
4884                     args[0] = aff(args[0])
4885             except:
4886                 raise
4887             try:
4888                 if not args[1].__class__ is val:
4889                     args[1] = val(args[1])
4890             except:
4891                 raise
4892             ctx = args[0].ctx
4893             res = isl.isl_aff_mod_val(isl.isl_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
4894             obj = aff(ctx=ctx, ptr=res)
4895             return obj
4896         raise Error
4897     def mul(arg0, arg1):
4898         try:
4899             if not arg0.__class__ is aff:
4900                 arg0 = aff(arg0)
4901         except:
4902             raise
4903         try:
4904             if not arg1.__class__ is aff:
4905                 arg1 = aff(arg1)
4906         except:
4907             return pw_aff(arg0).mul(arg1)
4908         ctx = arg0.ctx
4909         res = isl.isl_aff_mul(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
4910         obj = aff(ctx=ctx, ptr=res)
4911         return obj
4912     def ne_set(arg0, arg1):
4913         try:
4914             if not arg0.__class__ is aff:
4915                 arg0 = aff(arg0)
4916         except:
4917             raise
4918         try:
4919             if not arg1.__class__ is aff:
4920                 arg1 = aff(arg1)
4921         except:
4922             return pw_aff(arg0).ne_set(arg1)
4923         ctx = arg0.ctx
4924         res = isl.isl_aff_ne_set(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
4925         obj = set(ctx=ctx, ptr=res)
4926         return obj
4927     def neg(arg0):
4928         try:
4929             if not arg0.__class__ is aff:
4930                 arg0 = aff(arg0)
4931         except:
4932             raise
4933         ctx = arg0.ctx
4934         res = isl.isl_aff_neg(isl.isl_aff_copy(arg0.ptr))
4935         obj = aff(ctx=ctx, ptr=res)
4936         return obj
4937     def plain_is_equal(arg0, arg1):
4938         try:
4939             if not arg0.__class__ is aff:
4940                 arg0 = aff(arg0)
4941         except:
4942             raise
4943         try:
4944             if not arg1.__class__ is aff:
4945                 arg1 = aff(arg1)
4946         except:
4947             return pw_aff(arg0).plain_is_equal(arg1)
4948         ctx = arg0.ctx
4949         res = isl.isl_aff_plain_is_equal(arg0.ptr, arg1.ptr)
4950         if res < 0:
4951             raise Error
4952         return bool(res)
4953     def pullback(*args):
4954         if len(args) == 2 and args[1].__class__ is multi_aff:
4955             args = list(args)
4956             try:
4957                 if not args[0].__class__ is aff:
4958                     args[0] = aff(args[0])
4959             except:
4960                 raise
4961             ctx = args[0].ctx
4962             res = isl.isl_aff_pullback_multi_aff(isl.isl_aff_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
4963             obj = aff(ctx=ctx, ptr=res)
4964             return obj
4965         raise Error
4966     def scale(*args):
4967         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
4968             args = list(args)
4969             try:
4970                 if not args[0].__class__ is aff:
4971                     args[0] = aff(args[0])
4972             except:
4973                 raise
4974             try:
4975                 if not args[1].__class__ is val:
4976                     args[1] = val(args[1])
4977             except:
4978                 raise
4979             ctx = args[0].ctx
4980             res = isl.isl_aff_scale_val(isl.isl_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
4981             obj = aff(ctx=ctx, ptr=res)
4982             return obj
4983         raise Error
4984     def scale_down(*args):
4985         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
4986             args = list(args)
4987             try:
4988                 if not args[0].__class__ is aff:
4989                     args[0] = aff(args[0])
4990             except:
4991                 raise
4992             try:
4993                 if not args[1].__class__ is val:
4994                     args[1] = val(args[1])
4995             except:
4996                 raise
4997             ctx = args[0].ctx
4998             res = isl.isl_aff_scale_down_val(isl.isl_aff_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
4999             obj = aff(ctx=ctx, ptr=res)
5000             return obj
5001         raise Error
5002     def sub(arg0, arg1):
5003         try:
5004             if not arg0.__class__ is aff:
5005                 arg0 = aff(arg0)
5006         except:
5007             raise
5008         try:
5009             if not arg1.__class__ is aff:
5010                 arg1 = aff(arg1)
5011         except:
5012             return pw_aff(arg0).sub(arg1)
5013         ctx = arg0.ctx
5014         res = isl.isl_aff_sub(isl.isl_aff_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
5015         obj = aff(ctx=ctx, ptr=res)
5016         return obj
5017     def to_list(arg0):
5018         try:
5019             if not arg0.__class__ is aff:
5020                 arg0 = aff(arg0)
5021         except:
5022             raise
5023         ctx = arg0.ctx
5024         res = isl.isl_aff_to_list(isl.isl_aff_copy(arg0.ptr))
5025         obj = aff_list(ctx=ctx, ptr=res)
5026         return obj
5027     def unbind_params_insert_domain(arg0, arg1):
5028         try:
5029             if not arg0.__class__ is aff:
5030                 arg0 = aff(arg0)
5031         except:
5032             raise
5033         try:
5034             if not arg1.__class__ is multi_id:
5035                 arg1 = multi_id(arg1)
5036         except:
5037             return pw_aff(arg0).unbind_params_insert_domain(arg1)
5038         ctx = arg0.ctx
5039         res = isl.isl_aff_unbind_params_insert_domain(isl.isl_aff_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
5040         obj = aff(ctx=ctx, ptr=res)
5041         return obj
5042     @staticmethod
5043     def zero_on_domain(*args):
5044         if len(args) == 1 and args[0].__class__ is space:
5045             ctx = args[0].ctx
5046             res = isl.isl_aff_zero_on_domain_space(isl.isl_space_copy(args[0].ptr))
5047             obj = aff(ctx=ctx, ptr=res)
5048             return obj
5049         raise Error
5051 isl.isl_aff_read_from_str.restype = c_void_p
5052 isl.isl_aff_read_from_str.argtypes = [Context, c_char_p]
5053 isl.isl_aff_add.restype = c_void_p
5054 isl.isl_aff_add.argtypes = [c_void_p, c_void_p]
5055 isl.isl_aff_add_constant_val.restype = c_void_p
5056 isl.isl_aff_add_constant_val.argtypes = [c_void_p, c_void_p]
5057 isl.isl_aff_bind_id.restype = c_void_p
5058 isl.isl_aff_bind_id.argtypes = [c_void_p, c_void_p]
5059 isl.isl_aff_ceil.restype = c_void_p
5060 isl.isl_aff_ceil.argtypes = [c_void_p]
5061 isl.isl_aff_get_constant_val.restype = c_void_p
5062 isl.isl_aff_get_constant_val.argtypes = [c_void_p]
5063 isl.isl_aff_div.restype = c_void_p
5064 isl.isl_aff_div.argtypes = [c_void_p, c_void_p]
5065 isl.isl_aff_domain_reverse.restype = c_void_p
5066 isl.isl_aff_domain_reverse.argtypes = [c_void_p]
5067 isl.isl_aff_eq_set.restype = c_void_p
5068 isl.isl_aff_eq_set.argtypes = [c_void_p, c_void_p]
5069 isl.isl_aff_eval.restype = c_void_p
5070 isl.isl_aff_eval.argtypes = [c_void_p, c_void_p]
5071 isl.isl_aff_floor.restype = c_void_p
5072 isl.isl_aff_floor.argtypes = [c_void_p]
5073 isl.isl_aff_ge_set.restype = c_void_p
5074 isl.isl_aff_ge_set.argtypes = [c_void_p, c_void_p]
5075 isl.isl_aff_gist.restype = c_void_p
5076 isl.isl_aff_gist.argtypes = [c_void_p, c_void_p]
5077 isl.isl_aff_gist_params.restype = c_void_p
5078 isl.isl_aff_gist_params.argtypes = [c_void_p, c_void_p]
5079 isl.isl_aff_gt_set.restype = c_void_p
5080 isl.isl_aff_gt_set.argtypes = [c_void_p, c_void_p]
5081 isl.isl_aff_is_cst.argtypes = [c_void_p]
5082 isl.isl_aff_le_set.restype = c_void_p
5083 isl.isl_aff_le_set.argtypes = [c_void_p, c_void_p]
5084 isl.isl_aff_lt_set.restype = c_void_p
5085 isl.isl_aff_lt_set.argtypes = [c_void_p, c_void_p]
5086 isl.isl_aff_mod_val.restype = c_void_p
5087 isl.isl_aff_mod_val.argtypes = [c_void_p, c_void_p]
5088 isl.isl_aff_mul.restype = c_void_p
5089 isl.isl_aff_mul.argtypes = [c_void_p, c_void_p]
5090 isl.isl_aff_ne_set.restype = c_void_p
5091 isl.isl_aff_ne_set.argtypes = [c_void_p, c_void_p]
5092 isl.isl_aff_neg.restype = c_void_p
5093 isl.isl_aff_neg.argtypes = [c_void_p]
5094 isl.isl_aff_plain_is_equal.argtypes = [c_void_p, c_void_p]
5095 isl.isl_aff_pullback_multi_aff.restype = c_void_p
5096 isl.isl_aff_pullback_multi_aff.argtypes = [c_void_p, c_void_p]
5097 isl.isl_aff_scale_val.restype = c_void_p
5098 isl.isl_aff_scale_val.argtypes = [c_void_p, c_void_p]
5099 isl.isl_aff_scale_down_val.restype = c_void_p
5100 isl.isl_aff_scale_down_val.argtypes = [c_void_p, c_void_p]
5101 isl.isl_aff_sub.restype = c_void_p
5102 isl.isl_aff_sub.argtypes = [c_void_p, c_void_p]
5103 isl.isl_aff_to_list.restype = c_void_p
5104 isl.isl_aff_to_list.argtypes = [c_void_p]
5105 isl.isl_aff_unbind_params_insert_domain.restype = c_void_p
5106 isl.isl_aff_unbind_params_insert_domain.argtypes = [c_void_p, c_void_p]
5107 isl.isl_aff_zero_on_domain_space.restype = c_void_p
5108 isl.isl_aff_zero_on_domain_space.argtypes = [c_void_p]
5109 isl.isl_aff_copy.restype = c_void_p
5110 isl.isl_aff_copy.argtypes = [c_void_p]
5111 isl.isl_aff_free.restype = c_void_p
5112 isl.isl_aff_free.argtypes = [c_void_p]
5113 isl.isl_aff_to_str.restype = POINTER(c_char)
5114 isl.isl_aff_to_str.argtypes = [c_void_p]
5116 class aff_list(object):
5117     def __init__(self, *args, **keywords):
5118         if "ptr" in keywords:
5119             self.ctx = keywords["ctx"]
5120             self.ptr = keywords["ptr"]
5121             return
5122         if len(args) == 1 and type(args[0]) == int:
5123             self.ctx = Context.getDefaultInstance()
5124             self.ptr = isl.isl_aff_list_alloc(self.ctx, args[0])
5125             return
5126         if len(args) == 1 and args[0].__class__ is aff:
5127             self.ctx = Context.getDefaultInstance()
5128             self.ptr = isl.isl_aff_list_from_aff(isl.isl_aff_copy(args[0].ptr))
5129             return
5130         if len(args) == 1 and type(args[0]) == str:
5131             self.ctx = Context.getDefaultInstance()
5132             self.ptr = isl.isl_aff_list_read_from_str(self.ctx, args[0].encode('ascii'))
5133             return
5134         raise Error
5135     def __del__(self):
5136         if hasattr(self, 'ptr'):
5137             isl.isl_aff_list_free(self.ptr)
5138     def __str__(arg0):
5139         try:
5140             if not arg0.__class__ is aff_list:
5141                 arg0 = aff_list(arg0)
5142         except:
5143             raise
5144         ptr = isl.isl_aff_list_to_str(arg0.ptr)
5145         res = cast(ptr, c_char_p).value.decode('ascii')
5146         libc.free(ptr)
5147         return res
5148     def __repr__(self):
5149         s = str(self)
5150         if '"' in s:
5151             return 'isl.aff_list("""%s""")' % s
5152         else:
5153             return 'isl.aff_list("%s")' % s
5154     def add(arg0, arg1):
5155         try:
5156             if not arg0.__class__ is aff_list:
5157                 arg0 = aff_list(arg0)
5158         except:
5159             raise
5160         try:
5161             if not arg1.__class__ is aff:
5162                 arg1 = aff(arg1)
5163         except:
5164             raise
5165         ctx = arg0.ctx
5166         res = isl.isl_aff_list_add(isl.isl_aff_list_copy(arg0.ptr), isl.isl_aff_copy(arg1.ptr))
5167         obj = aff_list(ctx=ctx, ptr=res)
5168         return obj
5169     def at(arg0, arg1):
5170         try:
5171             if not arg0.__class__ is aff_list:
5172                 arg0 = aff_list(arg0)
5173         except:
5174             raise
5175         ctx = arg0.ctx
5176         res = isl.isl_aff_list_get_at(arg0.ptr, arg1)
5177         obj = aff(ctx=ctx, ptr=res)
5178         return obj
5179     def get_at(arg0, arg1):
5180         return arg0.at(arg1)
5181     def clear(arg0):
5182         try:
5183             if not arg0.__class__ is aff_list:
5184                 arg0 = aff_list(arg0)
5185         except:
5186             raise
5187         ctx = arg0.ctx
5188         res = isl.isl_aff_list_clear(isl.isl_aff_list_copy(arg0.ptr))
5189         obj = aff_list(ctx=ctx, ptr=res)
5190         return obj
5191     def concat(arg0, arg1):
5192         try:
5193             if not arg0.__class__ is aff_list:
5194                 arg0 = aff_list(arg0)
5195         except:
5196             raise
5197         try:
5198             if not arg1.__class__ is aff_list:
5199                 arg1 = aff_list(arg1)
5200         except:
5201             raise
5202         ctx = arg0.ctx
5203         res = isl.isl_aff_list_concat(isl.isl_aff_list_copy(arg0.ptr), isl.isl_aff_list_copy(arg1.ptr))
5204         obj = aff_list(ctx=ctx, ptr=res)
5205         return obj
5206     def drop(arg0, arg1, arg2):
5207         try:
5208             if not arg0.__class__ is aff_list:
5209                 arg0 = aff_list(arg0)
5210         except:
5211             raise
5212         ctx = arg0.ctx
5213         res = isl.isl_aff_list_drop(isl.isl_aff_list_copy(arg0.ptr), arg1, arg2)
5214         obj = aff_list(ctx=ctx, ptr=res)
5215         return obj
5216     def foreach(arg0, arg1):
5217         try:
5218             if not arg0.__class__ is aff_list:
5219                 arg0 = aff_list(arg0)
5220         except:
5221             raise
5222         exc_info = [None]
5223         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
5224         def cb_func(cb_arg0, cb_arg1):
5225             cb_arg0 = aff(ctx=arg0.ctx, ptr=(cb_arg0))
5226             try:
5227                 arg1(cb_arg0)
5228             except BaseException as e:
5229                 exc_info[0] = e
5230                 return -1
5231             return 0
5232         cb1 = fn(cb_func)
5233         ctx = arg0.ctx
5234         res = isl.isl_aff_list_foreach(arg0.ptr, cb1, None)
5235         if exc_info[0] is not None:
5236             raise exc_info[0]
5237         if res < 0:
5238             raise Error
5239     def foreach_scc(arg0, arg1, arg2):
5240         try:
5241             if not arg0.__class__ is aff_list:
5242                 arg0 = aff_list(arg0)
5243         except:
5244             raise
5245         exc_info = [None]
5246         fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
5247         def cb_func(cb_arg0, cb_arg1, cb_arg2):
5248             cb_arg0 = aff(ctx=arg0.ctx, ptr=isl.isl_aff_copy(cb_arg0))
5249             cb_arg1 = aff(ctx=arg0.ctx, ptr=isl.isl_aff_copy(cb_arg1))
5250             try:
5251                 res = arg1(cb_arg0, cb_arg1)
5252             except BaseException as e:
5253                 exc_info[0] = e
5254                 return -1
5255             return 1 if res else 0
5256         cb1 = fn(cb_func)
5257         exc_info = [None]
5258         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
5259         def cb_func(cb_arg0, cb_arg1):
5260             cb_arg0 = aff_list(ctx=arg0.ctx, ptr=(cb_arg0))
5261             try:
5262                 arg2(cb_arg0)
5263             except BaseException as e:
5264                 exc_info[0] = e
5265                 return -1
5266             return 0
5267         cb2 = fn(cb_func)
5268         ctx = arg0.ctx
5269         res = isl.isl_aff_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
5270         if exc_info[0] is not None:
5271             raise exc_info[0]
5272         if res < 0:
5273             raise Error
5274     def insert(arg0, arg1, arg2):
5275         try:
5276             if not arg0.__class__ is aff_list:
5277                 arg0 = aff_list(arg0)
5278         except:
5279             raise
5280         try:
5281             if not arg2.__class__ is aff:
5282                 arg2 = aff(arg2)
5283         except:
5284             raise
5285         ctx = arg0.ctx
5286         res = isl.isl_aff_list_insert(isl.isl_aff_list_copy(arg0.ptr), arg1, isl.isl_aff_copy(arg2.ptr))
5287         obj = aff_list(ctx=ctx, ptr=res)
5288         return obj
5289     def set_at(arg0, arg1, arg2):
5290         try:
5291             if not arg0.__class__ is aff_list:
5292                 arg0 = aff_list(arg0)
5293         except:
5294             raise
5295         try:
5296             if not arg2.__class__ is aff:
5297                 arg2 = aff(arg2)
5298         except:
5299             raise
5300         ctx = arg0.ctx
5301         res = isl.isl_aff_list_set_at(isl.isl_aff_list_copy(arg0.ptr), arg1, isl.isl_aff_copy(arg2.ptr))
5302         obj = aff_list(ctx=ctx, ptr=res)
5303         return obj
5304     def size(arg0):
5305         try:
5306             if not arg0.__class__ is aff_list:
5307                 arg0 = aff_list(arg0)
5308         except:
5309             raise
5310         ctx = arg0.ctx
5311         res = isl.isl_aff_list_size(arg0.ptr)
5312         if res < 0:
5313             raise Error
5314         return int(res)
5316 isl.isl_aff_list_alloc.restype = c_void_p
5317 isl.isl_aff_list_alloc.argtypes = [Context, c_int]
5318 isl.isl_aff_list_from_aff.restype = c_void_p
5319 isl.isl_aff_list_from_aff.argtypes = [c_void_p]
5320 isl.isl_aff_list_read_from_str.restype = c_void_p
5321 isl.isl_aff_list_read_from_str.argtypes = [Context, c_char_p]
5322 isl.isl_aff_list_add.restype = c_void_p
5323 isl.isl_aff_list_add.argtypes = [c_void_p, c_void_p]
5324 isl.isl_aff_list_get_at.restype = c_void_p
5325 isl.isl_aff_list_get_at.argtypes = [c_void_p, c_int]
5326 isl.isl_aff_list_clear.restype = c_void_p
5327 isl.isl_aff_list_clear.argtypes = [c_void_p]
5328 isl.isl_aff_list_concat.restype = c_void_p
5329 isl.isl_aff_list_concat.argtypes = [c_void_p, c_void_p]
5330 isl.isl_aff_list_drop.restype = c_void_p
5331 isl.isl_aff_list_drop.argtypes = [c_void_p, c_int, c_int]
5332 isl.isl_aff_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
5333 isl.isl_aff_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
5334 isl.isl_aff_list_insert.restype = c_void_p
5335 isl.isl_aff_list_insert.argtypes = [c_void_p, c_int, c_void_p]
5336 isl.isl_aff_list_set_at.restype = c_void_p
5337 isl.isl_aff_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
5338 isl.isl_aff_list_size.argtypes = [c_void_p]
5339 isl.isl_aff_list_copy.restype = c_void_p
5340 isl.isl_aff_list_copy.argtypes = [c_void_p]
5341 isl.isl_aff_list_free.restype = c_void_p
5342 isl.isl_aff_list_free.argtypes = [c_void_p]
5343 isl.isl_aff_list_to_str.restype = POINTER(c_char)
5344 isl.isl_aff_list_to_str.argtypes = [c_void_p]
5346 class ast_build(object):
5347     def __init__(self, *args, **keywords):
5348         if "ptr" in keywords:
5349             self.ctx = keywords["ctx"]
5350             self.ptr = keywords["ptr"]
5351             return
5352         if len(args) == 0:
5353             self.ctx = Context.getDefaultInstance()
5354             self.ptr = isl.isl_ast_build_alloc(self.ctx)
5355             return
5356         raise Error
5357     def __del__(self):
5358         if hasattr(self, 'ptr'):
5359             isl.isl_ast_build_free(self.ptr)
5360     def copy_callbacks(self, obj):
5361         if hasattr(obj, 'at_each_domain'):
5362             self.at_each_domain = obj.at_each_domain
5363     def set_at_each_domain(arg0, arg1):
5364         try:
5365             if not arg0.__class__ is ast_build:
5366                 arg0 = ast_build(arg0)
5367         except:
5368             raise
5369         exc_info = [None]
5370         fn = CFUNCTYPE(c_void_p, c_void_p, c_void_p, c_void_p)
5371         def cb_func(cb_arg0, cb_arg1, cb_arg2):
5372             cb_arg0 = ast_node(ctx=arg0.ctx, ptr=(cb_arg0))
5373             cb_arg1 = ast_build(ctx=arg0.ctx, ptr=isl.isl_ast_build_copy(cb_arg1))
5374             try:
5375                 res = arg1(cb_arg0, cb_arg1)
5376             except BaseException as e:
5377                 exc_info[0] = e
5378                 return None
5379             return isl.isl_ast_node_copy(res.ptr)
5380         cb1 = fn(cb_func)
5381         ctx = arg0.ctx
5382         res = isl.isl_ast_build_set_at_each_domain(isl.isl_ast_build_copy(arg0.ptr), cb1, None)
5383         if exc_info[0] is not None:
5384             raise exc_info[0]
5385         if hasattr(arg0, 'at_each_domain') and arg0.at_each_domain['exc_info'] != None:
5386             exc_info = arg0.at_each_domain['exc_info'][0]
5387             arg0.at_each_domain['exc_info'][0] = None
5388             if exc_info is not None:
5389                 raise exc_info
5390         obj = ast_build(ctx=ctx, ptr=res)
5391         obj.copy_callbacks(arg0)
5392         obj.at_each_domain = { 'func': cb1, 'exc_info': exc_info }
5393         return obj
5394     def access_from(*args):
5395         if len(args) == 2 and args[1].__class__ is multi_pw_aff:
5396             args = list(args)
5397             try:
5398                 if not args[0].__class__ is ast_build:
5399                     args[0] = ast_build(args[0])
5400             except:
5401                 raise
5402             ctx = args[0].ctx
5403             res = isl.isl_ast_build_access_from_multi_pw_aff(args[0].ptr, isl.isl_multi_pw_aff_copy(args[1].ptr))
5404             if hasattr(args[0], 'at_each_domain') and args[0].at_each_domain['exc_info'] != None:
5405                 exc_info = args[0].at_each_domain['exc_info'][0]
5406                 args[0].at_each_domain['exc_info'][0] = None
5407                 if exc_info is not None:
5408                     raise exc_info
5409             obj = ast_expr(ctx=ctx, ptr=res)
5410             return obj
5411         if len(args) == 2 and args[1].__class__ is pw_multi_aff:
5412             args = list(args)
5413             try:
5414                 if not args[0].__class__ is ast_build:
5415                     args[0] = ast_build(args[0])
5416             except:
5417                 raise
5418             ctx = args[0].ctx
5419             res = isl.isl_ast_build_access_from_pw_multi_aff(args[0].ptr, isl.isl_pw_multi_aff_copy(args[1].ptr))
5420             if hasattr(args[0], 'at_each_domain') and args[0].at_each_domain['exc_info'] != None:
5421                 exc_info = args[0].at_each_domain['exc_info'][0]
5422                 args[0].at_each_domain['exc_info'][0] = None
5423                 if exc_info is not None:
5424                     raise exc_info
5425             obj = ast_expr(ctx=ctx, ptr=res)
5426             return obj
5427         raise Error
5428     def call_from(*args):
5429         if len(args) == 2 and args[1].__class__ is multi_pw_aff:
5430             args = list(args)
5431             try:
5432                 if not args[0].__class__ is ast_build:
5433                     args[0] = ast_build(args[0])
5434             except:
5435                 raise
5436             ctx = args[0].ctx
5437             res = isl.isl_ast_build_call_from_multi_pw_aff(args[0].ptr, isl.isl_multi_pw_aff_copy(args[1].ptr))
5438             if hasattr(args[0], 'at_each_domain') and args[0].at_each_domain['exc_info'] != None:
5439                 exc_info = args[0].at_each_domain['exc_info'][0]
5440                 args[0].at_each_domain['exc_info'][0] = None
5441                 if exc_info is not None:
5442                     raise exc_info
5443             obj = ast_expr(ctx=ctx, ptr=res)
5444             return obj
5445         if len(args) == 2 and args[1].__class__ is pw_multi_aff:
5446             args = list(args)
5447             try:
5448                 if not args[0].__class__ is ast_build:
5449                     args[0] = ast_build(args[0])
5450             except:
5451                 raise
5452             ctx = args[0].ctx
5453             res = isl.isl_ast_build_call_from_pw_multi_aff(args[0].ptr, isl.isl_pw_multi_aff_copy(args[1].ptr))
5454             if hasattr(args[0], 'at_each_domain') and args[0].at_each_domain['exc_info'] != None:
5455                 exc_info = args[0].at_each_domain['exc_info'][0]
5456                 args[0].at_each_domain['exc_info'][0] = None
5457                 if exc_info is not None:
5458                     raise exc_info
5459             obj = ast_expr(ctx=ctx, ptr=res)
5460             return obj
5461         raise Error
5462     def expr_from(*args):
5463         if len(args) == 2 and args[1].__class__ is pw_aff:
5464             args = list(args)
5465             try:
5466                 if not args[0].__class__ is ast_build:
5467                     args[0] = ast_build(args[0])
5468             except:
5469                 raise
5470             ctx = args[0].ctx
5471             res = isl.isl_ast_build_expr_from_pw_aff(args[0].ptr, isl.isl_pw_aff_copy(args[1].ptr))
5472             if hasattr(args[0], 'at_each_domain') and args[0].at_each_domain['exc_info'] != None:
5473                 exc_info = args[0].at_each_domain['exc_info'][0]
5474                 args[0].at_each_domain['exc_info'][0] = None
5475                 if exc_info is not None:
5476                     raise exc_info
5477             obj = ast_expr(ctx=ctx, ptr=res)
5478             return obj
5479         if len(args) == 2 and args[1].__class__ is set:
5480             args = list(args)
5481             try:
5482                 if not args[0].__class__ is ast_build:
5483                     args[0] = ast_build(args[0])
5484             except:
5485                 raise
5486             ctx = args[0].ctx
5487             res = isl.isl_ast_build_expr_from_set(args[0].ptr, isl.isl_set_copy(args[1].ptr))
5488             if hasattr(args[0], 'at_each_domain') and args[0].at_each_domain['exc_info'] != None:
5489                 exc_info = args[0].at_each_domain['exc_info'][0]
5490                 args[0].at_each_domain['exc_info'][0] = None
5491                 if exc_info is not None:
5492                     raise exc_info
5493             obj = ast_expr(ctx=ctx, ptr=res)
5494             return obj
5495         raise Error
5496     @staticmethod
5497     def from_context(arg0):
5498         try:
5499             if not arg0.__class__ is set:
5500                 arg0 = set(arg0)
5501         except:
5502             raise
5503         ctx = arg0.ctx
5504         res = isl.isl_ast_build_from_context(isl.isl_set_copy(arg0.ptr))
5505         obj = ast_build(ctx=ctx, ptr=res)
5506         return obj
5507     def node_from(*args):
5508         if len(args) == 2 and args[1].__class__ is schedule:
5509             args = list(args)
5510             try:
5511                 if not args[0].__class__ is ast_build:
5512                     args[0] = ast_build(args[0])
5513             except:
5514                 raise
5515             ctx = args[0].ctx
5516             res = isl.isl_ast_build_node_from_schedule(args[0].ptr, isl.isl_schedule_copy(args[1].ptr))
5517             if hasattr(args[0], 'at_each_domain') and args[0].at_each_domain['exc_info'] != None:
5518                 exc_info = args[0].at_each_domain['exc_info'][0]
5519                 args[0].at_each_domain['exc_info'][0] = None
5520                 if exc_info is not None:
5521                     raise exc_info
5522             obj = ast_node(ctx=ctx, ptr=res)
5523             return obj
5524         raise Error
5525     def node_from_schedule_map(arg0, arg1):
5526         try:
5527             if not arg0.__class__ is ast_build:
5528                 arg0 = ast_build(arg0)
5529         except:
5530             raise
5531         try:
5532             if not arg1.__class__ is union_map:
5533                 arg1 = union_map(arg1)
5534         except:
5535             raise
5536         ctx = arg0.ctx
5537         res = isl.isl_ast_build_node_from_schedule_map(arg0.ptr, isl.isl_union_map_copy(arg1.ptr))
5538         if hasattr(arg0, 'at_each_domain') and arg0.at_each_domain['exc_info'] != None:
5539             exc_info = arg0.at_each_domain['exc_info'][0]
5540             arg0.at_each_domain['exc_info'][0] = None
5541             if exc_info is not None:
5542                 raise exc_info
5543         obj = ast_node(ctx=ctx, ptr=res)
5544         return obj
5545     def schedule(arg0):
5546         try:
5547             if not arg0.__class__ is ast_build:
5548                 arg0 = ast_build(arg0)
5549         except:
5550             raise
5551         ctx = arg0.ctx
5552         res = isl.isl_ast_build_get_schedule(arg0.ptr)
5553         if hasattr(arg0, 'at_each_domain') and arg0.at_each_domain['exc_info'] != None:
5554             exc_info = arg0.at_each_domain['exc_info'][0]
5555             arg0.at_each_domain['exc_info'][0] = None
5556             if exc_info is not None:
5557                 raise exc_info
5558         obj = union_map(ctx=ctx, ptr=res)
5559         return obj
5560     def get_schedule(arg0):
5561         return arg0.schedule()
5563 isl.isl_ast_build_alloc.restype = c_void_p
5564 isl.isl_ast_build_alloc.argtypes = [Context]
5565 isl.isl_ast_build_set_at_each_domain.restype = c_void_p
5566 isl.isl_ast_build_set_at_each_domain.argtypes = [c_void_p, c_void_p, c_void_p]
5567 isl.isl_ast_build_access_from_multi_pw_aff.restype = c_void_p
5568 isl.isl_ast_build_access_from_multi_pw_aff.argtypes = [c_void_p, c_void_p]
5569 isl.isl_ast_build_access_from_pw_multi_aff.restype = c_void_p
5570 isl.isl_ast_build_access_from_pw_multi_aff.argtypes = [c_void_p, c_void_p]
5571 isl.isl_ast_build_call_from_multi_pw_aff.restype = c_void_p
5572 isl.isl_ast_build_call_from_multi_pw_aff.argtypes = [c_void_p, c_void_p]
5573 isl.isl_ast_build_call_from_pw_multi_aff.restype = c_void_p
5574 isl.isl_ast_build_call_from_pw_multi_aff.argtypes = [c_void_p, c_void_p]
5575 isl.isl_ast_build_expr_from_pw_aff.restype = c_void_p
5576 isl.isl_ast_build_expr_from_pw_aff.argtypes = [c_void_p, c_void_p]
5577 isl.isl_ast_build_expr_from_set.restype = c_void_p
5578 isl.isl_ast_build_expr_from_set.argtypes = [c_void_p, c_void_p]
5579 isl.isl_ast_build_from_context.restype = c_void_p
5580 isl.isl_ast_build_from_context.argtypes = [c_void_p]
5581 isl.isl_ast_build_node_from_schedule.restype = c_void_p
5582 isl.isl_ast_build_node_from_schedule.argtypes = [c_void_p, c_void_p]
5583 isl.isl_ast_build_node_from_schedule_map.restype = c_void_p
5584 isl.isl_ast_build_node_from_schedule_map.argtypes = [c_void_p, c_void_p]
5585 isl.isl_ast_build_get_schedule.restype = c_void_p
5586 isl.isl_ast_build_get_schedule.argtypes = [c_void_p]
5587 isl.isl_ast_build_copy.restype = c_void_p
5588 isl.isl_ast_build_copy.argtypes = [c_void_p]
5589 isl.isl_ast_build_free.restype = c_void_p
5590 isl.isl_ast_build_free.argtypes = [c_void_p]
5592 class ast_expr(object):
5593     def __init__(self, *args, **keywords):
5594         if "ptr" in keywords:
5595             self.ctx = keywords["ctx"]
5596             self.ptr = keywords["ptr"]
5597             return
5598         if len(args) == 1 and isinstance(args[0], ast_expr_op):
5599             self.ctx = args[0].ctx
5600             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5601             return
5602         if len(args) == 1 and isinstance(args[0], ast_expr_id):
5603             self.ctx = args[0].ctx
5604             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5605             return
5606         if len(args) == 1 and isinstance(args[0], ast_expr_int):
5607             self.ctx = args[0].ctx
5608             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5609             return
5610         raise Error
5611     def __del__(self):
5612         if hasattr(self, 'ptr'):
5613             isl.isl_ast_expr_free(self.ptr)
5614     def __new__(cls, *args, **keywords):
5615         if "ptr" in keywords:
5616             type = isl.isl_ast_expr_get_type(keywords["ptr"])
5617             if type == 0:
5618                 return ast_expr_op(**keywords)
5619             if type == 1:
5620                 return ast_expr_id(**keywords)
5621             if type == 2:
5622                 return ast_expr_int(**keywords)
5623             raise Error
5624         return super(ast_expr, cls).__new__(cls)
5625     def __str__(arg0):
5626         try:
5627             if not arg0.__class__ is ast_expr:
5628                 arg0 = ast_expr(arg0)
5629         except:
5630             raise
5631         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
5632         res = cast(ptr, c_char_p).value.decode('ascii')
5633         libc.free(ptr)
5634         return res
5635     def __repr__(self):
5636         s = str(self)
5637         if '"' in s:
5638             return 'isl.ast_expr("""%s""")' % s
5639         else:
5640             return 'isl.ast_expr("%s")' % s
5641     def to_C_str(arg0):
5642         try:
5643             if not arg0.__class__ is ast_expr:
5644                 arg0 = ast_expr(arg0)
5645         except:
5646             raise
5647         ctx = arg0.ctx
5648         res = isl.isl_ast_expr_to_C_str(arg0.ptr)
5649         if res == 0:
5650             raise Error
5651         string = cast(res, c_char_p).value.decode('ascii')
5652         libc.free(res)
5653         return string
5655 isl.isl_ast_expr_to_C_str.restype = POINTER(c_char)
5656 isl.isl_ast_expr_to_C_str.argtypes = [c_void_p]
5657 isl.isl_ast_expr_copy.restype = c_void_p
5658 isl.isl_ast_expr_copy.argtypes = [c_void_p]
5659 isl.isl_ast_expr_free.restype = c_void_p
5660 isl.isl_ast_expr_free.argtypes = [c_void_p]
5661 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
5662 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
5663 isl.isl_ast_expr_get_type.argtypes = [c_void_p]
5665 class ast_expr_id(ast_expr):
5666     def __init__(self, *args, **keywords):
5667         if "ptr" in keywords:
5668             self.ctx = keywords["ctx"]
5669             self.ptr = keywords["ptr"]
5670             return
5671         raise Error
5672     def __del__(self):
5673         if hasattr(self, 'ptr'):
5674             isl.isl_ast_expr_free(self.ptr)
5675     def __new__(cls, *args, **keywords):
5676         return super(ast_expr_id, cls).__new__(cls)
5677     def __str__(arg0):
5678         try:
5679             if not arg0.__class__ is ast_expr_id:
5680                 arg0 = ast_expr_id(arg0)
5681         except:
5682             raise
5683         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
5684         res = cast(ptr, c_char_p).value.decode('ascii')
5685         libc.free(ptr)
5686         return res
5687     def __repr__(self):
5688         s = str(self)
5689         if '"' in s:
5690             return 'isl.ast_expr_id("""%s""")' % s
5691         else:
5692             return 'isl.ast_expr_id("%s")' % s
5693     def id(arg0):
5694         try:
5695             if not arg0.__class__ is ast_expr:
5696                 arg0 = ast_expr(arg0)
5697         except:
5698             raise
5699         ctx = arg0.ctx
5700         res = isl.isl_ast_expr_id_get_id(arg0.ptr)
5701         obj = id(ctx=ctx, ptr=res)
5702         return obj
5703     def get_id(arg0):
5704         return arg0.id()
5706 isl.isl_ast_expr_id_get_id.restype = c_void_p
5707 isl.isl_ast_expr_id_get_id.argtypes = [c_void_p]
5708 isl.isl_ast_expr_copy.restype = c_void_p
5709 isl.isl_ast_expr_copy.argtypes = [c_void_p]
5710 isl.isl_ast_expr_free.restype = c_void_p
5711 isl.isl_ast_expr_free.argtypes = [c_void_p]
5712 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
5713 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
5715 class ast_expr_int(ast_expr):
5716     def __init__(self, *args, **keywords):
5717         if "ptr" in keywords:
5718             self.ctx = keywords["ctx"]
5719             self.ptr = keywords["ptr"]
5720             return
5721         raise Error
5722     def __del__(self):
5723         if hasattr(self, 'ptr'):
5724             isl.isl_ast_expr_free(self.ptr)
5725     def __new__(cls, *args, **keywords):
5726         return super(ast_expr_int, cls).__new__(cls)
5727     def __str__(arg0):
5728         try:
5729             if not arg0.__class__ is ast_expr_int:
5730                 arg0 = ast_expr_int(arg0)
5731         except:
5732             raise
5733         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
5734         res = cast(ptr, c_char_p).value.decode('ascii')
5735         libc.free(ptr)
5736         return res
5737     def __repr__(self):
5738         s = str(self)
5739         if '"' in s:
5740             return 'isl.ast_expr_int("""%s""")' % s
5741         else:
5742             return 'isl.ast_expr_int("%s")' % s
5743     def val(arg0):
5744         try:
5745             if not arg0.__class__ is ast_expr:
5746                 arg0 = ast_expr(arg0)
5747         except:
5748             raise
5749         ctx = arg0.ctx
5750         res = isl.isl_ast_expr_int_get_val(arg0.ptr)
5751         obj = val(ctx=ctx, ptr=res)
5752         return obj
5753     def get_val(arg0):
5754         return arg0.val()
5756 isl.isl_ast_expr_int_get_val.restype = c_void_p
5757 isl.isl_ast_expr_int_get_val.argtypes = [c_void_p]
5758 isl.isl_ast_expr_copy.restype = c_void_p
5759 isl.isl_ast_expr_copy.argtypes = [c_void_p]
5760 isl.isl_ast_expr_free.restype = c_void_p
5761 isl.isl_ast_expr_free.argtypes = [c_void_p]
5762 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
5763 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
5765 class ast_expr_op(ast_expr):
5766     def __init__(self, *args, **keywords):
5767         if "ptr" in keywords:
5768             self.ctx = keywords["ctx"]
5769             self.ptr = keywords["ptr"]
5770             return
5771         if len(args) == 1 and isinstance(args[0], ast_expr_op_and):
5772             self.ctx = args[0].ctx
5773             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5774             return
5775         if len(args) == 1 and isinstance(args[0], ast_expr_op_and_then):
5776             self.ctx = args[0].ctx
5777             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5778             return
5779         if len(args) == 1 and isinstance(args[0], ast_expr_op_or):
5780             self.ctx = args[0].ctx
5781             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5782             return
5783         if len(args) == 1 and isinstance(args[0], ast_expr_op_or_else):
5784             self.ctx = args[0].ctx
5785             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5786             return
5787         if len(args) == 1 and isinstance(args[0], ast_expr_op_max):
5788             self.ctx = args[0].ctx
5789             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5790             return
5791         if len(args) == 1 and isinstance(args[0], ast_expr_op_min):
5792             self.ctx = args[0].ctx
5793             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5794             return
5795         if len(args) == 1 and isinstance(args[0], ast_expr_op_minus):
5796             self.ctx = args[0].ctx
5797             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5798             return
5799         if len(args) == 1 and isinstance(args[0], ast_expr_op_add):
5800             self.ctx = args[0].ctx
5801             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5802             return
5803         if len(args) == 1 and isinstance(args[0], ast_expr_op_sub):
5804             self.ctx = args[0].ctx
5805             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5806             return
5807         if len(args) == 1 and isinstance(args[0], ast_expr_op_mul):
5808             self.ctx = args[0].ctx
5809             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5810             return
5811         if len(args) == 1 and isinstance(args[0], ast_expr_op_div):
5812             self.ctx = args[0].ctx
5813             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5814             return
5815         if len(args) == 1 and isinstance(args[0], ast_expr_op_fdiv_q):
5816             self.ctx = args[0].ctx
5817             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5818             return
5819         if len(args) == 1 and isinstance(args[0], ast_expr_op_pdiv_q):
5820             self.ctx = args[0].ctx
5821             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5822             return
5823         if len(args) == 1 and isinstance(args[0], ast_expr_op_pdiv_r):
5824             self.ctx = args[0].ctx
5825             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5826             return
5827         if len(args) == 1 and isinstance(args[0], ast_expr_op_zdiv_r):
5828             self.ctx = args[0].ctx
5829             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5830             return
5831         if len(args) == 1 and isinstance(args[0], ast_expr_op_cond):
5832             self.ctx = args[0].ctx
5833             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5834             return
5835         if len(args) == 1 and isinstance(args[0], ast_expr_op_select):
5836             self.ctx = args[0].ctx
5837             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5838             return
5839         if len(args) == 1 and isinstance(args[0], ast_expr_op_eq):
5840             self.ctx = args[0].ctx
5841             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5842             return
5843         if len(args) == 1 and isinstance(args[0], ast_expr_op_le):
5844             self.ctx = args[0].ctx
5845             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5846             return
5847         if len(args) == 1 and isinstance(args[0], ast_expr_op_lt):
5848             self.ctx = args[0].ctx
5849             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5850             return
5851         if len(args) == 1 and isinstance(args[0], ast_expr_op_ge):
5852             self.ctx = args[0].ctx
5853             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5854             return
5855         if len(args) == 1 and isinstance(args[0], ast_expr_op_gt):
5856             self.ctx = args[0].ctx
5857             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5858             return
5859         if len(args) == 1 and isinstance(args[0], ast_expr_op_call):
5860             self.ctx = args[0].ctx
5861             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5862             return
5863         if len(args) == 1 and isinstance(args[0], ast_expr_op_access):
5864             self.ctx = args[0].ctx
5865             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5866             return
5867         if len(args) == 1 and isinstance(args[0], ast_expr_op_member):
5868             self.ctx = args[0].ctx
5869             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5870             return
5871         if len(args) == 1 and isinstance(args[0], ast_expr_op_address_of):
5872             self.ctx = args[0].ctx
5873             self.ptr = isl.isl_ast_expr_copy(args[0].ptr)
5874             return
5875         raise Error
5876     def __del__(self):
5877         if hasattr(self, 'ptr'):
5878             isl.isl_ast_expr_free(self.ptr)
5879     def __new__(cls, *args, **keywords):
5880         if "ptr" in keywords:
5881             type = isl.isl_ast_expr_op_get_type(keywords["ptr"])
5882             if type == 0:
5883                 return ast_expr_op_and(**keywords)
5884             if type == 1:
5885                 return ast_expr_op_and_then(**keywords)
5886             if type == 2:
5887                 return ast_expr_op_or(**keywords)
5888             if type == 3:
5889                 return ast_expr_op_or_else(**keywords)
5890             if type == 4:
5891                 return ast_expr_op_max(**keywords)
5892             if type == 5:
5893                 return ast_expr_op_min(**keywords)
5894             if type == 6:
5895                 return ast_expr_op_minus(**keywords)
5896             if type == 7:
5897                 return ast_expr_op_add(**keywords)
5898             if type == 8:
5899                 return ast_expr_op_sub(**keywords)
5900             if type == 9:
5901                 return ast_expr_op_mul(**keywords)
5902             if type == 10:
5903                 return ast_expr_op_div(**keywords)
5904             if type == 11:
5905                 return ast_expr_op_fdiv_q(**keywords)
5906             if type == 12:
5907                 return ast_expr_op_pdiv_q(**keywords)
5908             if type == 13:
5909                 return ast_expr_op_pdiv_r(**keywords)
5910             if type == 14:
5911                 return ast_expr_op_zdiv_r(**keywords)
5912             if type == 15:
5913                 return ast_expr_op_cond(**keywords)
5914             if type == 16:
5915                 return ast_expr_op_select(**keywords)
5916             if type == 17:
5917                 return ast_expr_op_eq(**keywords)
5918             if type == 18:
5919                 return ast_expr_op_le(**keywords)
5920             if type == 19:
5921                 return ast_expr_op_lt(**keywords)
5922             if type == 20:
5923                 return ast_expr_op_ge(**keywords)
5924             if type == 21:
5925                 return ast_expr_op_gt(**keywords)
5926             if type == 22:
5927                 return ast_expr_op_call(**keywords)
5928             if type == 23:
5929                 return ast_expr_op_access(**keywords)
5930             if type == 24:
5931                 return ast_expr_op_member(**keywords)
5932             if type == 25:
5933                 return ast_expr_op_address_of(**keywords)
5934             raise Error
5935         return super(ast_expr_op, cls).__new__(cls)
5936     def __str__(arg0):
5937         try:
5938             if not arg0.__class__ is ast_expr_op:
5939                 arg0 = ast_expr_op(arg0)
5940         except:
5941             raise
5942         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
5943         res = cast(ptr, c_char_p).value.decode('ascii')
5944         libc.free(ptr)
5945         return res
5946     def __repr__(self):
5947         s = str(self)
5948         if '"' in s:
5949             return 'isl.ast_expr_op("""%s""")' % s
5950         else:
5951             return 'isl.ast_expr_op("%s")' % s
5952     def arg(arg0, arg1):
5953         try:
5954             if not arg0.__class__ is ast_expr:
5955                 arg0 = ast_expr(arg0)
5956         except:
5957             raise
5958         ctx = arg0.ctx
5959         res = isl.isl_ast_expr_op_get_arg(arg0.ptr, arg1)
5960         obj = ast_expr(ctx=ctx, ptr=res)
5961         return obj
5962     def get_arg(arg0, arg1):
5963         return arg0.arg(arg1)
5964     def n_arg(arg0):
5965         try:
5966             if not arg0.__class__ is ast_expr:
5967                 arg0 = ast_expr(arg0)
5968         except:
5969             raise
5970         ctx = arg0.ctx
5971         res = isl.isl_ast_expr_op_get_n_arg(arg0.ptr)
5972         if res < 0:
5973             raise Error
5974         return int(res)
5975     def get_n_arg(arg0):
5976         return arg0.n_arg()
5978 isl.isl_ast_expr_op_get_arg.restype = c_void_p
5979 isl.isl_ast_expr_op_get_arg.argtypes = [c_void_p, c_int]
5980 isl.isl_ast_expr_op_get_n_arg.argtypes = [c_void_p]
5981 isl.isl_ast_expr_copy.restype = c_void_p
5982 isl.isl_ast_expr_copy.argtypes = [c_void_p]
5983 isl.isl_ast_expr_free.restype = c_void_p
5984 isl.isl_ast_expr_free.argtypes = [c_void_p]
5985 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
5986 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
5987 isl.isl_ast_expr_op_get_type.argtypes = [c_void_p]
5989 class ast_expr_op_access(ast_expr_op):
5990     def __init__(self, *args, **keywords):
5991         if "ptr" in keywords:
5992             self.ctx = keywords["ctx"]
5993             self.ptr = keywords["ptr"]
5994             return
5995         raise Error
5996     def __del__(self):
5997         if hasattr(self, 'ptr'):
5998             isl.isl_ast_expr_free(self.ptr)
5999     def __new__(cls, *args, **keywords):
6000         return super(ast_expr_op_access, cls).__new__(cls)
6001     def __str__(arg0):
6002         try:
6003             if not arg0.__class__ is ast_expr_op_access:
6004                 arg0 = ast_expr_op_access(arg0)
6005         except:
6006             raise
6007         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6008         res = cast(ptr, c_char_p).value.decode('ascii')
6009         libc.free(ptr)
6010         return res
6011     def __repr__(self):
6012         s = str(self)
6013         if '"' in s:
6014             return 'isl.ast_expr_op_access("""%s""")' % s
6015         else:
6016             return 'isl.ast_expr_op_access("%s")' % s
6018 isl.isl_ast_expr_copy.restype = c_void_p
6019 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6020 isl.isl_ast_expr_free.restype = c_void_p
6021 isl.isl_ast_expr_free.argtypes = [c_void_p]
6022 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6023 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6025 class ast_expr_op_add(ast_expr_op):
6026     def __init__(self, *args, **keywords):
6027         if "ptr" in keywords:
6028             self.ctx = keywords["ctx"]
6029             self.ptr = keywords["ptr"]
6030             return
6031         raise Error
6032     def __del__(self):
6033         if hasattr(self, 'ptr'):
6034             isl.isl_ast_expr_free(self.ptr)
6035     def __new__(cls, *args, **keywords):
6036         return super(ast_expr_op_add, cls).__new__(cls)
6037     def __str__(arg0):
6038         try:
6039             if not arg0.__class__ is ast_expr_op_add:
6040                 arg0 = ast_expr_op_add(arg0)
6041         except:
6042             raise
6043         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6044         res = cast(ptr, c_char_p).value.decode('ascii')
6045         libc.free(ptr)
6046         return res
6047     def __repr__(self):
6048         s = str(self)
6049         if '"' in s:
6050             return 'isl.ast_expr_op_add("""%s""")' % s
6051         else:
6052             return 'isl.ast_expr_op_add("%s")' % s
6054 isl.isl_ast_expr_copy.restype = c_void_p
6055 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6056 isl.isl_ast_expr_free.restype = c_void_p
6057 isl.isl_ast_expr_free.argtypes = [c_void_p]
6058 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6059 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6061 class ast_expr_op_address_of(ast_expr_op):
6062     def __init__(self, *args, **keywords):
6063         if "ptr" in keywords:
6064             self.ctx = keywords["ctx"]
6065             self.ptr = keywords["ptr"]
6066             return
6067         raise Error
6068     def __del__(self):
6069         if hasattr(self, 'ptr'):
6070             isl.isl_ast_expr_free(self.ptr)
6071     def __new__(cls, *args, **keywords):
6072         return super(ast_expr_op_address_of, cls).__new__(cls)
6073     def __str__(arg0):
6074         try:
6075             if not arg0.__class__ is ast_expr_op_address_of:
6076                 arg0 = ast_expr_op_address_of(arg0)
6077         except:
6078             raise
6079         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6080         res = cast(ptr, c_char_p).value.decode('ascii')
6081         libc.free(ptr)
6082         return res
6083     def __repr__(self):
6084         s = str(self)
6085         if '"' in s:
6086             return 'isl.ast_expr_op_address_of("""%s""")' % s
6087         else:
6088             return 'isl.ast_expr_op_address_of("%s")' % s
6090 isl.isl_ast_expr_copy.restype = c_void_p
6091 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6092 isl.isl_ast_expr_free.restype = c_void_p
6093 isl.isl_ast_expr_free.argtypes = [c_void_p]
6094 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6095 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6097 class ast_expr_op_and(ast_expr_op):
6098     def __init__(self, *args, **keywords):
6099         if "ptr" in keywords:
6100             self.ctx = keywords["ctx"]
6101             self.ptr = keywords["ptr"]
6102             return
6103         raise Error
6104     def __del__(self):
6105         if hasattr(self, 'ptr'):
6106             isl.isl_ast_expr_free(self.ptr)
6107     def __new__(cls, *args, **keywords):
6108         return super(ast_expr_op_and, cls).__new__(cls)
6109     def __str__(arg0):
6110         try:
6111             if not arg0.__class__ is ast_expr_op_and:
6112                 arg0 = ast_expr_op_and(arg0)
6113         except:
6114             raise
6115         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6116         res = cast(ptr, c_char_p).value.decode('ascii')
6117         libc.free(ptr)
6118         return res
6119     def __repr__(self):
6120         s = str(self)
6121         if '"' in s:
6122             return 'isl.ast_expr_op_and("""%s""")' % s
6123         else:
6124             return 'isl.ast_expr_op_and("%s")' % s
6126 isl.isl_ast_expr_copy.restype = c_void_p
6127 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6128 isl.isl_ast_expr_free.restype = c_void_p
6129 isl.isl_ast_expr_free.argtypes = [c_void_p]
6130 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6131 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6133 class ast_expr_op_and_then(ast_expr_op):
6134     def __init__(self, *args, **keywords):
6135         if "ptr" in keywords:
6136             self.ctx = keywords["ctx"]
6137             self.ptr = keywords["ptr"]
6138             return
6139         raise Error
6140     def __del__(self):
6141         if hasattr(self, 'ptr'):
6142             isl.isl_ast_expr_free(self.ptr)
6143     def __new__(cls, *args, **keywords):
6144         return super(ast_expr_op_and_then, cls).__new__(cls)
6145     def __str__(arg0):
6146         try:
6147             if not arg0.__class__ is ast_expr_op_and_then:
6148                 arg0 = ast_expr_op_and_then(arg0)
6149         except:
6150             raise
6151         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6152         res = cast(ptr, c_char_p).value.decode('ascii')
6153         libc.free(ptr)
6154         return res
6155     def __repr__(self):
6156         s = str(self)
6157         if '"' in s:
6158             return 'isl.ast_expr_op_and_then("""%s""")' % s
6159         else:
6160             return 'isl.ast_expr_op_and_then("%s")' % s
6162 isl.isl_ast_expr_copy.restype = c_void_p
6163 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6164 isl.isl_ast_expr_free.restype = c_void_p
6165 isl.isl_ast_expr_free.argtypes = [c_void_p]
6166 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6167 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6169 class ast_expr_op_call(ast_expr_op):
6170     def __init__(self, *args, **keywords):
6171         if "ptr" in keywords:
6172             self.ctx = keywords["ctx"]
6173             self.ptr = keywords["ptr"]
6174             return
6175         raise Error
6176     def __del__(self):
6177         if hasattr(self, 'ptr'):
6178             isl.isl_ast_expr_free(self.ptr)
6179     def __new__(cls, *args, **keywords):
6180         return super(ast_expr_op_call, cls).__new__(cls)
6181     def __str__(arg0):
6182         try:
6183             if not arg0.__class__ is ast_expr_op_call:
6184                 arg0 = ast_expr_op_call(arg0)
6185         except:
6186             raise
6187         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6188         res = cast(ptr, c_char_p).value.decode('ascii')
6189         libc.free(ptr)
6190         return res
6191     def __repr__(self):
6192         s = str(self)
6193         if '"' in s:
6194             return 'isl.ast_expr_op_call("""%s""")' % s
6195         else:
6196             return 'isl.ast_expr_op_call("%s")' % s
6198 isl.isl_ast_expr_copy.restype = c_void_p
6199 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6200 isl.isl_ast_expr_free.restype = c_void_p
6201 isl.isl_ast_expr_free.argtypes = [c_void_p]
6202 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6203 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6205 class ast_expr_op_cond(ast_expr_op):
6206     def __init__(self, *args, **keywords):
6207         if "ptr" in keywords:
6208             self.ctx = keywords["ctx"]
6209             self.ptr = keywords["ptr"]
6210             return
6211         raise Error
6212     def __del__(self):
6213         if hasattr(self, 'ptr'):
6214             isl.isl_ast_expr_free(self.ptr)
6215     def __new__(cls, *args, **keywords):
6216         return super(ast_expr_op_cond, cls).__new__(cls)
6217     def __str__(arg0):
6218         try:
6219             if not arg0.__class__ is ast_expr_op_cond:
6220                 arg0 = ast_expr_op_cond(arg0)
6221         except:
6222             raise
6223         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6224         res = cast(ptr, c_char_p).value.decode('ascii')
6225         libc.free(ptr)
6226         return res
6227     def __repr__(self):
6228         s = str(self)
6229         if '"' in s:
6230             return 'isl.ast_expr_op_cond("""%s""")' % s
6231         else:
6232             return 'isl.ast_expr_op_cond("%s")' % s
6234 isl.isl_ast_expr_copy.restype = c_void_p
6235 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6236 isl.isl_ast_expr_free.restype = c_void_p
6237 isl.isl_ast_expr_free.argtypes = [c_void_p]
6238 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6239 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6241 class ast_expr_op_div(ast_expr_op):
6242     def __init__(self, *args, **keywords):
6243         if "ptr" in keywords:
6244             self.ctx = keywords["ctx"]
6245             self.ptr = keywords["ptr"]
6246             return
6247         raise Error
6248     def __del__(self):
6249         if hasattr(self, 'ptr'):
6250             isl.isl_ast_expr_free(self.ptr)
6251     def __new__(cls, *args, **keywords):
6252         return super(ast_expr_op_div, cls).__new__(cls)
6253     def __str__(arg0):
6254         try:
6255             if not arg0.__class__ is ast_expr_op_div:
6256                 arg0 = ast_expr_op_div(arg0)
6257         except:
6258             raise
6259         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6260         res = cast(ptr, c_char_p).value.decode('ascii')
6261         libc.free(ptr)
6262         return res
6263     def __repr__(self):
6264         s = str(self)
6265         if '"' in s:
6266             return 'isl.ast_expr_op_div("""%s""")' % s
6267         else:
6268             return 'isl.ast_expr_op_div("%s")' % s
6270 isl.isl_ast_expr_copy.restype = c_void_p
6271 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6272 isl.isl_ast_expr_free.restype = c_void_p
6273 isl.isl_ast_expr_free.argtypes = [c_void_p]
6274 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6275 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6277 class ast_expr_op_eq(ast_expr_op):
6278     def __init__(self, *args, **keywords):
6279         if "ptr" in keywords:
6280             self.ctx = keywords["ctx"]
6281             self.ptr = keywords["ptr"]
6282             return
6283         raise Error
6284     def __del__(self):
6285         if hasattr(self, 'ptr'):
6286             isl.isl_ast_expr_free(self.ptr)
6287     def __new__(cls, *args, **keywords):
6288         return super(ast_expr_op_eq, cls).__new__(cls)
6289     def __str__(arg0):
6290         try:
6291             if not arg0.__class__ is ast_expr_op_eq:
6292                 arg0 = ast_expr_op_eq(arg0)
6293         except:
6294             raise
6295         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6296         res = cast(ptr, c_char_p).value.decode('ascii')
6297         libc.free(ptr)
6298         return res
6299     def __repr__(self):
6300         s = str(self)
6301         if '"' in s:
6302             return 'isl.ast_expr_op_eq("""%s""")' % s
6303         else:
6304             return 'isl.ast_expr_op_eq("%s")' % s
6306 isl.isl_ast_expr_copy.restype = c_void_p
6307 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6308 isl.isl_ast_expr_free.restype = c_void_p
6309 isl.isl_ast_expr_free.argtypes = [c_void_p]
6310 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6311 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6313 class ast_expr_op_fdiv_q(ast_expr_op):
6314     def __init__(self, *args, **keywords):
6315         if "ptr" in keywords:
6316             self.ctx = keywords["ctx"]
6317             self.ptr = keywords["ptr"]
6318             return
6319         raise Error
6320     def __del__(self):
6321         if hasattr(self, 'ptr'):
6322             isl.isl_ast_expr_free(self.ptr)
6323     def __new__(cls, *args, **keywords):
6324         return super(ast_expr_op_fdiv_q, cls).__new__(cls)
6325     def __str__(arg0):
6326         try:
6327             if not arg0.__class__ is ast_expr_op_fdiv_q:
6328                 arg0 = ast_expr_op_fdiv_q(arg0)
6329         except:
6330             raise
6331         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6332         res = cast(ptr, c_char_p).value.decode('ascii')
6333         libc.free(ptr)
6334         return res
6335     def __repr__(self):
6336         s = str(self)
6337         if '"' in s:
6338             return 'isl.ast_expr_op_fdiv_q("""%s""")' % s
6339         else:
6340             return 'isl.ast_expr_op_fdiv_q("%s")' % s
6342 isl.isl_ast_expr_copy.restype = c_void_p
6343 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6344 isl.isl_ast_expr_free.restype = c_void_p
6345 isl.isl_ast_expr_free.argtypes = [c_void_p]
6346 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6347 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6349 class ast_expr_op_ge(ast_expr_op):
6350     def __init__(self, *args, **keywords):
6351         if "ptr" in keywords:
6352             self.ctx = keywords["ctx"]
6353             self.ptr = keywords["ptr"]
6354             return
6355         raise Error
6356     def __del__(self):
6357         if hasattr(self, 'ptr'):
6358             isl.isl_ast_expr_free(self.ptr)
6359     def __new__(cls, *args, **keywords):
6360         return super(ast_expr_op_ge, cls).__new__(cls)
6361     def __str__(arg0):
6362         try:
6363             if not arg0.__class__ is ast_expr_op_ge:
6364                 arg0 = ast_expr_op_ge(arg0)
6365         except:
6366             raise
6367         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6368         res = cast(ptr, c_char_p).value.decode('ascii')
6369         libc.free(ptr)
6370         return res
6371     def __repr__(self):
6372         s = str(self)
6373         if '"' in s:
6374             return 'isl.ast_expr_op_ge("""%s""")' % s
6375         else:
6376             return 'isl.ast_expr_op_ge("%s")' % s
6378 isl.isl_ast_expr_copy.restype = c_void_p
6379 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6380 isl.isl_ast_expr_free.restype = c_void_p
6381 isl.isl_ast_expr_free.argtypes = [c_void_p]
6382 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6383 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6385 class ast_expr_op_gt(ast_expr_op):
6386     def __init__(self, *args, **keywords):
6387         if "ptr" in keywords:
6388             self.ctx = keywords["ctx"]
6389             self.ptr = keywords["ptr"]
6390             return
6391         raise Error
6392     def __del__(self):
6393         if hasattr(self, 'ptr'):
6394             isl.isl_ast_expr_free(self.ptr)
6395     def __new__(cls, *args, **keywords):
6396         return super(ast_expr_op_gt, cls).__new__(cls)
6397     def __str__(arg0):
6398         try:
6399             if not arg0.__class__ is ast_expr_op_gt:
6400                 arg0 = ast_expr_op_gt(arg0)
6401         except:
6402             raise
6403         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6404         res = cast(ptr, c_char_p).value.decode('ascii')
6405         libc.free(ptr)
6406         return res
6407     def __repr__(self):
6408         s = str(self)
6409         if '"' in s:
6410             return 'isl.ast_expr_op_gt("""%s""")' % s
6411         else:
6412             return 'isl.ast_expr_op_gt("%s")' % s
6414 isl.isl_ast_expr_copy.restype = c_void_p
6415 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6416 isl.isl_ast_expr_free.restype = c_void_p
6417 isl.isl_ast_expr_free.argtypes = [c_void_p]
6418 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6419 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6421 class ast_expr_op_le(ast_expr_op):
6422     def __init__(self, *args, **keywords):
6423         if "ptr" in keywords:
6424             self.ctx = keywords["ctx"]
6425             self.ptr = keywords["ptr"]
6426             return
6427         raise Error
6428     def __del__(self):
6429         if hasattr(self, 'ptr'):
6430             isl.isl_ast_expr_free(self.ptr)
6431     def __new__(cls, *args, **keywords):
6432         return super(ast_expr_op_le, cls).__new__(cls)
6433     def __str__(arg0):
6434         try:
6435             if not arg0.__class__ is ast_expr_op_le:
6436                 arg0 = ast_expr_op_le(arg0)
6437         except:
6438             raise
6439         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6440         res = cast(ptr, c_char_p).value.decode('ascii')
6441         libc.free(ptr)
6442         return res
6443     def __repr__(self):
6444         s = str(self)
6445         if '"' in s:
6446             return 'isl.ast_expr_op_le("""%s""")' % s
6447         else:
6448             return 'isl.ast_expr_op_le("%s")' % s
6450 isl.isl_ast_expr_copy.restype = c_void_p
6451 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6452 isl.isl_ast_expr_free.restype = c_void_p
6453 isl.isl_ast_expr_free.argtypes = [c_void_p]
6454 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6455 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6457 class ast_expr_op_lt(ast_expr_op):
6458     def __init__(self, *args, **keywords):
6459         if "ptr" in keywords:
6460             self.ctx = keywords["ctx"]
6461             self.ptr = keywords["ptr"]
6462             return
6463         raise Error
6464     def __del__(self):
6465         if hasattr(self, 'ptr'):
6466             isl.isl_ast_expr_free(self.ptr)
6467     def __new__(cls, *args, **keywords):
6468         return super(ast_expr_op_lt, cls).__new__(cls)
6469     def __str__(arg0):
6470         try:
6471             if not arg0.__class__ is ast_expr_op_lt:
6472                 arg0 = ast_expr_op_lt(arg0)
6473         except:
6474             raise
6475         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6476         res = cast(ptr, c_char_p).value.decode('ascii')
6477         libc.free(ptr)
6478         return res
6479     def __repr__(self):
6480         s = str(self)
6481         if '"' in s:
6482             return 'isl.ast_expr_op_lt("""%s""")' % s
6483         else:
6484             return 'isl.ast_expr_op_lt("%s")' % s
6486 isl.isl_ast_expr_copy.restype = c_void_p
6487 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6488 isl.isl_ast_expr_free.restype = c_void_p
6489 isl.isl_ast_expr_free.argtypes = [c_void_p]
6490 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6491 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6493 class ast_expr_op_max(ast_expr_op):
6494     def __init__(self, *args, **keywords):
6495         if "ptr" in keywords:
6496             self.ctx = keywords["ctx"]
6497             self.ptr = keywords["ptr"]
6498             return
6499         raise Error
6500     def __del__(self):
6501         if hasattr(self, 'ptr'):
6502             isl.isl_ast_expr_free(self.ptr)
6503     def __new__(cls, *args, **keywords):
6504         return super(ast_expr_op_max, cls).__new__(cls)
6505     def __str__(arg0):
6506         try:
6507             if not arg0.__class__ is ast_expr_op_max:
6508                 arg0 = ast_expr_op_max(arg0)
6509         except:
6510             raise
6511         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6512         res = cast(ptr, c_char_p).value.decode('ascii')
6513         libc.free(ptr)
6514         return res
6515     def __repr__(self):
6516         s = str(self)
6517         if '"' in s:
6518             return 'isl.ast_expr_op_max("""%s""")' % s
6519         else:
6520             return 'isl.ast_expr_op_max("%s")' % s
6522 isl.isl_ast_expr_copy.restype = c_void_p
6523 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6524 isl.isl_ast_expr_free.restype = c_void_p
6525 isl.isl_ast_expr_free.argtypes = [c_void_p]
6526 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6527 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6529 class ast_expr_op_member(ast_expr_op):
6530     def __init__(self, *args, **keywords):
6531         if "ptr" in keywords:
6532             self.ctx = keywords["ctx"]
6533             self.ptr = keywords["ptr"]
6534             return
6535         raise Error
6536     def __del__(self):
6537         if hasattr(self, 'ptr'):
6538             isl.isl_ast_expr_free(self.ptr)
6539     def __new__(cls, *args, **keywords):
6540         return super(ast_expr_op_member, cls).__new__(cls)
6541     def __str__(arg0):
6542         try:
6543             if not arg0.__class__ is ast_expr_op_member:
6544                 arg0 = ast_expr_op_member(arg0)
6545         except:
6546             raise
6547         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6548         res = cast(ptr, c_char_p).value.decode('ascii')
6549         libc.free(ptr)
6550         return res
6551     def __repr__(self):
6552         s = str(self)
6553         if '"' in s:
6554             return 'isl.ast_expr_op_member("""%s""")' % s
6555         else:
6556             return 'isl.ast_expr_op_member("%s")' % s
6558 isl.isl_ast_expr_copy.restype = c_void_p
6559 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6560 isl.isl_ast_expr_free.restype = c_void_p
6561 isl.isl_ast_expr_free.argtypes = [c_void_p]
6562 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6563 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6565 class ast_expr_op_min(ast_expr_op):
6566     def __init__(self, *args, **keywords):
6567         if "ptr" in keywords:
6568             self.ctx = keywords["ctx"]
6569             self.ptr = keywords["ptr"]
6570             return
6571         raise Error
6572     def __del__(self):
6573         if hasattr(self, 'ptr'):
6574             isl.isl_ast_expr_free(self.ptr)
6575     def __new__(cls, *args, **keywords):
6576         return super(ast_expr_op_min, cls).__new__(cls)
6577     def __str__(arg0):
6578         try:
6579             if not arg0.__class__ is ast_expr_op_min:
6580                 arg0 = ast_expr_op_min(arg0)
6581         except:
6582             raise
6583         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6584         res = cast(ptr, c_char_p).value.decode('ascii')
6585         libc.free(ptr)
6586         return res
6587     def __repr__(self):
6588         s = str(self)
6589         if '"' in s:
6590             return 'isl.ast_expr_op_min("""%s""")' % s
6591         else:
6592             return 'isl.ast_expr_op_min("%s")' % s
6594 isl.isl_ast_expr_copy.restype = c_void_p
6595 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6596 isl.isl_ast_expr_free.restype = c_void_p
6597 isl.isl_ast_expr_free.argtypes = [c_void_p]
6598 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6599 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6601 class ast_expr_op_minus(ast_expr_op):
6602     def __init__(self, *args, **keywords):
6603         if "ptr" in keywords:
6604             self.ctx = keywords["ctx"]
6605             self.ptr = keywords["ptr"]
6606             return
6607         raise Error
6608     def __del__(self):
6609         if hasattr(self, 'ptr'):
6610             isl.isl_ast_expr_free(self.ptr)
6611     def __new__(cls, *args, **keywords):
6612         return super(ast_expr_op_minus, cls).__new__(cls)
6613     def __str__(arg0):
6614         try:
6615             if not arg0.__class__ is ast_expr_op_minus:
6616                 arg0 = ast_expr_op_minus(arg0)
6617         except:
6618             raise
6619         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6620         res = cast(ptr, c_char_p).value.decode('ascii')
6621         libc.free(ptr)
6622         return res
6623     def __repr__(self):
6624         s = str(self)
6625         if '"' in s:
6626             return 'isl.ast_expr_op_minus("""%s""")' % s
6627         else:
6628             return 'isl.ast_expr_op_minus("%s")' % s
6630 isl.isl_ast_expr_copy.restype = c_void_p
6631 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6632 isl.isl_ast_expr_free.restype = c_void_p
6633 isl.isl_ast_expr_free.argtypes = [c_void_p]
6634 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6635 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6637 class ast_expr_op_mul(ast_expr_op):
6638     def __init__(self, *args, **keywords):
6639         if "ptr" in keywords:
6640             self.ctx = keywords["ctx"]
6641             self.ptr = keywords["ptr"]
6642             return
6643         raise Error
6644     def __del__(self):
6645         if hasattr(self, 'ptr'):
6646             isl.isl_ast_expr_free(self.ptr)
6647     def __new__(cls, *args, **keywords):
6648         return super(ast_expr_op_mul, cls).__new__(cls)
6649     def __str__(arg0):
6650         try:
6651             if not arg0.__class__ is ast_expr_op_mul:
6652                 arg0 = ast_expr_op_mul(arg0)
6653         except:
6654             raise
6655         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6656         res = cast(ptr, c_char_p).value.decode('ascii')
6657         libc.free(ptr)
6658         return res
6659     def __repr__(self):
6660         s = str(self)
6661         if '"' in s:
6662             return 'isl.ast_expr_op_mul("""%s""")' % s
6663         else:
6664             return 'isl.ast_expr_op_mul("%s")' % s
6666 isl.isl_ast_expr_copy.restype = c_void_p
6667 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6668 isl.isl_ast_expr_free.restype = c_void_p
6669 isl.isl_ast_expr_free.argtypes = [c_void_p]
6670 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6671 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6673 class ast_expr_op_or(ast_expr_op):
6674     def __init__(self, *args, **keywords):
6675         if "ptr" in keywords:
6676             self.ctx = keywords["ctx"]
6677             self.ptr = keywords["ptr"]
6678             return
6679         raise Error
6680     def __del__(self):
6681         if hasattr(self, 'ptr'):
6682             isl.isl_ast_expr_free(self.ptr)
6683     def __new__(cls, *args, **keywords):
6684         return super(ast_expr_op_or, cls).__new__(cls)
6685     def __str__(arg0):
6686         try:
6687             if not arg0.__class__ is ast_expr_op_or:
6688                 arg0 = ast_expr_op_or(arg0)
6689         except:
6690             raise
6691         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6692         res = cast(ptr, c_char_p).value.decode('ascii')
6693         libc.free(ptr)
6694         return res
6695     def __repr__(self):
6696         s = str(self)
6697         if '"' in s:
6698             return 'isl.ast_expr_op_or("""%s""")' % s
6699         else:
6700             return 'isl.ast_expr_op_or("%s")' % s
6702 isl.isl_ast_expr_copy.restype = c_void_p
6703 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6704 isl.isl_ast_expr_free.restype = c_void_p
6705 isl.isl_ast_expr_free.argtypes = [c_void_p]
6706 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6707 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6709 class ast_expr_op_or_else(ast_expr_op):
6710     def __init__(self, *args, **keywords):
6711         if "ptr" in keywords:
6712             self.ctx = keywords["ctx"]
6713             self.ptr = keywords["ptr"]
6714             return
6715         raise Error
6716     def __del__(self):
6717         if hasattr(self, 'ptr'):
6718             isl.isl_ast_expr_free(self.ptr)
6719     def __new__(cls, *args, **keywords):
6720         return super(ast_expr_op_or_else, cls).__new__(cls)
6721     def __str__(arg0):
6722         try:
6723             if not arg0.__class__ is ast_expr_op_or_else:
6724                 arg0 = ast_expr_op_or_else(arg0)
6725         except:
6726             raise
6727         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6728         res = cast(ptr, c_char_p).value.decode('ascii')
6729         libc.free(ptr)
6730         return res
6731     def __repr__(self):
6732         s = str(self)
6733         if '"' in s:
6734             return 'isl.ast_expr_op_or_else("""%s""")' % s
6735         else:
6736             return 'isl.ast_expr_op_or_else("%s")' % s
6738 isl.isl_ast_expr_copy.restype = c_void_p
6739 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6740 isl.isl_ast_expr_free.restype = c_void_p
6741 isl.isl_ast_expr_free.argtypes = [c_void_p]
6742 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6743 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6745 class ast_expr_op_pdiv_q(ast_expr_op):
6746     def __init__(self, *args, **keywords):
6747         if "ptr" in keywords:
6748             self.ctx = keywords["ctx"]
6749             self.ptr = keywords["ptr"]
6750             return
6751         raise Error
6752     def __del__(self):
6753         if hasattr(self, 'ptr'):
6754             isl.isl_ast_expr_free(self.ptr)
6755     def __new__(cls, *args, **keywords):
6756         return super(ast_expr_op_pdiv_q, cls).__new__(cls)
6757     def __str__(arg0):
6758         try:
6759             if not arg0.__class__ is ast_expr_op_pdiv_q:
6760                 arg0 = ast_expr_op_pdiv_q(arg0)
6761         except:
6762             raise
6763         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6764         res = cast(ptr, c_char_p).value.decode('ascii')
6765         libc.free(ptr)
6766         return res
6767     def __repr__(self):
6768         s = str(self)
6769         if '"' in s:
6770             return 'isl.ast_expr_op_pdiv_q("""%s""")' % s
6771         else:
6772             return 'isl.ast_expr_op_pdiv_q("%s")' % s
6774 isl.isl_ast_expr_copy.restype = c_void_p
6775 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6776 isl.isl_ast_expr_free.restype = c_void_p
6777 isl.isl_ast_expr_free.argtypes = [c_void_p]
6778 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6779 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6781 class ast_expr_op_pdiv_r(ast_expr_op):
6782     def __init__(self, *args, **keywords):
6783         if "ptr" in keywords:
6784             self.ctx = keywords["ctx"]
6785             self.ptr = keywords["ptr"]
6786             return
6787         raise Error
6788     def __del__(self):
6789         if hasattr(self, 'ptr'):
6790             isl.isl_ast_expr_free(self.ptr)
6791     def __new__(cls, *args, **keywords):
6792         return super(ast_expr_op_pdiv_r, cls).__new__(cls)
6793     def __str__(arg0):
6794         try:
6795             if not arg0.__class__ is ast_expr_op_pdiv_r:
6796                 arg0 = ast_expr_op_pdiv_r(arg0)
6797         except:
6798             raise
6799         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6800         res = cast(ptr, c_char_p).value.decode('ascii')
6801         libc.free(ptr)
6802         return res
6803     def __repr__(self):
6804         s = str(self)
6805         if '"' in s:
6806             return 'isl.ast_expr_op_pdiv_r("""%s""")' % s
6807         else:
6808             return 'isl.ast_expr_op_pdiv_r("%s")' % s
6810 isl.isl_ast_expr_copy.restype = c_void_p
6811 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6812 isl.isl_ast_expr_free.restype = c_void_p
6813 isl.isl_ast_expr_free.argtypes = [c_void_p]
6814 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6815 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6817 class ast_expr_op_select(ast_expr_op):
6818     def __init__(self, *args, **keywords):
6819         if "ptr" in keywords:
6820             self.ctx = keywords["ctx"]
6821             self.ptr = keywords["ptr"]
6822             return
6823         raise Error
6824     def __del__(self):
6825         if hasattr(self, 'ptr'):
6826             isl.isl_ast_expr_free(self.ptr)
6827     def __new__(cls, *args, **keywords):
6828         return super(ast_expr_op_select, cls).__new__(cls)
6829     def __str__(arg0):
6830         try:
6831             if not arg0.__class__ is ast_expr_op_select:
6832                 arg0 = ast_expr_op_select(arg0)
6833         except:
6834             raise
6835         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6836         res = cast(ptr, c_char_p).value.decode('ascii')
6837         libc.free(ptr)
6838         return res
6839     def __repr__(self):
6840         s = str(self)
6841         if '"' in s:
6842             return 'isl.ast_expr_op_select("""%s""")' % s
6843         else:
6844             return 'isl.ast_expr_op_select("%s")' % s
6846 isl.isl_ast_expr_copy.restype = c_void_p
6847 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6848 isl.isl_ast_expr_free.restype = c_void_p
6849 isl.isl_ast_expr_free.argtypes = [c_void_p]
6850 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6851 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6853 class ast_expr_op_sub(ast_expr_op):
6854     def __init__(self, *args, **keywords):
6855         if "ptr" in keywords:
6856             self.ctx = keywords["ctx"]
6857             self.ptr = keywords["ptr"]
6858             return
6859         raise Error
6860     def __del__(self):
6861         if hasattr(self, 'ptr'):
6862             isl.isl_ast_expr_free(self.ptr)
6863     def __new__(cls, *args, **keywords):
6864         return super(ast_expr_op_sub, cls).__new__(cls)
6865     def __str__(arg0):
6866         try:
6867             if not arg0.__class__ is ast_expr_op_sub:
6868                 arg0 = ast_expr_op_sub(arg0)
6869         except:
6870             raise
6871         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6872         res = cast(ptr, c_char_p).value.decode('ascii')
6873         libc.free(ptr)
6874         return res
6875     def __repr__(self):
6876         s = str(self)
6877         if '"' in s:
6878             return 'isl.ast_expr_op_sub("""%s""")' % s
6879         else:
6880             return 'isl.ast_expr_op_sub("%s")' % s
6882 isl.isl_ast_expr_copy.restype = c_void_p
6883 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6884 isl.isl_ast_expr_free.restype = c_void_p
6885 isl.isl_ast_expr_free.argtypes = [c_void_p]
6886 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6887 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6889 class ast_expr_op_zdiv_r(ast_expr_op):
6890     def __init__(self, *args, **keywords):
6891         if "ptr" in keywords:
6892             self.ctx = keywords["ctx"]
6893             self.ptr = keywords["ptr"]
6894             return
6895         raise Error
6896     def __del__(self):
6897         if hasattr(self, 'ptr'):
6898             isl.isl_ast_expr_free(self.ptr)
6899     def __new__(cls, *args, **keywords):
6900         return super(ast_expr_op_zdiv_r, cls).__new__(cls)
6901     def __str__(arg0):
6902         try:
6903             if not arg0.__class__ is ast_expr_op_zdiv_r:
6904                 arg0 = ast_expr_op_zdiv_r(arg0)
6905         except:
6906             raise
6907         ptr = isl.isl_ast_expr_to_str(arg0.ptr)
6908         res = cast(ptr, c_char_p).value.decode('ascii')
6909         libc.free(ptr)
6910         return res
6911     def __repr__(self):
6912         s = str(self)
6913         if '"' in s:
6914             return 'isl.ast_expr_op_zdiv_r("""%s""")' % s
6915         else:
6916             return 'isl.ast_expr_op_zdiv_r("%s")' % s
6918 isl.isl_ast_expr_copy.restype = c_void_p
6919 isl.isl_ast_expr_copy.argtypes = [c_void_p]
6920 isl.isl_ast_expr_free.restype = c_void_p
6921 isl.isl_ast_expr_free.argtypes = [c_void_p]
6922 isl.isl_ast_expr_to_str.restype = POINTER(c_char)
6923 isl.isl_ast_expr_to_str.argtypes = [c_void_p]
6925 class ast_node(object):
6926     def __init__(self, *args, **keywords):
6927         if "ptr" in keywords:
6928             self.ctx = keywords["ctx"]
6929             self.ptr = keywords["ptr"]
6930             return
6931         if len(args) == 1 and isinstance(args[0], ast_node_for):
6932             self.ctx = args[0].ctx
6933             self.ptr = isl.isl_ast_node_copy(args[0].ptr)
6934             return
6935         if len(args) == 1 and isinstance(args[0], ast_node_if):
6936             self.ctx = args[0].ctx
6937             self.ptr = isl.isl_ast_node_copy(args[0].ptr)
6938             return
6939         if len(args) == 1 and isinstance(args[0], ast_node_block):
6940             self.ctx = args[0].ctx
6941             self.ptr = isl.isl_ast_node_copy(args[0].ptr)
6942             return
6943         if len(args) == 1 and isinstance(args[0], ast_node_mark):
6944             self.ctx = args[0].ctx
6945             self.ptr = isl.isl_ast_node_copy(args[0].ptr)
6946             return
6947         if len(args) == 1 and isinstance(args[0], ast_node_user):
6948             self.ctx = args[0].ctx
6949             self.ptr = isl.isl_ast_node_copy(args[0].ptr)
6950             return
6951         raise Error
6952     def __del__(self):
6953         if hasattr(self, 'ptr'):
6954             isl.isl_ast_node_free(self.ptr)
6955     def __new__(cls, *args, **keywords):
6956         if "ptr" in keywords:
6957             type = isl.isl_ast_node_get_type(keywords["ptr"])
6958             if type == 1:
6959                 return ast_node_for(**keywords)
6960             if type == 2:
6961                 return ast_node_if(**keywords)
6962             if type == 3:
6963                 return ast_node_block(**keywords)
6964             if type == 4:
6965                 return ast_node_mark(**keywords)
6966             if type == 5:
6967                 return ast_node_user(**keywords)
6968             raise Error
6969         return super(ast_node, cls).__new__(cls)
6970     def __str__(arg0):
6971         try:
6972             if not arg0.__class__ is ast_node:
6973                 arg0 = ast_node(arg0)
6974         except:
6975             raise
6976         ptr = isl.isl_ast_node_to_str(arg0.ptr)
6977         res = cast(ptr, c_char_p).value.decode('ascii')
6978         libc.free(ptr)
6979         return res
6980     def __repr__(self):
6981         s = str(self)
6982         if '"' in s:
6983             return 'isl.ast_node("""%s""")' % s
6984         else:
6985             return 'isl.ast_node("%s")' % s
6986     def map_descendant_bottom_up(arg0, arg1):
6987         try:
6988             if not arg0.__class__ is ast_node:
6989                 arg0 = ast_node(arg0)
6990         except:
6991             raise
6992         exc_info = [None]
6993         fn = CFUNCTYPE(c_void_p, c_void_p, c_void_p)
6994         def cb_func(cb_arg0, cb_arg1):
6995             cb_arg0 = ast_node(ctx=arg0.ctx, ptr=(cb_arg0))
6996             try:
6997                 res = arg1(cb_arg0)
6998             except BaseException as e:
6999                 exc_info[0] = e
7000                 return None
7001             return isl.isl_ast_node_copy(res.ptr)
7002         cb1 = fn(cb_func)
7003         ctx = arg0.ctx
7004         res = isl.isl_ast_node_map_descendant_bottom_up(isl.isl_ast_node_copy(arg0.ptr), cb1, None)
7005         if exc_info[0] is not None:
7006             raise exc_info[0]
7007         obj = ast_node(ctx=ctx, ptr=res)
7008         return obj
7009     def to_C_str(arg0):
7010         try:
7011             if not arg0.__class__ is ast_node:
7012                 arg0 = ast_node(arg0)
7013         except:
7014             raise
7015         ctx = arg0.ctx
7016         res = isl.isl_ast_node_to_C_str(arg0.ptr)
7017         if res == 0:
7018             raise Error
7019         string = cast(res, c_char_p).value.decode('ascii')
7020         libc.free(res)
7021         return string
7022     def to_list(arg0):
7023         try:
7024             if not arg0.__class__ is ast_node:
7025                 arg0 = ast_node(arg0)
7026         except:
7027             raise
7028         ctx = arg0.ctx
7029         res = isl.isl_ast_node_to_list(isl.isl_ast_node_copy(arg0.ptr))
7030         obj = ast_node_list(ctx=ctx, ptr=res)
7031         return obj
7033 isl.isl_ast_node_map_descendant_bottom_up.restype = c_void_p
7034 isl.isl_ast_node_map_descendant_bottom_up.argtypes = [c_void_p, c_void_p, c_void_p]
7035 isl.isl_ast_node_to_C_str.restype = POINTER(c_char)
7036 isl.isl_ast_node_to_C_str.argtypes = [c_void_p]
7037 isl.isl_ast_node_to_list.restype = c_void_p
7038 isl.isl_ast_node_to_list.argtypes = [c_void_p]
7039 isl.isl_ast_node_copy.restype = c_void_p
7040 isl.isl_ast_node_copy.argtypes = [c_void_p]
7041 isl.isl_ast_node_free.restype = c_void_p
7042 isl.isl_ast_node_free.argtypes = [c_void_p]
7043 isl.isl_ast_node_to_str.restype = POINTER(c_char)
7044 isl.isl_ast_node_to_str.argtypes = [c_void_p]
7045 isl.isl_ast_node_get_type.argtypes = [c_void_p]
7047 class ast_node_block(ast_node):
7048     def __init__(self, *args, **keywords):
7049         if "ptr" in keywords:
7050             self.ctx = keywords["ctx"]
7051             self.ptr = keywords["ptr"]
7052             return
7053         if len(args) == 1 and args[0].__class__ is ast_node_list:
7054             self.ctx = Context.getDefaultInstance()
7055             self.ptr = isl.isl_ast_node_block_from_children(isl.isl_ast_node_list_copy(args[0].ptr))
7056             return
7057         raise Error
7058     def __del__(self):
7059         if hasattr(self, 'ptr'):
7060             isl.isl_ast_node_free(self.ptr)
7061     def __new__(cls, *args, **keywords):
7062         return super(ast_node_block, cls).__new__(cls)
7063     def __str__(arg0):
7064         try:
7065             if not arg0.__class__ is ast_node_block:
7066                 arg0 = ast_node_block(arg0)
7067         except:
7068             raise
7069         ptr = isl.isl_ast_node_to_str(arg0.ptr)
7070         res = cast(ptr, c_char_p).value.decode('ascii')
7071         libc.free(ptr)
7072         return res
7073     def __repr__(self):
7074         s = str(self)
7075         if '"' in s:
7076             return 'isl.ast_node_block("""%s""")' % s
7077         else:
7078             return 'isl.ast_node_block("%s")' % s
7079     def children(arg0):
7080         try:
7081             if not arg0.__class__ is ast_node:
7082                 arg0 = ast_node(arg0)
7083         except:
7084             raise
7085         ctx = arg0.ctx
7086         res = isl.isl_ast_node_block_get_children(arg0.ptr)
7087         obj = ast_node_list(ctx=ctx, ptr=res)
7088         return obj
7089     def get_children(arg0):
7090         return arg0.children()
7092 isl.isl_ast_node_block_from_children.restype = c_void_p
7093 isl.isl_ast_node_block_from_children.argtypes = [c_void_p]
7094 isl.isl_ast_node_block_get_children.restype = c_void_p
7095 isl.isl_ast_node_block_get_children.argtypes = [c_void_p]
7096 isl.isl_ast_node_copy.restype = c_void_p
7097 isl.isl_ast_node_copy.argtypes = [c_void_p]
7098 isl.isl_ast_node_free.restype = c_void_p
7099 isl.isl_ast_node_free.argtypes = [c_void_p]
7100 isl.isl_ast_node_to_str.restype = POINTER(c_char)
7101 isl.isl_ast_node_to_str.argtypes = [c_void_p]
7103 class ast_node_for(ast_node):
7104     def __init__(self, *args, **keywords):
7105         if "ptr" in keywords:
7106             self.ctx = keywords["ctx"]
7107             self.ptr = keywords["ptr"]
7108             return
7109         raise Error
7110     def __del__(self):
7111         if hasattr(self, 'ptr'):
7112             isl.isl_ast_node_free(self.ptr)
7113     def __new__(cls, *args, **keywords):
7114         return super(ast_node_for, cls).__new__(cls)
7115     def __str__(arg0):
7116         try:
7117             if not arg0.__class__ is ast_node_for:
7118                 arg0 = ast_node_for(arg0)
7119         except:
7120             raise
7121         ptr = isl.isl_ast_node_to_str(arg0.ptr)
7122         res = cast(ptr, c_char_p).value.decode('ascii')
7123         libc.free(ptr)
7124         return res
7125     def __repr__(self):
7126         s = str(self)
7127         if '"' in s:
7128             return 'isl.ast_node_for("""%s""")' % s
7129         else:
7130             return 'isl.ast_node_for("%s")' % s
7131     def body(arg0):
7132         try:
7133             if not arg0.__class__ is ast_node:
7134                 arg0 = ast_node(arg0)
7135         except:
7136             raise
7137         ctx = arg0.ctx
7138         res = isl.isl_ast_node_for_get_body(arg0.ptr)
7139         obj = ast_node(ctx=ctx, ptr=res)
7140         return obj
7141     def get_body(arg0):
7142         return arg0.body()
7143     def cond(arg0):
7144         try:
7145             if not arg0.__class__ is ast_node:
7146                 arg0 = ast_node(arg0)
7147         except:
7148             raise
7149         ctx = arg0.ctx
7150         res = isl.isl_ast_node_for_get_cond(arg0.ptr)
7151         obj = ast_expr(ctx=ctx, ptr=res)
7152         return obj
7153     def get_cond(arg0):
7154         return arg0.cond()
7155     def inc(arg0):
7156         try:
7157             if not arg0.__class__ is ast_node:
7158                 arg0 = ast_node(arg0)
7159         except:
7160             raise
7161         ctx = arg0.ctx
7162         res = isl.isl_ast_node_for_get_inc(arg0.ptr)
7163         obj = ast_expr(ctx=ctx, ptr=res)
7164         return obj
7165     def get_inc(arg0):
7166         return arg0.inc()
7167     def init(arg0):
7168         try:
7169             if not arg0.__class__ is ast_node:
7170                 arg0 = ast_node(arg0)
7171         except:
7172             raise
7173         ctx = arg0.ctx
7174         res = isl.isl_ast_node_for_get_init(arg0.ptr)
7175         obj = ast_expr(ctx=ctx, ptr=res)
7176         return obj
7177     def get_init(arg0):
7178         return arg0.init()
7179     def is_degenerate(arg0):
7180         try:
7181             if not arg0.__class__ is ast_node:
7182                 arg0 = ast_node(arg0)
7183         except:
7184             raise
7185         ctx = arg0.ctx
7186         res = isl.isl_ast_node_for_is_degenerate(arg0.ptr)
7187         if res < 0:
7188             raise Error
7189         return bool(res)
7190     def iterator(arg0):
7191         try:
7192             if not arg0.__class__ is ast_node:
7193                 arg0 = ast_node(arg0)
7194         except:
7195             raise
7196         ctx = arg0.ctx
7197         res = isl.isl_ast_node_for_get_iterator(arg0.ptr)
7198         obj = ast_expr(ctx=ctx, ptr=res)
7199         return obj
7200     def get_iterator(arg0):
7201         return arg0.iterator()
7203 isl.isl_ast_node_for_get_body.restype = c_void_p
7204 isl.isl_ast_node_for_get_body.argtypes = [c_void_p]
7205 isl.isl_ast_node_for_get_cond.restype = c_void_p
7206 isl.isl_ast_node_for_get_cond.argtypes = [c_void_p]
7207 isl.isl_ast_node_for_get_inc.restype = c_void_p
7208 isl.isl_ast_node_for_get_inc.argtypes = [c_void_p]
7209 isl.isl_ast_node_for_get_init.restype = c_void_p
7210 isl.isl_ast_node_for_get_init.argtypes = [c_void_p]
7211 isl.isl_ast_node_for_is_degenerate.argtypes = [c_void_p]
7212 isl.isl_ast_node_for_get_iterator.restype = c_void_p
7213 isl.isl_ast_node_for_get_iterator.argtypes = [c_void_p]
7214 isl.isl_ast_node_copy.restype = c_void_p
7215 isl.isl_ast_node_copy.argtypes = [c_void_p]
7216 isl.isl_ast_node_free.restype = c_void_p
7217 isl.isl_ast_node_free.argtypes = [c_void_p]
7218 isl.isl_ast_node_to_str.restype = POINTER(c_char)
7219 isl.isl_ast_node_to_str.argtypes = [c_void_p]
7221 class ast_node_if(ast_node):
7222     def __init__(self, *args, **keywords):
7223         if "ptr" in keywords:
7224             self.ctx = keywords["ctx"]
7225             self.ptr = keywords["ptr"]
7226             return
7227         raise Error
7228     def __del__(self):
7229         if hasattr(self, 'ptr'):
7230             isl.isl_ast_node_free(self.ptr)
7231     def __new__(cls, *args, **keywords):
7232         return super(ast_node_if, cls).__new__(cls)
7233     def __str__(arg0):
7234         try:
7235             if not arg0.__class__ is ast_node_if:
7236                 arg0 = ast_node_if(arg0)
7237         except:
7238             raise
7239         ptr = isl.isl_ast_node_to_str(arg0.ptr)
7240         res = cast(ptr, c_char_p).value.decode('ascii')
7241         libc.free(ptr)
7242         return res
7243     def __repr__(self):
7244         s = str(self)
7245         if '"' in s:
7246             return 'isl.ast_node_if("""%s""")' % s
7247         else:
7248             return 'isl.ast_node_if("%s")' % s
7249     def cond(arg0):
7250         try:
7251             if not arg0.__class__ is ast_node:
7252                 arg0 = ast_node(arg0)
7253         except:
7254             raise
7255         ctx = arg0.ctx
7256         res = isl.isl_ast_node_if_get_cond(arg0.ptr)
7257         obj = ast_expr(ctx=ctx, ptr=res)
7258         return obj
7259     def get_cond(arg0):
7260         return arg0.cond()
7261     def else_node(arg0):
7262         try:
7263             if not arg0.__class__ is ast_node:
7264                 arg0 = ast_node(arg0)
7265         except:
7266             raise
7267         ctx = arg0.ctx
7268         res = isl.isl_ast_node_if_get_else_node(arg0.ptr)
7269         obj = ast_node(ctx=ctx, ptr=res)
7270         return obj
7271     def get_else_node(arg0):
7272         return arg0.else_node()
7273     def has_else_node(arg0):
7274         try:
7275             if not arg0.__class__ is ast_node:
7276                 arg0 = ast_node(arg0)
7277         except:
7278             raise
7279         ctx = arg0.ctx
7280         res = isl.isl_ast_node_if_has_else_node(arg0.ptr)
7281         if res < 0:
7282             raise Error
7283         return bool(res)
7284     def then_node(arg0):
7285         try:
7286             if not arg0.__class__ is ast_node:
7287                 arg0 = ast_node(arg0)
7288         except:
7289             raise
7290         ctx = arg0.ctx
7291         res = isl.isl_ast_node_if_get_then_node(arg0.ptr)
7292         obj = ast_node(ctx=ctx, ptr=res)
7293         return obj
7294     def get_then_node(arg0):
7295         return arg0.then_node()
7297 isl.isl_ast_node_if_get_cond.restype = c_void_p
7298 isl.isl_ast_node_if_get_cond.argtypes = [c_void_p]
7299 isl.isl_ast_node_if_get_else_node.restype = c_void_p
7300 isl.isl_ast_node_if_get_else_node.argtypes = [c_void_p]
7301 isl.isl_ast_node_if_has_else_node.argtypes = [c_void_p]
7302 isl.isl_ast_node_if_get_then_node.restype = c_void_p
7303 isl.isl_ast_node_if_get_then_node.argtypes = [c_void_p]
7304 isl.isl_ast_node_copy.restype = c_void_p
7305 isl.isl_ast_node_copy.argtypes = [c_void_p]
7306 isl.isl_ast_node_free.restype = c_void_p
7307 isl.isl_ast_node_free.argtypes = [c_void_p]
7308 isl.isl_ast_node_to_str.restype = POINTER(c_char)
7309 isl.isl_ast_node_to_str.argtypes = [c_void_p]
7311 class ast_node_list(object):
7312     def __init__(self, *args, **keywords):
7313         if "ptr" in keywords:
7314             self.ctx = keywords["ctx"]
7315             self.ptr = keywords["ptr"]
7316             return
7317         if len(args) == 1 and type(args[0]) == int:
7318             self.ctx = Context.getDefaultInstance()
7319             self.ptr = isl.isl_ast_node_list_alloc(self.ctx, args[0])
7320             return
7321         if len(args) == 1 and args[0].__class__ is ast_node:
7322             self.ctx = Context.getDefaultInstance()
7323             self.ptr = isl.isl_ast_node_list_from_ast_node(isl.isl_ast_node_copy(args[0].ptr))
7324             return
7325         raise Error
7326     def __del__(self):
7327         if hasattr(self, 'ptr'):
7328             isl.isl_ast_node_list_free(self.ptr)
7329     def __str__(arg0):
7330         try:
7331             if not arg0.__class__ is ast_node_list:
7332                 arg0 = ast_node_list(arg0)
7333         except:
7334             raise
7335         ptr = isl.isl_ast_node_list_to_str(arg0.ptr)
7336         res = cast(ptr, c_char_p).value.decode('ascii')
7337         libc.free(ptr)
7338         return res
7339     def __repr__(self):
7340         s = str(self)
7341         if '"' in s:
7342             return 'isl.ast_node_list("""%s""")' % s
7343         else:
7344             return 'isl.ast_node_list("%s")' % s
7345     def add(arg0, arg1):
7346         try:
7347             if not arg0.__class__ is ast_node_list:
7348                 arg0 = ast_node_list(arg0)
7349         except:
7350             raise
7351         try:
7352             if not arg1.__class__ is ast_node:
7353                 arg1 = ast_node(arg1)
7354         except:
7355             raise
7356         ctx = arg0.ctx
7357         res = isl.isl_ast_node_list_add(isl.isl_ast_node_list_copy(arg0.ptr), isl.isl_ast_node_copy(arg1.ptr))
7358         obj = ast_node_list(ctx=ctx, ptr=res)
7359         return obj
7360     def at(arg0, arg1):
7361         try:
7362             if not arg0.__class__ is ast_node_list:
7363                 arg0 = ast_node_list(arg0)
7364         except:
7365             raise
7366         ctx = arg0.ctx
7367         res = isl.isl_ast_node_list_get_at(arg0.ptr, arg1)
7368         obj = ast_node(ctx=ctx, ptr=res)
7369         return obj
7370     def get_at(arg0, arg1):
7371         return arg0.at(arg1)
7372     def clear(arg0):
7373         try:
7374             if not arg0.__class__ is ast_node_list:
7375                 arg0 = ast_node_list(arg0)
7376         except:
7377             raise
7378         ctx = arg0.ctx
7379         res = isl.isl_ast_node_list_clear(isl.isl_ast_node_list_copy(arg0.ptr))
7380         obj = ast_node_list(ctx=ctx, ptr=res)
7381         return obj
7382     def concat(arg0, arg1):
7383         try:
7384             if not arg0.__class__ is ast_node_list:
7385                 arg0 = ast_node_list(arg0)
7386         except:
7387             raise
7388         try:
7389             if not arg1.__class__ is ast_node_list:
7390                 arg1 = ast_node_list(arg1)
7391         except:
7392             raise
7393         ctx = arg0.ctx
7394         res = isl.isl_ast_node_list_concat(isl.isl_ast_node_list_copy(arg0.ptr), isl.isl_ast_node_list_copy(arg1.ptr))
7395         obj = ast_node_list(ctx=ctx, ptr=res)
7396         return obj
7397     def drop(arg0, arg1, arg2):
7398         try:
7399             if not arg0.__class__ is ast_node_list:
7400                 arg0 = ast_node_list(arg0)
7401         except:
7402             raise
7403         ctx = arg0.ctx
7404         res = isl.isl_ast_node_list_drop(isl.isl_ast_node_list_copy(arg0.ptr), arg1, arg2)
7405         obj = ast_node_list(ctx=ctx, ptr=res)
7406         return obj
7407     def foreach(arg0, arg1):
7408         try:
7409             if not arg0.__class__ is ast_node_list:
7410                 arg0 = ast_node_list(arg0)
7411         except:
7412             raise
7413         exc_info = [None]
7414         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
7415         def cb_func(cb_arg0, cb_arg1):
7416             cb_arg0 = ast_node(ctx=arg0.ctx, ptr=(cb_arg0))
7417             try:
7418                 arg1(cb_arg0)
7419             except BaseException as e:
7420                 exc_info[0] = e
7421                 return -1
7422             return 0
7423         cb1 = fn(cb_func)
7424         ctx = arg0.ctx
7425         res = isl.isl_ast_node_list_foreach(arg0.ptr, cb1, None)
7426         if exc_info[0] is not None:
7427             raise exc_info[0]
7428         if res < 0:
7429             raise Error
7430     def foreach_scc(arg0, arg1, arg2):
7431         try:
7432             if not arg0.__class__ is ast_node_list:
7433                 arg0 = ast_node_list(arg0)
7434         except:
7435             raise
7436         exc_info = [None]
7437         fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
7438         def cb_func(cb_arg0, cb_arg1, cb_arg2):
7439             cb_arg0 = ast_node(ctx=arg0.ctx, ptr=isl.isl_ast_node_copy(cb_arg0))
7440             cb_arg1 = ast_node(ctx=arg0.ctx, ptr=isl.isl_ast_node_copy(cb_arg1))
7441             try:
7442                 res = arg1(cb_arg0, cb_arg1)
7443             except BaseException as e:
7444                 exc_info[0] = e
7445                 return -1
7446             return 1 if res else 0
7447         cb1 = fn(cb_func)
7448         exc_info = [None]
7449         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
7450         def cb_func(cb_arg0, cb_arg1):
7451             cb_arg0 = ast_node_list(ctx=arg0.ctx, ptr=(cb_arg0))
7452             try:
7453                 arg2(cb_arg0)
7454             except BaseException as e:
7455                 exc_info[0] = e
7456                 return -1
7457             return 0
7458         cb2 = fn(cb_func)
7459         ctx = arg0.ctx
7460         res = isl.isl_ast_node_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
7461         if exc_info[0] is not None:
7462             raise exc_info[0]
7463         if res < 0:
7464             raise Error
7465     def insert(arg0, arg1, arg2):
7466         try:
7467             if not arg0.__class__ is ast_node_list:
7468                 arg0 = ast_node_list(arg0)
7469         except:
7470             raise
7471         try:
7472             if not arg2.__class__ is ast_node:
7473                 arg2 = ast_node(arg2)
7474         except:
7475             raise
7476         ctx = arg0.ctx
7477         res = isl.isl_ast_node_list_insert(isl.isl_ast_node_list_copy(arg0.ptr), arg1, isl.isl_ast_node_copy(arg2.ptr))
7478         obj = ast_node_list(ctx=ctx, ptr=res)
7479         return obj
7480     def set_at(arg0, arg1, arg2):
7481         try:
7482             if not arg0.__class__ is ast_node_list:
7483                 arg0 = ast_node_list(arg0)
7484         except:
7485             raise
7486         try:
7487             if not arg2.__class__ is ast_node:
7488                 arg2 = ast_node(arg2)
7489         except:
7490             raise
7491         ctx = arg0.ctx
7492         res = isl.isl_ast_node_list_set_at(isl.isl_ast_node_list_copy(arg0.ptr), arg1, isl.isl_ast_node_copy(arg2.ptr))
7493         obj = ast_node_list(ctx=ctx, ptr=res)
7494         return obj
7495     def size(arg0):
7496         try:
7497             if not arg0.__class__ is ast_node_list:
7498                 arg0 = ast_node_list(arg0)
7499         except:
7500             raise
7501         ctx = arg0.ctx
7502         res = isl.isl_ast_node_list_size(arg0.ptr)
7503         if res < 0:
7504             raise Error
7505         return int(res)
7507 isl.isl_ast_node_list_alloc.restype = c_void_p
7508 isl.isl_ast_node_list_alloc.argtypes = [Context, c_int]
7509 isl.isl_ast_node_list_from_ast_node.restype = c_void_p
7510 isl.isl_ast_node_list_from_ast_node.argtypes = [c_void_p]
7511 isl.isl_ast_node_list_add.restype = c_void_p
7512 isl.isl_ast_node_list_add.argtypes = [c_void_p, c_void_p]
7513 isl.isl_ast_node_list_get_at.restype = c_void_p
7514 isl.isl_ast_node_list_get_at.argtypes = [c_void_p, c_int]
7515 isl.isl_ast_node_list_clear.restype = c_void_p
7516 isl.isl_ast_node_list_clear.argtypes = [c_void_p]
7517 isl.isl_ast_node_list_concat.restype = c_void_p
7518 isl.isl_ast_node_list_concat.argtypes = [c_void_p, c_void_p]
7519 isl.isl_ast_node_list_drop.restype = c_void_p
7520 isl.isl_ast_node_list_drop.argtypes = [c_void_p, c_int, c_int]
7521 isl.isl_ast_node_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
7522 isl.isl_ast_node_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
7523 isl.isl_ast_node_list_insert.restype = c_void_p
7524 isl.isl_ast_node_list_insert.argtypes = [c_void_p, c_int, c_void_p]
7525 isl.isl_ast_node_list_set_at.restype = c_void_p
7526 isl.isl_ast_node_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
7527 isl.isl_ast_node_list_size.argtypes = [c_void_p]
7528 isl.isl_ast_node_list_copy.restype = c_void_p
7529 isl.isl_ast_node_list_copy.argtypes = [c_void_p]
7530 isl.isl_ast_node_list_free.restype = c_void_p
7531 isl.isl_ast_node_list_free.argtypes = [c_void_p]
7532 isl.isl_ast_node_list_to_str.restype = POINTER(c_char)
7533 isl.isl_ast_node_list_to_str.argtypes = [c_void_p]
7535 class ast_node_mark(ast_node):
7536     def __init__(self, *args, **keywords):
7537         if "ptr" in keywords:
7538             self.ctx = keywords["ctx"]
7539             self.ptr = keywords["ptr"]
7540             return
7541         raise Error
7542     def __del__(self):
7543         if hasattr(self, 'ptr'):
7544             isl.isl_ast_node_free(self.ptr)
7545     def __new__(cls, *args, **keywords):
7546         return super(ast_node_mark, cls).__new__(cls)
7547     def __str__(arg0):
7548         try:
7549             if not arg0.__class__ is ast_node_mark:
7550                 arg0 = ast_node_mark(arg0)
7551         except:
7552             raise
7553         ptr = isl.isl_ast_node_to_str(arg0.ptr)
7554         res = cast(ptr, c_char_p).value.decode('ascii')
7555         libc.free(ptr)
7556         return res
7557     def __repr__(self):
7558         s = str(self)
7559         if '"' in s:
7560             return 'isl.ast_node_mark("""%s""")' % s
7561         else:
7562             return 'isl.ast_node_mark("%s")' % s
7563     def id(arg0):
7564         try:
7565             if not arg0.__class__ is ast_node:
7566                 arg0 = ast_node(arg0)
7567         except:
7568             raise
7569         ctx = arg0.ctx
7570         res = isl.isl_ast_node_mark_get_id(arg0.ptr)
7571         obj = id(ctx=ctx, ptr=res)
7572         return obj
7573     def get_id(arg0):
7574         return arg0.id()
7575     def node(arg0):
7576         try:
7577             if not arg0.__class__ is ast_node:
7578                 arg0 = ast_node(arg0)
7579         except:
7580             raise
7581         ctx = arg0.ctx
7582         res = isl.isl_ast_node_mark_get_node(arg0.ptr)
7583         obj = ast_node(ctx=ctx, ptr=res)
7584         return obj
7585     def get_node(arg0):
7586         return arg0.node()
7588 isl.isl_ast_node_mark_get_id.restype = c_void_p
7589 isl.isl_ast_node_mark_get_id.argtypes = [c_void_p]
7590 isl.isl_ast_node_mark_get_node.restype = c_void_p
7591 isl.isl_ast_node_mark_get_node.argtypes = [c_void_p]
7592 isl.isl_ast_node_copy.restype = c_void_p
7593 isl.isl_ast_node_copy.argtypes = [c_void_p]
7594 isl.isl_ast_node_free.restype = c_void_p
7595 isl.isl_ast_node_free.argtypes = [c_void_p]
7596 isl.isl_ast_node_to_str.restype = POINTER(c_char)
7597 isl.isl_ast_node_to_str.argtypes = [c_void_p]
7599 class ast_node_user(ast_node):
7600     def __init__(self, *args, **keywords):
7601         if "ptr" in keywords:
7602             self.ctx = keywords["ctx"]
7603             self.ptr = keywords["ptr"]
7604             return
7605         if len(args) == 1 and args[0].__class__ is ast_expr:
7606             self.ctx = Context.getDefaultInstance()
7607             self.ptr = isl.isl_ast_node_user_from_expr(isl.isl_ast_expr_copy(args[0].ptr))
7608             return
7609         raise Error
7610     def __del__(self):
7611         if hasattr(self, 'ptr'):
7612             isl.isl_ast_node_free(self.ptr)
7613     def __new__(cls, *args, **keywords):
7614         return super(ast_node_user, cls).__new__(cls)
7615     def __str__(arg0):
7616         try:
7617             if not arg0.__class__ is ast_node_user:
7618                 arg0 = ast_node_user(arg0)
7619         except:
7620             raise
7621         ptr = isl.isl_ast_node_to_str(arg0.ptr)
7622         res = cast(ptr, c_char_p).value.decode('ascii')
7623         libc.free(ptr)
7624         return res
7625     def __repr__(self):
7626         s = str(self)
7627         if '"' in s:
7628             return 'isl.ast_node_user("""%s""")' % s
7629         else:
7630             return 'isl.ast_node_user("%s")' % s
7631     def expr(arg0):
7632         try:
7633             if not arg0.__class__ is ast_node:
7634                 arg0 = ast_node(arg0)
7635         except:
7636             raise
7637         ctx = arg0.ctx
7638         res = isl.isl_ast_node_user_get_expr(arg0.ptr)
7639         obj = ast_expr(ctx=ctx, ptr=res)
7640         return obj
7641     def get_expr(arg0):
7642         return arg0.expr()
7644 isl.isl_ast_node_user_from_expr.restype = c_void_p
7645 isl.isl_ast_node_user_from_expr.argtypes = [c_void_p]
7646 isl.isl_ast_node_user_get_expr.restype = c_void_p
7647 isl.isl_ast_node_user_get_expr.argtypes = [c_void_p]
7648 isl.isl_ast_node_copy.restype = c_void_p
7649 isl.isl_ast_node_copy.argtypes = [c_void_p]
7650 isl.isl_ast_node_free.restype = c_void_p
7651 isl.isl_ast_node_free.argtypes = [c_void_p]
7652 isl.isl_ast_node_to_str.restype = POINTER(c_char)
7653 isl.isl_ast_node_to_str.argtypes = [c_void_p]
7655 class union_map(object):
7656     def __init__(self, *args, **keywords):
7657         if "ptr" in keywords:
7658             self.ctx = keywords["ctx"]
7659             self.ptr = keywords["ptr"]
7660             return
7661         if len(args) == 1 and args[0].__class__ is basic_map:
7662             self.ctx = Context.getDefaultInstance()
7663             self.ptr = isl.isl_union_map_from_basic_map(isl.isl_basic_map_copy(args[0].ptr))
7664             return
7665         if len(args) == 1 and args[0].__class__ is map:
7666             self.ctx = Context.getDefaultInstance()
7667             self.ptr = isl.isl_union_map_from_map(isl.isl_map_copy(args[0].ptr))
7668             return
7669         if len(args) == 1 and type(args[0]) == str:
7670             self.ctx = Context.getDefaultInstance()
7671             self.ptr = isl.isl_union_map_read_from_str(self.ctx, args[0].encode('ascii'))
7672             return
7673         raise Error
7674     def __del__(self):
7675         if hasattr(self, 'ptr'):
7676             isl.isl_union_map_free(self.ptr)
7677     def __str__(arg0):
7678         try:
7679             if not arg0.__class__ is union_map:
7680                 arg0 = union_map(arg0)
7681         except:
7682             raise
7683         ptr = isl.isl_union_map_to_str(arg0.ptr)
7684         res = cast(ptr, c_char_p).value.decode('ascii')
7685         libc.free(ptr)
7686         return res
7687     def __repr__(self):
7688         s = str(self)
7689         if '"' in s:
7690             return 'isl.union_map("""%s""")' % s
7691         else:
7692             return 'isl.union_map("%s")' % s
7693     def affine_hull(arg0):
7694         try:
7695             if not arg0.__class__ is union_map:
7696                 arg0 = union_map(arg0)
7697         except:
7698             raise
7699         ctx = arg0.ctx
7700         res = isl.isl_union_map_affine_hull(isl.isl_union_map_copy(arg0.ptr))
7701         obj = union_map(ctx=ctx, ptr=res)
7702         return obj
7703     def apply_domain(arg0, arg1):
7704         try:
7705             if not arg0.__class__ is union_map:
7706                 arg0 = union_map(arg0)
7707         except:
7708             raise
7709         try:
7710             if not arg1.__class__ is union_map:
7711                 arg1 = union_map(arg1)
7712         except:
7713             raise
7714         ctx = arg0.ctx
7715         res = isl.isl_union_map_apply_domain(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
7716         obj = union_map(ctx=ctx, ptr=res)
7717         return obj
7718     def apply_range(arg0, arg1):
7719         try:
7720             if not arg0.__class__ is union_map:
7721                 arg0 = union_map(arg0)
7722         except:
7723             raise
7724         try:
7725             if not arg1.__class__ is union_map:
7726                 arg1 = union_map(arg1)
7727         except:
7728             raise
7729         ctx = arg0.ctx
7730         res = isl.isl_union_map_apply_range(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
7731         obj = union_map(ctx=ctx, ptr=res)
7732         return obj
7733     def as_map(arg0):
7734         try:
7735             if not arg0.__class__ is union_map:
7736                 arg0 = union_map(arg0)
7737         except:
7738             raise
7739         ctx = arg0.ctx
7740         res = isl.isl_union_map_as_map(isl.isl_union_map_copy(arg0.ptr))
7741         obj = map(ctx=ctx, ptr=res)
7742         return obj
7743     def as_multi_union_pw_aff(arg0):
7744         try:
7745             if not arg0.__class__ is union_map:
7746                 arg0 = union_map(arg0)
7747         except:
7748             raise
7749         ctx = arg0.ctx
7750         res = isl.isl_union_map_as_multi_union_pw_aff(isl.isl_union_map_copy(arg0.ptr))
7751         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
7752         return obj
7753     def as_union_pw_multi_aff(arg0):
7754         try:
7755             if not arg0.__class__ is union_map:
7756                 arg0 = union_map(arg0)
7757         except:
7758             raise
7759         ctx = arg0.ctx
7760         res = isl.isl_union_map_as_union_pw_multi_aff(isl.isl_union_map_copy(arg0.ptr))
7761         obj = union_pw_multi_aff(ctx=ctx, ptr=res)
7762         return obj
7763     def bind_range(arg0, arg1):
7764         try:
7765             if not arg0.__class__ is union_map:
7766                 arg0 = union_map(arg0)
7767         except:
7768             raise
7769         try:
7770             if not arg1.__class__ is multi_id:
7771                 arg1 = multi_id(arg1)
7772         except:
7773             raise
7774         ctx = arg0.ctx
7775         res = isl.isl_union_map_bind_range(isl.isl_union_map_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
7776         obj = union_set(ctx=ctx, ptr=res)
7777         return obj
7778     def coalesce(arg0):
7779         try:
7780             if not arg0.__class__ is union_map:
7781                 arg0 = union_map(arg0)
7782         except:
7783             raise
7784         ctx = arg0.ctx
7785         res = isl.isl_union_map_coalesce(isl.isl_union_map_copy(arg0.ptr))
7786         obj = union_map(ctx=ctx, ptr=res)
7787         return obj
7788     def compute_divs(arg0):
7789         try:
7790             if not arg0.__class__ is union_map:
7791                 arg0 = union_map(arg0)
7792         except:
7793             raise
7794         ctx = arg0.ctx
7795         res = isl.isl_union_map_compute_divs(isl.isl_union_map_copy(arg0.ptr))
7796         obj = union_map(ctx=ctx, ptr=res)
7797         return obj
7798     def curry(arg0):
7799         try:
7800             if not arg0.__class__ is union_map:
7801                 arg0 = union_map(arg0)
7802         except:
7803             raise
7804         ctx = arg0.ctx
7805         res = isl.isl_union_map_curry(isl.isl_union_map_copy(arg0.ptr))
7806         obj = union_map(ctx=ctx, ptr=res)
7807         return obj
7808     def deltas(arg0):
7809         try:
7810             if not arg0.__class__ is union_map:
7811                 arg0 = union_map(arg0)
7812         except:
7813             raise
7814         ctx = arg0.ctx
7815         res = isl.isl_union_map_deltas(isl.isl_union_map_copy(arg0.ptr))
7816         obj = union_set(ctx=ctx, ptr=res)
7817         return obj
7818     def detect_equalities(arg0):
7819         try:
7820             if not arg0.__class__ is union_map:
7821                 arg0 = union_map(arg0)
7822         except:
7823             raise
7824         ctx = arg0.ctx
7825         res = isl.isl_union_map_detect_equalities(isl.isl_union_map_copy(arg0.ptr))
7826         obj = union_map(ctx=ctx, ptr=res)
7827         return obj
7828     def domain(arg0):
7829         try:
7830             if not arg0.__class__ is union_map:
7831                 arg0 = union_map(arg0)
7832         except:
7833             raise
7834         ctx = arg0.ctx
7835         res = isl.isl_union_map_domain(isl.isl_union_map_copy(arg0.ptr))
7836         obj = union_set(ctx=ctx, ptr=res)
7837         return obj
7838     def domain_factor_domain(arg0):
7839         try:
7840             if not arg0.__class__ is union_map:
7841                 arg0 = union_map(arg0)
7842         except:
7843             raise
7844         ctx = arg0.ctx
7845         res = isl.isl_union_map_domain_factor_domain(isl.isl_union_map_copy(arg0.ptr))
7846         obj = union_map(ctx=ctx, ptr=res)
7847         return obj
7848     def domain_factor_range(arg0):
7849         try:
7850             if not arg0.__class__ is union_map:
7851                 arg0 = union_map(arg0)
7852         except:
7853             raise
7854         ctx = arg0.ctx
7855         res = isl.isl_union_map_domain_factor_range(isl.isl_union_map_copy(arg0.ptr))
7856         obj = union_map(ctx=ctx, ptr=res)
7857         return obj
7858     def domain_map(arg0):
7859         try:
7860             if not arg0.__class__ is union_map:
7861                 arg0 = union_map(arg0)
7862         except:
7863             raise
7864         ctx = arg0.ctx
7865         res = isl.isl_union_map_domain_map(isl.isl_union_map_copy(arg0.ptr))
7866         obj = union_map(ctx=ctx, ptr=res)
7867         return obj
7868     def domain_map_union_pw_multi_aff(arg0):
7869         try:
7870             if not arg0.__class__ is union_map:
7871                 arg0 = union_map(arg0)
7872         except:
7873             raise
7874         ctx = arg0.ctx
7875         res = isl.isl_union_map_domain_map_union_pw_multi_aff(isl.isl_union_map_copy(arg0.ptr))
7876         obj = union_pw_multi_aff(ctx=ctx, ptr=res)
7877         return obj
7878     def domain_product(arg0, arg1):
7879         try:
7880             if not arg0.__class__ is union_map:
7881                 arg0 = union_map(arg0)
7882         except:
7883             raise
7884         try:
7885             if not arg1.__class__ is union_map:
7886                 arg1 = union_map(arg1)
7887         except:
7888             raise
7889         ctx = arg0.ctx
7890         res = isl.isl_union_map_domain_product(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
7891         obj = union_map(ctx=ctx, ptr=res)
7892         return obj
7893     def domain_reverse(arg0):
7894         try:
7895             if not arg0.__class__ is union_map:
7896                 arg0 = union_map(arg0)
7897         except:
7898             raise
7899         ctx = arg0.ctx
7900         res = isl.isl_union_map_domain_reverse(isl.isl_union_map_copy(arg0.ptr))
7901         obj = union_map(ctx=ctx, ptr=res)
7902         return obj
7903     def drop_unused_params(arg0):
7904         try:
7905             if not arg0.__class__ is union_map:
7906                 arg0 = union_map(arg0)
7907         except:
7908             raise
7909         ctx = arg0.ctx
7910         res = isl.isl_union_map_drop_unused_params(isl.isl_union_map_copy(arg0.ptr))
7911         obj = union_map(ctx=ctx, ptr=res)
7912         return obj
7913     @staticmethod
7914     def empty(*args):
7915         if len(args) == 0:
7916             ctx = Context.getDefaultInstance()
7917             res = isl.isl_union_map_empty_ctx(ctx)
7918             obj = union_map(ctx=ctx, ptr=res)
7919             return obj
7920         raise Error
7921     def eq_at(*args):
7922         if len(args) == 2 and args[1].__class__ is multi_union_pw_aff:
7923             args = list(args)
7924             try:
7925                 if not args[0].__class__ is union_map:
7926                     args[0] = union_map(args[0])
7927             except:
7928                 raise
7929             ctx = args[0].ctx
7930             res = isl.isl_union_map_eq_at_multi_union_pw_aff(isl.isl_union_map_copy(args[0].ptr), isl.isl_multi_union_pw_aff_copy(args[1].ptr))
7931             obj = union_map(ctx=ctx, ptr=res)
7932             return obj
7933         raise Error
7934     def every_map(arg0, arg1):
7935         try:
7936             if not arg0.__class__ is union_map:
7937                 arg0 = union_map(arg0)
7938         except:
7939             raise
7940         exc_info = [None]
7941         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
7942         def cb_func(cb_arg0, cb_arg1):
7943             cb_arg0 = map(ctx=arg0.ctx, ptr=isl.isl_map_copy(cb_arg0))
7944             try:
7945                 res = arg1(cb_arg0)
7946             except BaseException as e:
7947                 exc_info[0] = e
7948                 return -1
7949             return 1 if res else 0
7950         cb1 = fn(cb_func)
7951         ctx = arg0.ctx
7952         res = isl.isl_union_map_every_map(arg0.ptr, cb1, None)
7953         if exc_info[0] is not None:
7954             raise exc_info[0]
7955         if res < 0:
7956             raise Error
7957         return bool(res)
7958     def extract_map(arg0, arg1):
7959         try:
7960             if not arg0.__class__ is union_map:
7961                 arg0 = union_map(arg0)
7962         except:
7963             raise
7964         try:
7965             if not arg1.__class__ is space:
7966                 arg1 = space(arg1)
7967         except:
7968             raise
7969         ctx = arg0.ctx
7970         res = isl.isl_union_map_extract_map(arg0.ptr, isl.isl_space_copy(arg1.ptr))
7971         obj = map(ctx=ctx, ptr=res)
7972         return obj
7973     def factor_domain(arg0):
7974         try:
7975             if not arg0.__class__ is union_map:
7976                 arg0 = union_map(arg0)
7977         except:
7978             raise
7979         ctx = arg0.ctx
7980         res = isl.isl_union_map_factor_domain(isl.isl_union_map_copy(arg0.ptr))
7981         obj = union_map(ctx=ctx, ptr=res)
7982         return obj
7983     def factor_range(arg0):
7984         try:
7985             if not arg0.__class__ is union_map:
7986                 arg0 = union_map(arg0)
7987         except:
7988             raise
7989         ctx = arg0.ctx
7990         res = isl.isl_union_map_factor_range(isl.isl_union_map_copy(arg0.ptr))
7991         obj = union_map(ctx=ctx, ptr=res)
7992         return obj
7993     def fixed_power(*args):
7994         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
7995             args = list(args)
7996             try:
7997                 if not args[0].__class__ is union_map:
7998                     args[0] = union_map(args[0])
7999             except:
8000                 raise
8001             try:
8002                 if not args[1].__class__ is val:
8003                     args[1] = val(args[1])
8004             except:
8005                 raise
8006             ctx = args[0].ctx
8007             res = isl.isl_union_map_fixed_power_val(isl.isl_union_map_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
8008             obj = union_map(ctx=ctx, ptr=res)
8009             return obj
8010         raise Error
8011     def foreach_map(arg0, arg1):
8012         try:
8013             if not arg0.__class__ is union_map:
8014                 arg0 = union_map(arg0)
8015         except:
8016             raise
8017         exc_info = [None]
8018         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
8019         def cb_func(cb_arg0, cb_arg1):
8020             cb_arg0 = map(ctx=arg0.ctx, ptr=(cb_arg0))
8021             try:
8022                 arg1(cb_arg0)
8023             except BaseException as e:
8024                 exc_info[0] = e
8025                 return -1
8026             return 0
8027         cb1 = fn(cb_func)
8028         ctx = arg0.ctx
8029         res = isl.isl_union_map_foreach_map(arg0.ptr, cb1, None)
8030         if exc_info[0] is not None:
8031             raise exc_info[0]
8032         if res < 0:
8033             raise Error
8034     @staticmethod
8035     def convert_from(*args):
8036         if len(args) == 1 and args[0].__class__ is multi_union_pw_aff:
8037             ctx = args[0].ctx
8038             res = isl.isl_union_map_from_multi_union_pw_aff(isl.isl_multi_union_pw_aff_copy(args[0].ptr))
8039             obj = union_map(ctx=ctx, ptr=res)
8040             return obj
8041         if len(args) == 1 and args[0].__class__ is union_pw_multi_aff:
8042             ctx = args[0].ctx
8043             res = isl.isl_union_map_from_union_pw_multi_aff(isl.isl_union_pw_multi_aff_copy(args[0].ptr))
8044             obj = union_map(ctx=ctx, ptr=res)
8045             return obj
8046         raise Error
8047     @staticmethod
8048     def from_domain(arg0):
8049         try:
8050             if not arg0.__class__ is union_set:
8051                 arg0 = union_set(arg0)
8052         except:
8053             raise
8054         ctx = arg0.ctx
8055         res = isl.isl_union_map_from_domain(isl.isl_union_set_copy(arg0.ptr))
8056         obj = union_map(ctx=ctx, ptr=res)
8057         return obj
8058     @staticmethod
8059     def from_domain_and_range(arg0, arg1):
8060         try:
8061             if not arg0.__class__ is union_set:
8062                 arg0 = union_set(arg0)
8063         except:
8064             raise
8065         try:
8066             if not arg1.__class__ is union_set:
8067                 arg1 = union_set(arg1)
8068         except:
8069             raise
8070         ctx = arg0.ctx
8071         res = isl.isl_union_map_from_domain_and_range(isl.isl_union_set_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
8072         obj = union_map(ctx=ctx, ptr=res)
8073         return obj
8074     @staticmethod
8075     def from_range(arg0):
8076         try:
8077             if not arg0.__class__ is union_set:
8078                 arg0 = union_set(arg0)
8079         except:
8080             raise
8081         ctx = arg0.ctx
8082         res = isl.isl_union_map_from_range(isl.isl_union_set_copy(arg0.ptr))
8083         obj = union_map(ctx=ctx, ptr=res)
8084         return obj
8085     def gist(arg0, arg1):
8086         try:
8087             if not arg0.__class__ is union_map:
8088                 arg0 = union_map(arg0)
8089         except:
8090             raise
8091         try:
8092             if not arg1.__class__ is union_map:
8093                 arg1 = union_map(arg1)
8094         except:
8095             raise
8096         ctx = arg0.ctx
8097         res = isl.isl_union_map_gist(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8098         obj = union_map(ctx=ctx, ptr=res)
8099         return obj
8100     def gist_domain(arg0, arg1):
8101         try:
8102             if not arg0.__class__ is union_map:
8103                 arg0 = union_map(arg0)
8104         except:
8105             raise
8106         try:
8107             if not arg1.__class__ is union_set:
8108                 arg1 = union_set(arg1)
8109         except:
8110             raise
8111         ctx = arg0.ctx
8112         res = isl.isl_union_map_gist_domain(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
8113         obj = union_map(ctx=ctx, ptr=res)
8114         return obj
8115     def gist_params(arg0, arg1):
8116         try:
8117             if not arg0.__class__ is union_map:
8118                 arg0 = union_map(arg0)
8119         except:
8120             raise
8121         try:
8122             if not arg1.__class__ is set:
8123                 arg1 = set(arg1)
8124         except:
8125             raise
8126         ctx = arg0.ctx
8127         res = isl.isl_union_map_gist_params(isl.isl_union_map_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
8128         obj = union_map(ctx=ctx, ptr=res)
8129         return obj
8130     def gist_range(arg0, arg1):
8131         try:
8132             if not arg0.__class__ is union_map:
8133                 arg0 = union_map(arg0)
8134         except:
8135             raise
8136         try:
8137             if not arg1.__class__ is union_set:
8138                 arg1 = union_set(arg1)
8139         except:
8140             raise
8141         ctx = arg0.ctx
8142         res = isl.isl_union_map_gist_range(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
8143         obj = union_map(ctx=ctx, ptr=res)
8144         return obj
8145     def intersect(arg0, arg1):
8146         try:
8147             if not arg0.__class__ is union_map:
8148                 arg0 = union_map(arg0)
8149         except:
8150             raise
8151         try:
8152             if not arg1.__class__ is union_map:
8153                 arg1 = union_map(arg1)
8154         except:
8155             raise
8156         ctx = arg0.ctx
8157         res = isl.isl_union_map_intersect(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8158         obj = union_map(ctx=ctx, ptr=res)
8159         return obj
8160     def intersect_domain(*args):
8161         if len(args) == 2 and args[1].__class__ is space:
8162             args = list(args)
8163             try:
8164                 if not args[0].__class__ is union_map:
8165                     args[0] = union_map(args[0])
8166             except:
8167                 raise
8168             ctx = args[0].ctx
8169             res = isl.isl_union_map_intersect_domain_space(isl.isl_union_map_copy(args[0].ptr), isl.isl_space_copy(args[1].ptr))
8170             obj = union_map(ctx=ctx, ptr=res)
8171             return obj
8172         if len(args) == 2 and args[1].__class__ is union_set:
8173             args = list(args)
8174             try:
8175                 if not args[0].__class__ is union_map:
8176                     args[0] = union_map(args[0])
8177             except:
8178                 raise
8179             ctx = args[0].ctx
8180             res = isl.isl_union_map_intersect_domain_union_set(isl.isl_union_map_copy(args[0].ptr), isl.isl_union_set_copy(args[1].ptr))
8181             obj = union_map(ctx=ctx, ptr=res)
8182             return obj
8183         raise Error
8184     def intersect_domain_factor_domain(arg0, arg1):
8185         try:
8186             if not arg0.__class__ is union_map:
8187                 arg0 = union_map(arg0)
8188         except:
8189             raise
8190         try:
8191             if not arg1.__class__ is union_map:
8192                 arg1 = union_map(arg1)
8193         except:
8194             raise
8195         ctx = arg0.ctx
8196         res = isl.isl_union_map_intersect_domain_factor_domain(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8197         obj = union_map(ctx=ctx, ptr=res)
8198         return obj
8199     def intersect_domain_factor_range(arg0, arg1):
8200         try:
8201             if not arg0.__class__ is union_map:
8202                 arg0 = union_map(arg0)
8203         except:
8204             raise
8205         try:
8206             if not arg1.__class__ is union_map:
8207                 arg1 = union_map(arg1)
8208         except:
8209             raise
8210         ctx = arg0.ctx
8211         res = isl.isl_union_map_intersect_domain_factor_range(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8212         obj = union_map(ctx=ctx, ptr=res)
8213         return obj
8214     def intersect_domain_wrapped_domain(*args):
8215         if len(args) == 2 and args[1].__class__ is union_set:
8216             args = list(args)
8217             try:
8218                 if not args[0].__class__ is union_map:
8219                     args[0] = union_map(args[0])
8220             except:
8221                 raise
8222             ctx = args[0].ctx
8223             res = isl.isl_union_map_intersect_domain_wrapped_domain_union_set(isl.isl_union_map_copy(args[0].ptr), isl.isl_union_set_copy(args[1].ptr))
8224             obj = union_map(ctx=ctx, ptr=res)
8225             return obj
8226         raise Error
8227     def intersect_params(arg0, arg1):
8228         try:
8229             if not arg0.__class__ is union_map:
8230                 arg0 = union_map(arg0)
8231         except:
8232             raise
8233         try:
8234             if not arg1.__class__ is set:
8235                 arg1 = set(arg1)
8236         except:
8237             raise
8238         ctx = arg0.ctx
8239         res = isl.isl_union_map_intersect_params(isl.isl_union_map_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
8240         obj = union_map(ctx=ctx, ptr=res)
8241         return obj
8242     def intersect_range(*args):
8243         if len(args) == 2 and args[1].__class__ is space:
8244             args = list(args)
8245             try:
8246                 if not args[0].__class__ is union_map:
8247                     args[0] = union_map(args[0])
8248             except:
8249                 raise
8250             ctx = args[0].ctx
8251             res = isl.isl_union_map_intersect_range_space(isl.isl_union_map_copy(args[0].ptr), isl.isl_space_copy(args[1].ptr))
8252             obj = union_map(ctx=ctx, ptr=res)
8253             return obj
8254         if len(args) == 2 and args[1].__class__ is union_set:
8255             args = list(args)
8256             try:
8257                 if not args[0].__class__ is union_map:
8258                     args[0] = union_map(args[0])
8259             except:
8260                 raise
8261             ctx = args[0].ctx
8262             res = isl.isl_union_map_intersect_range_union_set(isl.isl_union_map_copy(args[0].ptr), isl.isl_union_set_copy(args[1].ptr))
8263             obj = union_map(ctx=ctx, ptr=res)
8264             return obj
8265         raise Error
8266     def intersect_range_factor_domain(arg0, arg1):
8267         try:
8268             if not arg0.__class__ is union_map:
8269                 arg0 = union_map(arg0)
8270         except:
8271             raise
8272         try:
8273             if not arg1.__class__ is union_map:
8274                 arg1 = union_map(arg1)
8275         except:
8276             raise
8277         ctx = arg0.ctx
8278         res = isl.isl_union_map_intersect_range_factor_domain(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8279         obj = union_map(ctx=ctx, ptr=res)
8280         return obj
8281     def intersect_range_factor_range(arg0, arg1):
8282         try:
8283             if not arg0.__class__ is union_map:
8284                 arg0 = union_map(arg0)
8285         except:
8286             raise
8287         try:
8288             if not arg1.__class__ is union_map:
8289                 arg1 = union_map(arg1)
8290         except:
8291             raise
8292         ctx = arg0.ctx
8293         res = isl.isl_union_map_intersect_range_factor_range(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8294         obj = union_map(ctx=ctx, ptr=res)
8295         return obj
8296     def intersect_range_wrapped_domain(*args):
8297         if len(args) == 2 and args[1].__class__ is union_set:
8298             args = list(args)
8299             try:
8300                 if not args[0].__class__ is union_map:
8301                     args[0] = union_map(args[0])
8302             except:
8303                 raise
8304             ctx = args[0].ctx
8305             res = isl.isl_union_map_intersect_range_wrapped_domain_union_set(isl.isl_union_map_copy(args[0].ptr), isl.isl_union_set_copy(args[1].ptr))
8306             obj = union_map(ctx=ctx, ptr=res)
8307             return obj
8308         raise Error
8309     def is_bijective(arg0):
8310         try:
8311             if not arg0.__class__ is union_map:
8312                 arg0 = union_map(arg0)
8313         except:
8314             raise
8315         ctx = arg0.ctx
8316         res = isl.isl_union_map_is_bijective(arg0.ptr)
8317         if res < 0:
8318             raise Error
8319         return bool(res)
8320     def is_disjoint(arg0, arg1):
8321         try:
8322             if not arg0.__class__ is union_map:
8323                 arg0 = union_map(arg0)
8324         except:
8325             raise
8326         try:
8327             if not arg1.__class__ is union_map:
8328                 arg1 = union_map(arg1)
8329         except:
8330             raise
8331         ctx = arg0.ctx
8332         res = isl.isl_union_map_is_disjoint(arg0.ptr, arg1.ptr)
8333         if res < 0:
8334             raise Error
8335         return bool(res)
8336     def is_empty(arg0):
8337         try:
8338             if not arg0.__class__ is union_map:
8339                 arg0 = union_map(arg0)
8340         except:
8341             raise
8342         ctx = arg0.ctx
8343         res = isl.isl_union_map_is_empty(arg0.ptr)
8344         if res < 0:
8345             raise Error
8346         return bool(res)
8347     def is_equal(arg0, arg1):
8348         try:
8349             if not arg0.__class__ is union_map:
8350                 arg0 = union_map(arg0)
8351         except:
8352             raise
8353         try:
8354             if not arg1.__class__ is union_map:
8355                 arg1 = union_map(arg1)
8356         except:
8357             raise
8358         ctx = arg0.ctx
8359         res = isl.isl_union_map_is_equal(arg0.ptr, arg1.ptr)
8360         if res < 0:
8361             raise Error
8362         return bool(res)
8363     def is_injective(arg0):
8364         try:
8365             if not arg0.__class__ is union_map:
8366                 arg0 = union_map(arg0)
8367         except:
8368             raise
8369         ctx = arg0.ctx
8370         res = isl.isl_union_map_is_injective(arg0.ptr)
8371         if res < 0:
8372             raise Error
8373         return bool(res)
8374     def is_single_valued(arg0):
8375         try:
8376             if not arg0.__class__ is union_map:
8377                 arg0 = union_map(arg0)
8378         except:
8379             raise
8380         ctx = arg0.ctx
8381         res = isl.isl_union_map_is_single_valued(arg0.ptr)
8382         if res < 0:
8383             raise Error
8384         return bool(res)
8385     def is_strict_subset(arg0, arg1):
8386         try:
8387             if not arg0.__class__ is union_map:
8388                 arg0 = union_map(arg0)
8389         except:
8390             raise
8391         try:
8392             if not arg1.__class__ is union_map:
8393                 arg1 = union_map(arg1)
8394         except:
8395             raise
8396         ctx = arg0.ctx
8397         res = isl.isl_union_map_is_strict_subset(arg0.ptr, arg1.ptr)
8398         if res < 0:
8399             raise Error
8400         return bool(res)
8401     def is_subset(arg0, arg1):
8402         try:
8403             if not arg0.__class__ is union_map:
8404                 arg0 = union_map(arg0)
8405         except:
8406             raise
8407         try:
8408             if not arg1.__class__ is union_map:
8409                 arg1 = union_map(arg1)
8410         except:
8411             raise
8412         ctx = arg0.ctx
8413         res = isl.isl_union_map_is_subset(arg0.ptr, arg1.ptr)
8414         if res < 0:
8415             raise Error
8416         return bool(res)
8417     def isa_map(arg0):
8418         try:
8419             if not arg0.__class__ is union_map:
8420                 arg0 = union_map(arg0)
8421         except:
8422             raise
8423         ctx = arg0.ctx
8424         res = isl.isl_union_map_isa_map(arg0.ptr)
8425         if res < 0:
8426             raise Error
8427         return bool(res)
8428     def lexmax(arg0):
8429         try:
8430             if not arg0.__class__ is union_map:
8431                 arg0 = union_map(arg0)
8432         except:
8433             raise
8434         ctx = arg0.ctx
8435         res = isl.isl_union_map_lexmax(isl.isl_union_map_copy(arg0.ptr))
8436         obj = union_map(ctx=ctx, ptr=res)
8437         return obj
8438     def lexmin(arg0):
8439         try:
8440             if not arg0.__class__ is union_map:
8441                 arg0 = union_map(arg0)
8442         except:
8443             raise
8444         ctx = arg0.ctx
8445         res = isl.isl_union_map_lexmin(isl.isl_union_map_copy(arg0.ptr))
8446         obj = union_map(ctx=ctx, ptr=res)
8447         return obj
8448     def map_list(arg0):
8449         try:
8450             if not arg0.__class__ is union_map:
8451                 arg0 = union_map(arg0)
8452         except:
8453             raise
8454         ctx = arg0.ctx
8455         res = isl.isl_union_map_get_map_list(arg0.ptr)
8456         obj = map_list(ctx=ctx, ptr=res)
8457         return obj
8458     def get_map_list(arg0):
8459         return arg0.map_list()
8460     def params(arg0):
8461         try:
8462             if not arg0.__class__ is union_map:
8463                 arg0 = union_map(arg0)
8464         except:
8465             raise
8466         ctx = arg0.ctx
8467         res = isl.isl_union_map_params(isl.isl_union_map_copy(arg0.ptr))
8468         obj = set(ctx=ctx, ptr=res)
8469         return obj
8470     def polyhedral_hull(arg0):
8471         try:
8472             if not arg0.__class__ is union_map:
8473                 arg0 = union_map(arg0)
8474         except:
8475             raise
8476         ctx = arg0.ctx
8477         res = isl.isl_union_map_polyhedral_hull(isl.isl_union_map_copy(arg0.ptr))
8478         obj = union_map(ctx=ctx, ptr=res)
8479         return obj
8480     def preimage_domain(*args):
8481         if len(args) == 2 and args[1].__class__ is multi_aff:
8482             args = list(args)
8483             try:
8484                 if not args[0].__class__ is union_map:
8485                     args[0] = union_map(args[0])
8486             except:
8487                 raise
8488             ctx = args[0].ctx
8489             res = isl.isl_union_map_preimage_domain_multi_aff(isl.isl_union_map_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
8490             obj = union_map(ctx=ctx, ptr=res)
8491             return obj
8492         if len(args) == 2 and args[1].__class__ is multi_pw_aff:
8493             args = list(args)
8494             try:
8495                 if not args[0].__class__ is union_map:
8496                     args[0] = union_map(args[0])
8497             except:
8498                 raise
8499             ctx = args[0].ctx
8500             res = isl.isl_union_map_preimage_domain_multi_pw_aff(isl.isl_union_map_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
8501             obj = union_map(ctx=ctx, ptr=res)
8502             return obj
8503         if len(args) == 2 and args[1].__class__ is pw_multi_aff:
8504             args = list(args)
8505             try:
8506                 if not args[0].__class__ is union_map:
8507                     args[0] = union_map(args[0])
8508             except:
8509                 raise
8510             ctx = args[0].ctx
8511             res = isl.isl_union_map_preimage_domain_pw_multi_aff(isl.isl_union_map_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
8512             obj = union_map(ctx=ctx, ptr=res)
8513             return obj
8514         if len(args) == 2 and args[1].__class__ is union_pw_multi_aff:
8515             args = list(args)
8516             try:
8517                 if not args[0].__class__ is union_map:
8518                     args[0] = union_map(args[0])
8519             except:
8520                 raise
8521             ctx = args[0].ctx
8522             res = isl.isl_union_map_preimage_domain_union_pw_multi_aff(isl.isl_union_map_copy(args[0].ptr), isl.isl_union_pw_multi_aff_copy(args[1].ptr))
8523             obj = union_map(ctx=ctx, ptr=res)
8524             return obj
8525         raise Error
8526     def preimage_range(*args):
8527         if len(args) == 2 and args[1].__class__ is multi_aff:
8528             args = list(args)
8529             try:
8530                 if not args[0].__class__ is union_map:
8531                     args[0] = union_map(args[0])
8532             except:
8533                 raise
8534             ctx = args[0].ctx
8535             res = isl.isl_union_map_preimage_range_multi_aff(isl.isl_union_map_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
8536             obj = union_map(ctx=ctx, ptr=res)
8537             return obj
8538         if len(args) == 2 and args[1].__class__ is pw_multi_aff:
8539             args = list(args)
8540             try:
8541                 if not args[0].__class__ is union_map:
8542                     args[0] = union_map(args[0])
8543             except:
8544                 raise
8545             ctx = args[0].ctx
8546             res = isl.isl_union_map_preimage_range_pw_multi_aff(isl.isl_union_map_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
8547             obj = union_map(ctx=ctx, ptr=res)
8548             return obj
8549         if len(args) == 2 and args[1].__class__ is union_pw_multi_aff:
8550             args = list(args)
8551             try:
8552                 if not args[0].__class__ is union_map:
8553                     args[0] = union_map(args[0])
8554             except:
8555                 raise
8556             ctx = args[0].ctx
8557             res = isl.isl_union_map_preimage_range_union_pw_multi_aff(isl.isl_union_map_copy(args[0].ptr), isl.isl_union_pw_multi_aff_copy(args[1].ptr))
8558             obj = union_map(ctx=ctx, ptr=res)
8559             return obj
8560         raise Error
8561     def product(arg0, arg1):
8562         try:
8563             if not arg0.__class__ is union_map:
8564                 arg0 = union_map(arg0)
8565         except:
8566             raise
8567         try:
8568             if not arg1.__class__ is union_map:
8569                 arg1 = union_map(arg1)
8570         except:
8571             raise
8572         ctx = arg0.ctx
8573         res = isl.isl_union_map_product(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8574         obj = union_map(ctx=ctx, ptr=res)
8575         return obj
8576     def project_out_all_params(arg0):
8577         try:
8578             if not arg0.__class__ is union_map:
8579                 arg0 = union_map(arg0)
8580         except:
8581             raise
8582         ctx = arg0.ctx
8583         res = isl.isl_union_map_project_out_all_params(isl.isl_union_map_copy(arg0.ptr))
8584         obj = union_map(ctx=ctx, ptr=res)
8585         return obj
8586     def project_out_param(*args):
8587         if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
8588             args = list(args)
8589             try:
8590                 if not args[0].__class__ is union_map:
8591                     args[0] = union_map(args[0])
8592             except:
8593                 raise
8594             try:
8595                 if not args[1].__class__ is id:
8596                     args[1] = id(args[1])
8597             except:
8598                 raise
8599             ctx = args[0].ctx
8600             res = isl.isl_union_map_project_out_param_id(isl.isl_union_map_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
8601             obj = union_map(ctx=ctx, ptr=res)
8602             return obj
8603         if len(args) == 2 and args[1].__class__ is id_list:
8604             args = list(args)
8605             try:
8606                 if not args[0].__class__ is union_map:
8607                     args[0] = union_map(args[0])
8608             except:
8609                 raise
8610             ctx = args[0].ctx
8611             res = isl.isl_union_map_project_out_param_id_list(isl.isl_union_map_copy(args[0].ptr), isl.isl_id_list_copy(args[1].ptr))
8612             obj = union_map(ctx=ctx, ptr=res)
8613             return obj
8614         raise Error
8615     def range(arg0):
8616         try:
8617             if not arg0.__class__ is union_map:
8618                 arg0 = union_map(arg0)
8619         except:
8620             raise
8621         ctx = arg0.ctx
8622         res = isl.isl_union_map_range(isl.isl_union_map_copy(arg0.ptr))
8623         obj = union_set(ctx=ctx, ptr=res)
8624         return obj
8625     def range_factor_domain(arg0):
8626         try:
8627             if not arg0.__class__ is union_map:
8628                 arg0 = union_map(arg0)
8629         except:
8630             raise
8631         ctx = arg0.ctx
8632         res = isl.isl_union_map_range_factor_domain(isl.isl_union_map_copy(arg0.ptr))
8633         obj = union_map(ctx=ctx, ptr=res)
8634         return obj
8635     def range_factor_range(arg0):
8636         try:
8637             if not arg0.__class__ is union_map:
8638                 arg0 = union_map(arg0)
8639         except:
8640             raise
8641         ctx = arg0.ctx
8642         res = isl.isl_union_map_range_factor_range(isl.isl_union_map_copy(arg0.ptr))
8643         obj = union_map(ctx=ctx, ptr=res)
8644         return obj
8645     def range_map(arg0):
8646         try:
8647             if not arg0.__class__ is union_map:
8648                 arg0 = union_map(arg0)
8649         except:
8650             raise
8651         ctx = arg0.ctx
8652         res = isl.isl_union_map_range_map(isl.isl_union_map_copy(arg0.ptr))
8653         obj = union_map(ctx=ctx, ptr=res)
8654         return obj
8655     def range_product(arg0, arg1):
8656         try:
8657             if not arg0.__class__ is union_map:
8658                 arg0 = union_map(arg0)
8659         except:
8660             raise
8661         try:
8662             if not arg1.__class__ is union_map:
8663                 arg1 = union_map(arg1)
8664         except:
8665             raise
8666         ctx = arg0.ctx
8667         res = isl.isl_union_map_range_product(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8668         obj = union_map(ctx=ctx, ptr=res)
8669         return obj
8670     def range_reverse(arg0):
8671         try:
8672             if not arg0.__class__ is union_map:
8673                 arg0 = union_map(arg0)
8674         except:
8675             raise
8676         ctx = arg0.ctx
8677         res = isl.isl_union_map_range_reverse(isl.isl_union_map_copy(arg0.ptr))
8678         obj = union_map(ctx=ctx, ptr=res)
8679         return obj
8680     def reverse(arg0):
8681         try:
8682             if not arg0.__class__ is union_map:
8683                 arg0 = union_map(arg0)
8684         except:
8685             raise
8686         ctx = arg0.ctx
8687         res = isl.isl_union_map_reverse(isl.isl_union_map_copy(arg0.ptr))
8688         obj = union_map(ctx=ctx, ptr=res)
8689         return obj
8690     def space(arg0):
8691         try:
8692             if not arg0.__class__ is union_map:
8693                 arg0 = union_map(arg0)
8694         except:
8695             raise
8696         ctx = arg0.ctx
8697         res = isl.isl_union_map_get_space(arg0.ptr)
8698         obj = space(ctx=ctx, ptr=res)
8699         return obj
8700     def get_space(arg0):
8701         return arg0.space()
8702     def subtract(arg0, arg1):
8703         try:
8704             if not arg0.__class__ is union_map:
8705                 arg0 = union_map(arg0)
8706         except:
8707             raise
8708         try:
8709             if not arg1.__class__ is union_map:
8710                 arg1 = union_map(arg1)
8711         except:
8712             raise
8713         ctx = arg0.ctx
8714         res = isl.isl_union_map_subtract(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8715         obj = union_map(ctx=ctx, ptr=res)
8716         return obj
8717     def subtract_domain(arg0, arg1):
8718         try:
8719             if not arg0.__class__ is union_map:
8720                 arg0 = union_map(arg0)
8721         except:
8722             raise
8723         try:
8724             if not arg1.__class__ is union_set:
8725                 arg1 = union_set(arg1)
8726         except:
8727             raise
8728         ctx = arg0.ctx
8729         res = isl.isl_union_map_subtract_domain(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
8730         obj = union_map(ctx=ctx, ptr=res)
8731         return obj
8732     def subtract_range(arg0, arg1):
8733         try:
8734             if not arg0.__class__ is union_map:
8735                 arg0 = union_map(arg0)
8736         except:
8737             raise
8738         try:
8739             if not arg1.__class__ is union_set:
8740                 arg1 = union_set(arg1)
8741         except:
8742             raise
8743         ctx = arg0.ctx
8744         res = isl.isl_union_map_subtract_range(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
8745         obj = union_map(ctx=ctx, ptr=res)
8746         return obj
8747     def uncurry(arg0):
8748         try:
8749             if not arg0.__class__ is union_map:
8750                 arg0 = union_map(arg0)
8751         except:
8752             raise
8753         ctx = arg0.ctx
8754         res = isl.isl_union_map_uncurry(isl.isl_union_map_copy(arg0.ptr))
8755         obj = union_map(ctx=ctx, ptr=res)
8756         return obj
8757     def union(arg0, arg1):
8758         try:
8759             if not arg0.__class__ is union_map:
8760                 arg0 = union_map(arg0)
8761         except:
8762             raise
8763         try:
8764             if not arg1.__class__ is union_map:
8765                 arg1 = union_map(arg1)
8766         except:
8767             raise
8768         ctx = arg0.ctx
8769         res = isl.isl_union_map_union(isl.isl_union_map_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
8770         obj = union_map(ctx=ctx, ptr=res)
8771         return obj
8772     def universe(arg0):
8773         try:
8774             if not arg0.__class__ is union_map:
8775                 arg0 = union_map(arg0)
8776         except:
8777             raise
8778         ctx = arg0.ctx
8779         res = isl.isl_union_map_universe(isl.isl_union_map_copy(arg0.ptr))
8780         obj = union_map(ctx=ctx, ptr=res)
8781         return obj
8782     def wrap(arg0):
8783         try:
8784             if not arg0.__class__ is union_map:
8785                 arg0 = union_map(arg0)
8786         except:
8787             raise
8788         ctx = arg0.ctx
8789         res = isl.isl_union_map_wrap(isl.isl_union_map_copy(arg0.ptr))
8790         obj = union_set(ctx=ctx, ptr=res)
8791         return obj
8792     def zip(arg0):
8793         try:
8794             if not arg0.__class__ is union_map:
8795                 arg0 = union_map(arg0)
8796         except:
8797             raise
8798         ctx = arg0.ctx
8799         res = isl.isl_union_map_zip(isl.isl_union_map_copy(arg0.ptr))
8800         obj = union_map(ctx=ctx, ptr=res)
8801         return obj
8803 isl.isl_union_map_from_basic_map.restype = c_void_p
8804 isl.isl_union_map_from_basic_map.argtypes = [c_void_p]
8805 isl.isl_union_map_from_map.restype = c_void_p
8806 isl.isl_union_map_from_map.argtypes = [c_void_p]
8807 isl.isl_union_map_read_from_str.restype = c_void_p
8808 isl.isl_union_map_read_from_str.argtypes = [Context, c_char_p]
8809 isl.isl_union_map_affine_hull.restype = c_void_p
8810 isl.isl_union_map_affine_hull.argtypes = [c_void_p]
8811 isl.isl_union_map_apply_domain.restype = c_void_p
8812 isl.isl_union_map_apply_domain.argtypes = [c_void_p, c_void_p]
8813 isl.isl_union_map_apply_range.restype = c_void_p
8814 isl.isl_union_map_apply_range.argtypes = [c_void_p, c_void_p]
8815 isl.isl_union_map_as_map.restype = c_void_p
8816 isl.isl_union_map_as_map.argtypes = [c_void_p]
8817 isl.isl_union_map_as_multi_union_pw_aff.restype = c_void_p
8818 isl.isl_union_map_as_multi_union_pw_aff.argtypes = [c_void_p]
8819 isl.isl_union_map_as_union_pw_multi_aff.restype = c_void_p
8820 isl.isl_union_map_as_union_pw_multi_aff.argtypes = [c_void_p]
8821 isl.isl_union_map_bind_range.restype = c_void_p
8822 isl.isl_union_map_bind_range.argtypes = [c_void_p, c_void_p]
8823 isl.isl_union_map_coalesce.restype = c_void_p
8824 isl.isl_union_map_coalesce.argtypes = [c_void_p]
8825 isl.isl_union_map_compute_divs.restype = c_void_p
8826 isl.isl_union_map_compute_divs.argtypes = [c_void_p]
8827 isl.isl_union_map_curry.restype = c_void_p
8828 isl.isl_union_map_curry.argtypes = [c_void_p]
8829 isl.isl_union_map_deltas.restype = c_void_p
8830 isl.isl_union_map_deltas.argtypes = [c_void_p]
8831 isl.isl_union_map_detect_equalities.restype = c_void_p
8832 isl.isl_union_map_detect_equalities.argtypes = [c_void_p]
8833 isl.isl_union_map_domain.restype = c_void_p
8834 isl.isl_union_map_domain.argtypes = [c_void_p]
8835 isl.isl_union_map_domain_factor_domain.restype = c_void_p
8836 isl.isl_union_map_domain_factor_domain.argtypes = [c_void_p]
8837 isl.isl_union_map_domain_factor_range.restype = c_void_p
8838 isl.isl_union_map_domain_factor_range.argtypes = [c_void_p]
8839 isl.isl_union_map_domain_map.restype = c_void_p
8840 isl.isl_union_map_domain_map.argtypes = [c_void_p]
8841 isl.isl_union_map_domain_map_union_pw_multi_aff.restype = c_void_p
8842 isl.isl_union_map_domain_map_union_pw_multi_aff.argtypes = [c_void_p]
8843 isl.isl_union_map_domain_product.restype = c_void_p
8844 isl.isl_union_map_domain_product.argtypes = [c_void_p, c_void_p]
8845 isl.isl_union_map_domain_reverse.restype = c_void_p
8846 isl.isl_union_map_domain_reverse.argtypes = [c_void_p]
8847 isl.isl_union_map_drop_unused_params.restype = c_void_p
8848 isl.isl_union_map_drop_unused_params.argtypes = [c_void_p]
8849 isl.isl_union_map_empty_ctx.restype = c_void_p
8850 isl.isl_union_map_empty_ctx.argtypes = [Context]
8851 isl.isl_union_map_eq_at_multi_union_pw_aff.restype = c_void_p
8852 isl.isl_union_map_eq_at_multi_union_pw_aff.argtypes = [c_void_p, c_void_p]
8853 isl.isl_union_map_every_map.argtypes = [c_void_p, c_void_p, c_void_p]
8854 isl.isl_union_map_extract_map.restype = c_void_p
8855 isl.isl_union_map_extract_map.argtypes = [c_void_p, c_void_p]
8856 isl.isl_union_map_factor_domain.restype = c_void_p
8857 isl.isl_union_map_factor_domain.argtypes = [c_void_p]
8858 isl.isl_union_map_factor_range.restype = c_void_p
8859 isl.isl_union_map_factor_range.argtypes = [c_void_p]
8860 isl.isl_union_map_fixed_power_val.restype = c_void_p
8861 isl.isl_union_map_fixed_power_val.argtypes = [c_void_p, c_void_p]
8862 isl.isl_union_map_foreach_map.argtypes = [c_void_p, c_void_p, c_void_p]
8863 isl.isl_union_map_from_multi_union_pw_aff.restype = c_void_p
8864 isl.isl_union_map_from_multi_union_pw_aff.argtypes = [c_void_p]
8865 isl.isl_union_map_from_union_pw_multi_aff.restype = c_void_p
8866 isl.isl_union_map_from_union_pw_multi_aff.argtypes = [c_void_p]
8867 isl.isl_union_map_from_domain.restype = c_void_p
8868 isl.isl_union_map_from_domain.argtypes = [c_void_p]
8869 isl.isl_union_map_from_domain_and_range.restype = c_void_p
8870 isl.isl_union_map_from_domain_and_range.argtypes = [c_void_p, c_void_p]
8871 isl.isl_union_map_from_range.restype = c_void_p
8872 isl.isl_union_map_from_range.argtypes = [c_void_p]
8873 isl.isl_union_map_gist.restype = c_void_p
8874 isl.isl_union_map_gist.argtypes = [c_void_p, c_void_p]
8875 isl.isl_union_map_gist_domain.restype = c_void_p
8876 isl.isl_union_map_gist_domain.argtypes = [c_void_p, c_void_p]
8877 isl.isl_union_map_gist_params.restype = c_void_p
8878 isl.isl_union_map_gist_params.argtypes = [c_void_p, c_void_p]
8879 isl.isl_union_map_gist_range.restype = c_void_p
8880 isl.isl_union_map_gist_range.argtypes = [c_void_p, c_void_p]
8881 isl.isl_union_map_intersect.restype = c_void_p
8882 isl.isl_union_map_intersect.argtypes = [c_void_p, c_void_p]
8883 isl.isl_union_map_intersect_domain_space.restype = c_void_p
8884 isl.isl_union_map_intersect_domain_space.argtypes = [c_void_p, c_void_p]
8885 isl.isl_union_map_intersect_domain_union_set.restype = c_void_p
8886 isl.isl_union_map_intersect_domain_union_set.argtypes = [c_void_p, c_void_p]
8887 isl.isl_union_map_intersect_domain_factor_domain.restype = c_void_p
8888 isl.isl_union_map_intersect_domain_factor_domain.argtypes = [c_void_p, c_void_p]
8889 isl.isl_union_map_intersect_domain_factor_range.restype = c_void_p
8890 isl.isl_union_map_intersect_domain_factor_range.argtypes = [c_void_p, c_void_p]
8891 isl.isl_union_map_intersect_domain_wrapped_domain_union_set.restype = c_void_p
8892 isl.isl_union_map_intersect_domain_wrapped_domain_union_set.argtypes = [c_void_p, c_void_p]
8893 isl.isl_union_map_intersect_params.restype = c_void_p
8894 isl.isl_union_map_intersect_params.argtypes = [c_void_p, c_void_p]
8895 isl.isl_union_map_intersect_range_space.restype = c_void_p
8896 isl.isl_union_map_intersect_range_space.argtypes = [c_void_p, c_void_p]
8897 isl.isl_union_map_intersect_range_union_set.restype = c_void_p
8898 isl.isl_union_map_intersect_range_union_set.argtypes = [c_void_p, c_void_p]
8899 isl.isl_union_map_intersect_range_factor_domain.restype = c_void_p
8900 isl.isl_union_map_intersect_range_factor_domain.argtypes = [c_void_p, c_void_p]
8901 isl.isl_union_map_intersect_range_factor_range.restype = c_void_p
8902 isl.isl_union_map_intersect_range_factor_range.argtypes = [c_void_p, c_void_p]
8903 isl.isl_union_map_intersect_range_wrapped_domain_union_set.restype = c_void_p
8904 isl.isl_union_map_intersect_range_wrapped_domain_union_set.argtypes = [c_void_p, c_void_p]
8905 isl.isl_union_map_is_bijective.argtypes = [c_void_p]
8906 isl.isl_union_map_is_disjoint.argtypes = [c_void_p, c_void_p]
8907 isl.isl_union_map_is_empty.argtypes = [c_void_p]
8908 isl.isl_union_map_is_equal.argtypes = [c_void_p, c_void_p]
8909 isl.isl_union_map_is_injective.argtypes = [c_void_p]
8910 isl.isl_union_map_is_single_valued.argtypes = [c_void_p]
8911 isl.isl_union_map_is_strict_subset.argtypes = [c_void_p, c_void_p]
8912 isl.isl_union_map_is_subset.argtypes = [c_void_p, c_void_p]
8913 isl.isl_union_map_isa_map.argtypes = [c_void_p]
8914 isl.isl_union_map_lexmax.restype = c_void_p
8915 isl.isl_union_map_lexmax.argtypes = [c_void_p]
8916 isl.isl_union_map_lexmin.restype = c_void_p
8917 isl.isl_union_map_lexmin.argtypes = [c_void_p]
8918 isl.isl_union_map_get_map_list.restype = c_void_p
8919 isl.isl_union_map_get_map_list.argtypes = [c_void_p]
8920 isl.isl_union_map_params.restype = c_void_p
8921 isl.isl_union_map_params.argtypes = [c_void_p]
8922 isl.isl_union_map_polyhedral_hull.restype = c_void_p
8923 isl.isl_union_map_polyhedral_hull.argtypes = [c_void_p]
8924 isl.isl_union_map_preimage_domain_multi_aff.restype = c_void_p
8925 isl.isl_union_map_preimage_domain_multi_aff.argtypes = [c_void_p, c_void_p]
8926 isl.isl_union_map_preimage_domain_multi_pw_aff.restype = c_void_p
8927 isl.isl_union_map_preimage_domain_multi_pw_aff.argtypes = [c_void_p, c_void_p]
8928 isl.isl_union_map_preimage_domain_pw_multi_aff.restype = c_void_p
8929 isl.isl_union_map_preimage_domain_pw_multi_aff.argtypes = [c_void_p, c_void_p]
8930 isl.isl_union_map_preimage_domain_union_pw_multi_aff.restype = c_void_p
8931 isl.isl_union_map_preimage_domain_union_pw_multi_aff.argtypes = [c_void_p, c_void_p]
8932 isl.isl_union_map_preimage_range_multi_aff.restype = c_void_p
8933 isl.isl_union_map_preimage_range_multi_aff.argtypes = [c_void_p, c_void_p]
8934 isl.isl_union_map_preimage_range_pw_multi_aff.restype = c_void_p
8935 isl.isl_union_map_preimage_range_pw_multi_aff.argtypes = [c_void_p, c_void_p]
8936 isl.isl_union_map_preimage_range_union_pw_multi_aff.restype = c_void_p
8937 isl.isl_union_map_preimage_range_union_pw_multi_aff.argtypes = [c_void_p, c_void_p]
8938 isl.isl_union_map_product.restype = c_void_p
8939 isl.isl_union_map_product.argtypes = [c_void_p, c_void_p]
8940 isl.isl_union_map_project_out_all_params.restype = c_void_p
8941 isl.isl_union_map_project_out_all_params.argtypes = [c_void_p]
8942 isl.isl_union_map_project_out_param_id.restype = c_void_p
8943 isl.isl_union_map_project_out_param_id.argtypes = [c_void_p, c_void_p]
8944 isl.isl_union_map_project_out_param_id_list.restype = c_void_p
8945 isl.isl_union_map_project_out_param_id_list.argtypes = [c_void_p, c_void_p]
8946 isl.isl_union_map_range.restype = c_void_p
8947 isl.isl_union_map_range.argtypes = [c_void_p]
8948 isl.isl_union_map_range_factor_domain.restype = c_void_p
8949 isl.isl_union_map_range_factor_domain.argtypes = [c_void_p]
8950 isl.isl_union_map_range_factor_range.restype = c_void_p
8951 isl.isl_union_map_range_factor_range.argtypes = [c_void_p]
8952 isl.isl_union_map_range_map.restype = c_void_p
8953 isl.isl_union_map_range_map.argtypes = [c_void_p]
8954 isl.isl_union_map_range_product.restype = c_void_p
8955 isl.isl_union_map_range_product.argtypes = [c_void_p, c_void_p]
8956 isl.isl_union_map_range_reverse.restype = c_void_p
8957 isl.isl_union_map_range_reverse.argtypes = [c_void_p]
8958 isl.isl_union_map_reverse.restype = c_void_p
8959 isl.isl_union_map_reverse.argtypes = [c_void_p]
8960 isl.isl_union_map_get_space.restype = c_void_p
8961 isl.isl_union_map_get_space.argtypes = [c_void_p]
8962 isl.isl_union_map_subtract.restype = c_void_p
8963 isl.isl_union_map_subtract.argtypes = [c_void_p, c_void_p]
8964 isl.isl_union_map_subtract_domain.restype = c_void_p
8965 isl.isl_union_map_subtract_domain.argtypes = [c_void_p, c_void_p]
8966 isl.isl_union_map_subtract_range.restype = c_void_p
8967 isl.isl_union_map_subtract_range.argtypes = [c_void_p, c_void_p]
8968 isl.isl_union_map_uncurry.restype = c_void_p
8969 isl.isl_union_map_uncurry.argtypes = [c_void_p]
8970 isl.isl_union_map_union.restype = c_void_p
8971 isl.isl_union_map_union.argtypes = [c_void_p, c_void_p]
8972 isl.isl_union_map_universe.restype = c_void_p
8973 isl.isl_union_map_universe.argtypes = [c_void_p]
8974 isl.isl_union_map_wrap.restype = c_void_p
8975 isl.isl_union_map_wrap.argtypes = [c_void_p]
8976 isl.isl_union_map_zip.restype = c_void_p
8977 isl.isl_union_map_zip.argtypes = [c_void_p]
8978 isl.isl_union_map_copy.restype = c_void_p
8979 isl.isl_union_map_copy.argtypes = [c_void_p]
8980 isl.isl_union_map_free.restype = c_void_p
8981 isl.isl_union_map_free.argtypes = [c_void_p]
8982 isl.isl_union_map_to_str.restype = POINTER(c_char)
8983 isl.isl_union_map_to_str.argtypes = [c_void_p]
8985 class map(union_map):
8986     def __init__(self, *args, **keywords):
8987         if "ptr" in keywords:
8988             self.ctx = keywords["ctx"]
8989             self.ptr = keywords["ptr"]
8990             return
8991         if len(args) == 1 and args[0].__class__ is basic_map:
8992             self.ctx = Context.getDefaultInstance()
8993             self.ptr = isl.isl_map_from_basic_map(isl.isl_basic_map_copy(args[0].ptr))
8994             return
8995         if len(args) == 1 and type(args[0]) == str:
8996             self.ctx = Context.getDefaultInstance()
8997             self.ptr = isl.isl_map_read_from_str(self.ctx, args[0].encode('ascii'))
8998             return
8999         raise Error
9000     def __del__(self):
9001         if hasattr(self, 'ptr'):
9002             isl.isl_map_free(self.ptr)
9003     def __str__(arg0):
9004         try:
9005             if not arg0.__class__ is map:
9006                 arg0 = map(arg0)
9007         except:
9008             raise
9009         ptr = isl.isl_map_to_str(arg0.ptr)
9010         res = cast(ptr, c_char_p).value.decode('ascii')
9011         libc.free(ptr)
9012         return res
9013     def __repr__(self):
9014         s = str(self)
9015         if '"' in s:
9016             return 'isl.map("""%s""")' % s
9017         else:
9018             return 'isl.map("%s")' % s
9019     def affine_hull(arg0):
9020         try:
9021             if not arg0.__class__ is map:
9022                 arg0 = map(arg0)
9023         except:
9024             raise
9025         ctx = arg0.ctx
9026         res = isl.isl_map_affine_hull(isl.isl_map_copy(arg0.ptr))
9027         obj = basic_map(ctx=ctx, ptr=res)
9028         return obj
9029     def apply_domain(arg0, arg1):
9030         try:
9031             if not arg0.__class__ is map:
9032                 arg0 = map(arg0)
9033         except:
9034             raise
9035         try:
9036             if not arg1.__class__ is map:
9037                 arg1 = map(arg1)
9038         except:
9039             return union_map(arg0).apply_domain(arg1)
9040         ctx = arg0.ctx
9041         res = isl.isl_map_apply_domain(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9042         obj = map(ctx=ctx, ptr=res)
9043         return obj
9044     def apply_range(arg0, arg1):
9045         try:
9046             if not arg0.__class__ is map:
9047                 arg0 = map(arg0)
9048         except:
9049             raise
9050         try:
9051             if not arg1.__class__ is map:
9052                 arg1 = map(arg1)
9053         except:
9054             return union_map(arg0).apply_range(arg1)
9055         ctx = arg0.ctx
9056         res = isl.isl_map_apply_range(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9057         obj = map(ctx=ctx, ptr=res)
9058         return obj
9059     def as_pw_multi_aff(arg0):
9060         try:
9061             if not arg0.__class__ is map:
9062                 arg0 = map(arg0)
9063         except:
9064             raise
9065         ctx = arg0.ctx
9066         res = isl.isl_map_as_pw_multi_aff(isl.isl_map_copy(arg0.ptr))
9067         obj = pw_multi_aff(ctx=ctx, ptr=res)
9068         return obj
9069     def bind_domain(arg0, arg1):
9070         try:
9071             if not arg0.__class__ is map:
9072                 arg0 = map(arg0)
9073         except:
9074             raise
9075         try:
9076             if not arg1.__class__ is multi_id:
9077                 arg1 = multi_id(arg1)
9078         except:
9079             return union_map(arg0).bind_domain(arg1)
9080         ctx = arg0.ctx
9081         res = isl.isl_map_bind_domain(isl.isl_map_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
9082         obj = set(ctx=ctx, ptr=res)
9083         return obj
9084     def bind_range(arg0, arg1):
9085         try:
9086             if not arg0.__class__ is map:
9087                 arg0 = map(arg0)
9088         except:
9089             raise
9090         try:
9091             if not arg1.__class__ is multi_id:
9092                 arg1 = multi_id(arg1)
9093         except:
9094             return union_map(arg0).bind_range(arg1)
9095         ctx = arg0.ctx
9096         res = isl.isl_map_bind_range(isl.isl_map_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
9097         obj = set(ctx=ctx, ptr=res)
9098         return obj
9099     def coalesce(arg0):
9100         try:
9101             if not arg0.__class__ is map:
9102                 arg0 = map(arg0)
9103         except:
9104             raise
9105         ctx = arg0.ctx
9106         res = isl.isl_map_coalesce(isl.isl_map_copy(arg0.ptr))
9107         obj = map(ctx=ctx, ptr=res)
9108         return obj
9109     def complement(arg0):
9110         try:
9111             if not arg0.__class__ is map:
9112                 arg0 = map(arg0)
9113         except:
9114             raise
9115         ctx = arg0.ctx
9116         res = isl.isl_map_complement(isl.isl_map_copy(arg0.ptr))
9117         obj = map(ctx=ctx, ptr=res)
9118         return obj
9119     def curry(arg0):
9120         try:
9121             if not arg0.__class__ is map:
9122                 arg0 = map(arg0)
9123         except:
9124             raise
9125         ctx = arg0.ctx
9126         res = isl.isl_map_curry(isl.isl_map_copy(arg0.ptr))
9127         obj = map(ctx=ctx, ptr=res)
9128         return obj
9129     def deltas(arg0):
9130         try:
9131             if not arg0.__class__ is map:
9132                 arg0 = map(arg0)
9133         except:
9134             raise
9135         ctx = arg0.ctx
9136         res = isl.isl_map_deltas(isl.isl_map_copy(arg0.ptr))
9137         obj = set(ctx=ctx, ptr=res)
9138         return obj
9139     def detect_equalities(arg0):
9140         try:
9141             if not arg0.__class__ is map:
9142                 arg0 = map(arg0)
9143         except:
9144             raise
9145         ctx = arg0.ctx
9146         res = isl.isl_map_detect_equalities(isl.isl_map_copy(arg0.ptr))
9147         obj = map(ctx=ctx, ptr=res)
9148         return obj
9149     def domain(arg0):
9150         try:
9151             if not arg0.__class__ is map:
9152                 arg0 = map(arg0)
9153         except:
9154             raise
9155         ctx = arg0.ctx
9156         res = isl.isl_map_domain(isl.isl_map_copy(arg0.ptr))
9157         obj = set(ctx=ctx, ptr=res)
9158         return obj
9159     def domain_factor_domain(arg0):
9160         try:
9161             if not arg0.__class__ is map:
9162                 arg0 = map(arg0)
9163         except:
9164             raise
9165         ctx = arg0.ctx
9166         res = isl.isl_map_domain_factor_domain(isl.isl_map_copy(arg0.ptr))
9167         obj = map(ctx=ctx, ptr=res)
9168         return obj
9169     def domain_factor_range(arg0):
9170         try:
9171             if not arg0.__class__ is map:
9172                 arg0 = map(arg0)
9173         except:
9174             raise
9175         ctx = arg0.ctx
9176         res = isl.isl_map_domain_factor_range(isl.isl_map_copy(arg0.ptr))
9177         obj = map(ctx=ctx, ptr=res)
9178         return obj
9179     def domain_product(arg0, arg1):
9180         try:
9181             if not arg0.__class__ is map:
9182                 arg0 = map(arg0)
9183         except:
9184             raise
9185         try:
9186             if not arg1.__class__ is map:
9187                 arg1 = map(arg1)
9188         except:
9189             return union_map(arg0).domain_product(arg1)
9190         ctx = arg0.ctx
9191         res = isl.isl_map_domain_product(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9192         obj = map(ctx=ctx, ptr=res)
9193         return obj
9194     def domain_reverse(arg0):
9195         try:
9196             if not arg0.__class__ is map:
9197                 arg0 = map(arg0)
9198         except:
9199             raise
9200         ctx = arg0.ctx
9201         res = isl.isl_map_domain_reverse(isl.isl_map_copy(arg0.ptr))
9202         obj = map(ctx=ctx, ptr=res)
9203         return obj
9204     def domain_tuple_dim(arg0):
9205         try:
9206             if not arg0.__class__ is map:
9207                 arg0 = map(arg0)
9208         except:
9209             raise
9210         ctx = arg0.ctx
9211         res = isl.isl_map_domain_tuple_dim(arg0.ptr)
9212         if res < 0:
9213             raise Error
9214         return int(res)
9215     def domain_tuple_id(arg0):
9216         try:
9217             if not arg0.__class__ is map:
9218                 arg0 = map(arg0)
9219         except:
9220             raise
9221         ctx = arg0.ctx
9222         res = isl.isl_map_get_domain_tuple_id(arg0.ptr)
9223         obj = id(ctx=ctx, ptr=res)
9224         return obj
9225     def get_domain_tuple_id(arg0):
9226         return arg0.domain_tuple_id()
9227     def drop_unused_params(arg0):
9228         try:
9229             if not arg0.__class__ is map:
9230                 arg0 = map(arg0)
9231         except:
9232             raise
9233         ctx = arg0.ctx
9234         res = isl.isl_map_drop_unused_params(isl.isl_map_copy(arg0.ptr))
9235         obj = map(ctx=ctx, ptr=res)
9236         return obj
9237     @staticmethod
9238     def empty(arg0):
9239         try:
9240             if not arg0.__class__ is space:
9241                 arg0 = space(arg0)
9242         except:
9243             raise
9244         ctx = arg0.ctx
9245         res = isl.isl_map_empty(isl.isl_space_copy(arg0.ptr))
9246         obj = map(ctx=ctx, ptr=res)
9247         return obj
9248     def eq_at(*args):
9249         if len(args) == 2 and args[1].__class__ is multi_pw_aff:
9250             args = list(args)
9251             try:
9252                 if not args[0].__class__ is map:
9253                     args[0] = map(args[0])
9254             except:
9255                 raise
9256             ctx = args[0].ctx
9257             res = isl.isl_map_eq_at_multi_pw_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
9258             obj = map(ctx=ctx, ptr=res)
9259             return obj
9260         raise Error
9261     def factor_domain(arg0):
9262         try:
9263             if not arg0.__class__ is map:
9264                 arg0 = map(arg0)
9265         except:
9266             raise
9267         ctx = arg0.ctx
9268         res = isl.isl_map_factor_domain(isl.isl_map_copy(arg0.ptr))
9269         obj = map(ctx=ctx, ptr=res)
9270         return obj
9271     def factor_range(arg0):
9272         try:
9273             if not arg0.__class__ is map:
9274                 arg0 = map(arg0)
9275         except:
9276             raise
9277         ctx = arg0.ctx
9278         res = isl.isl_map_factor_range(isl.isl_map_copy(arg0.ptr))
9279         obj = map(ctx=ctx, ptr=res)
9280         return obj
9281     def fixed_power(*args):
9282         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
9283             args = list(args)
9284             try:
9285                 if not args[0].__class__ is map:
9286                     args[0] = map(args[0])
9287             except:
9288                 raise
9289             try:
9290                 if not args[1].__class__ is val:
9291                     args[1] = val(args[1])
9292             except:
9293                 raise
9294             ctx = args[0].ctx
9295             res = isl.isl_map_fixed_power_val(isl.isl_map_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
9296             obj = map(ctx=ctx, ptr=res)
9297             return obj
9298         raise Error
9299     def flatten(arg0):
9300         try:
9301             if not arg0.__class__ is map:
9302                 arg0 = map(arg0)
9303         except:
9304             raise
9305         ctx = arg0.ctx
9306         res = isl.isl_map_flatten(isl.isl_map_copy(arg0.ptr))
9307         obj = map(ctx=ctx, ptr=res)
9308         return obj
9309     def flatten_domain(arg0):
9310         try:
9311             if not arg0.__class__ is map:
9312                 arg0 = map(arg0)
9313         except:
9314             raise
9315         ctx = arg0.ctx
9316         res = isl.isl_map_flatten_domain(isl.isl_map_copy(arg0.ptr))
9317         obj = map(ctx=ctx, ptr=res)
9318         return obj
9319     def flatten_range(arg0):
9320         try:
9321             if not arg0.__class__ is map:
9322                 arg0 = map(arg0)
9323         except:
9324             raise
9325         ctx = arg0.ctx
9326         res = isl.isl_map_flatten_range(isl.isl_map_copy(arg0.ptr))
9327         obj = map(ctx=ctx, ptr=res)
9328         return obj
9329     def foreach_basic_map(arg0, arg1):
9330         try:
9331             if not arg0.__class__ is map:
9332                 arg0 = map(arg0)
9333         except:
9334             raise
9335         exc_info = [None]
9336         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
9337         def cb_func(cb_arg0, cb_arg1):
9338             cb_arg0 = basic_map(ctx=arg0.ctx, ptr=(cb_arg0))
9339             try:
9340                 arg1(cb_arg0)
9341             except BaseException as e:
9342                 exc_info[0] = e
9343                 return -1
9344             return 0
9345         cb1 = fn(cb_func)
9346         ctx = arg0.ctx
9347         res = isl.isl_map_foreach_basic_map(arg0.ptr, cb1, None)
9348         if exc_info[0] is not None:
9349             raise exc_info[0]
9350         if res < 0:
9351             raise Error
9352     def gist(arg0, arg1):
9353         try:
9354             if not arg0.__class__ is map:
9355                 arg0 = map(arg0)
9356         except:
9357             raise
9358         try:
9359             if not arg1.__class__ is map:
9360                 arg1 = map(arg1)
9361         except:
9362             return union_map(arg0).gist(arg1)
9363         ctx = arg0.ctx
9364         res = isl.isl_map_gist(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9365         obj = map(ctx=ctx, ptr=res)
9366         return obj
9367     def gist_domain(arg0, arg1):
9368         try:
9369             if not arg0.__class__ is map:
9370                 arg0 = map(arg0)
9371         except:
9372             raise
9373         try:
9374             if not arg1.__class__ is set:
9375                 arg1 = set(arg1)
9376         except:
9377             return union_map(arg0).gist_domain(arg1)
9378         ctx = arg0.ctx
9379         res = isl.isl_map_gist_domain(isl.isl_map_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
9380         obj = map(ctx=ctx, ptr=res)
9381         return obj
9382     def gist_params(arg0, arg1):
9383         try:
9384             if not arg0.__class__ is map:
9385                 arg0 = map(arg0)
9386         except:
9387             raise
9388         try:
9389             if not arg1.__class__ is set:
9390                 arg1 = set(arg1)
9391         except:
9392             return union_map(arg0).gist_params(arg1)
9393         ctx = arg0.ctx
9394         res = isl.isl_map_gist_params(isl.isl_map_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
9395         obj = map(ctx=ctx, ptr=res)
9396         return obj
9397     def has_domain_tuple_id(arg0):
9398         try:
9399             if not arg0.__class__ is map:
9400                 arg0 = map(arg0)
9401         except:
9402             raise
9403         ctx = arg0.ctx
9404         res = isl.isl_map_has_domain_tuple_id(arg0.ptr)
9405         if res < 0:
9406             raise Error
9407         return bool(res)
9408     def has_range_tuple_id(arg0):
9409         try:
9410             if not arg0.__class__ is map:
9411                 arg0 = map(arg0)
9412         except:
9413             raise
9414         ctx = arg0.ctx
9415         res = isl.isl_map_has_range_tuple_id(arg0.ptr)
9416         if res < 0:
9417             raise Error
9418         return bool(res)
9419     def intersect(arg0, arg1):
9420         try:
9421             if not arg0.__class__ is map:
9422                 arg0 = map(arg0)
9423         except:
9424             raise
9425         try:
9426             if not arg1.__class__ is map:
9427                 arg1 = map(arg1)
9428         except:
9429             return union_map(arg0).intersect(arg1)
9430         ctx = arg0.ctx
9431         res = isl.isl_map_intersect(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9432         obj = map(ctx=ctx, ptr=res)
9433         return obj
9434     def intersect_domain(arg0, arg1):
9435         try:
9436             if not arg0.__class__ is map:
9437                 arg0 = map(arg0)
9438         except:
9439             raise
9440         try:
9441             if not arg1.__class__ is set:
9442                 arg1 = set(arg1)
9443         except:
9444             return union_map(arg0).intersect_domain(arg1)
9445         ctx = arg0.ctx
9446         res = isl.isl_map_intersect_domain(isl.isl_map_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
9447         obj = map(ctx=ctx, ptr=res)
9448         return obj
9449     def intersect_domain_factor_domain(arg0, arg1):
9450         try:
9451             if not arg0.__class__ is map:
9452                 arg0 = map(arg0)
9453         except:
9454             raise
9455         try:
9456             if not arg1.__class__ is map:
9457                 arg1 = map(arg1)
9458         except:
9459             return union_map(arg0).intersect_domain_factor_domain(arg1)
9460         ctx = arg0.ctx
9461         res = isl.isl_map_intersect_domain_factor_domain(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9462         obj = map(ctx=ctx, ptr=res)
9463         return obj
9464     def intersect_domain_factor_range(arg0, arg1):
9465         try:
9466             if not arg0.__class__ is map:
9467                 arg0 = map(arg0)
9468         except:
9469             raise
9470         try:
9471             if not arg1.__class__ is map:
9472                 arg1 = map(arg1)
9473         except:
9474             return union_map(arg0).intersect_domain_factor_range(arg1)
9475         ctx = arg0.ctx
9476         res = isl.isl_map_intersect_domain_factor_range(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9477         obj = map(ctx=ctx, ptr=res)
9478         return obj
9479     def intersect_domain_wrapped_domain(arg0, arg1):
9480         try:
9481             if not arg0.__class__ is map:
9482                 arg0 = map(arg0)
9483         except:
9484             raise
9485         try:
9486             if not arg1.__class__ is set:
9487                 arg1 = set(arg1)
9488         except:
9489             return union_map(arg0).intersect_domain_wrapped_domain(arg1)
9490         ctx = arg0.ctx
9491         res = isl.isl_map_intersect_domain_wrapped_domain(isl.isl_map_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
9492         obj = map(ctx=ctx, ptr=res)
9493         return obj
9494     def intersect_params(arg0, arg1):
9495         try:
9496             if not arg0.__class__ is map:
9497                 arg0 = map(arg0)
9498         except:
9499             raise
9500         try:
9501             if not arg1.__class__ is set:
9502                 arg1 = set(arg1)
9503         except:
9504             return union_map(arg0).intersect_params(arg1)
9505         ctx = arg0.ctx
9506         res = isl.isl_map_intersect_params(isl.isl_map_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
9507         obj = map(ctx=ctx, ptr=res)
9508         return obj
9509     def intersect_range(arg0, arg1):
9510         try:
9511             if not arg0.__class__ is map:
9512                 arg0 = map(arg0)
9513         except:
9514             raise
9515         try:
9516             if not arg1.__class__ is set:
9517                 arg1 = set(arg1)
9518         except:
9519             return union_map(arg0).intersect_range(arg1)
9520         ctx = arg0.ctx
9521         res = isl.isl_map_intersect_range(isl.isl_map_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
9522         obj = map(ctx=ctx, ptr=res)
9523         return obj
9524     def intersect_range_factor_domain(arg0, arg1):
9525         try:
9526             if not arg0.__class__ is map:
9527                 arg0 = map(arg0)
9528         except:
9529             raise
9530         try:
9531             if not arg1.__class__ is map:
9532                 arg1 = map(arg1)
9533         except:
9534             return union_map(arg0).intersect_range_factor_domain(arg1)
9535         ctx = arg0.ctx
9536         res = isl.isl_map_intersect_range_factor_domain(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9537         obj = map(ctx=ctx, ptr=res)
9538         return obj
9539     def intersect_range_factor_range(arg0, arg1):
9540         try:
9541             if not arg0.__class__ is map:
9542                 arg0 = map(arg0)
9543         except:
9544             raise
9545         try:
9546             if not arg1.__class__ is map:
9547                 arg1 = map(arg1)
9548         except:
9549             return union_map(arg0).intersect_range_factor_range(arg1)
9550         ctx = arg0.ctx
9551         res = isl.isl_map_intersect_range_factor_range(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9552         obj = map(ctx=ctx, ptr=res)
9553         return obj
9554     def intersect_range_wrapped_domain(arg0, arg1):
9555         try:
9556             if not arg0.__class__ is map:
9557                 arg0 = map(arg0)
9558         except:
9559             raise
9560         try:
9561             if not arg1.__class__ is set:
9562                 arg1 = set(arg1)
9563         except:
9564             return union_map(arg0).intersect_range_wrapped_domain(arg1)
9565         ctx = arg0.ctx
9566         res = isl.isl_map_intersect_range_wrapped_domain(isl.isl_map_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
9567         obj = map(ctx=ctx, ptr=res)
9568         return obj
9569     def is_bijective(arg0):
9570         try:
9571             if not arg0.__class__ is map:
9572                 arg0 = map(arg0)
9573         except:
9574             raise
9575         ctx = arg0.ctx
9576         res = isl.isl_map_is_bijective(arg0.ptr)
9577         if res < 0:
9578             raise Error
9579         return bool(res)
9580     def is_disjoint(arg0, arg1):
9581         try:
9582             if not arg0.__class__ is map:
9583                 arg0 = map(arg0)
9584         except:
9585             raise
9586         try:
9587             if not arg1.__class__ is map:
9588                 arg1 = map(arg1)
9589         except:
9590             return union_map(arg0).is_disjoint(arg1)
9591         ctx = arg0.ctx
9592         res = isl.isl_map_is_disjoint(arg0.ptr, arg1.ptr)
9593         if res < 0:
9594             raise Error
9595         return bool(res)
9596     def is_empty(arg0):
9597         try:
9598             if not arg0.__class__ is map:
9599                 arg0 = map(arg0)
9600         except:
9601             raise
9602         ctx = arg0.ctx
9603         res = isl.isl_map_is_empty(arg0.ptr)
9604         if res < 0:
9605             raise Error
9606         return bool(res)
9607     def is_equal(arg0, arg1):
9608         try:
9609             if not arg0.__class__ is map:
9610                 arg0 = map(arg0)
9611         except:
9612             raise
9613         try:
9614             if not arg1.__class__ is map:
9615                 arg1 = map(arg1)
9616         except:
9617             return union_map(arg0).is_equal(arg1)
9618         ctx = arg0.ctx
9619         res = isl.isl_map_is_equal(arg0.ptr, arg1.ptr)
9620         if res < 0:
9621             raise Error
9622         return bool(res)
9623     def is_injective(arg0):
9624         try:
9625             if not arg0.__class__ is map:
9626                 arg0 = map(arg0)
9627         except:
9628             raise
9629         ctx = arg0.ctx
9630         res = isl.isl_map_is_injective(arg0.ptr)
9631         if res < 0:
9632             raise Error
9633         return bool(res)
9634     def is_single_valued(arg0):
9635         try:
9636             if not arg0.__class__ is map:
9637                 arg0 = map(arg0)
9638         except:
9639             raise
9640         ctx = arg0.ctx
9641         res = isl.isl_map_is_single_valued(arg0.ptr)
9642         if res < 0:
9643             raise Error
9644         return bool(res)
9645     def is_strict_subset(arg0, arg1):
9646         try:
9647             if not arg0.__class__ is map:
9648                 arg0 = map(arg0)
9649         except:
9650             raise
9651         try:
9652             if not arg1.__class__ is map:
9653                 arg1 = map(arg1)
9654         except:
9655             return union_map(arg0).is_strict_subset(arg1)
9656         ctx = arg0.ctx
9657         res = isl.isl_map_is_strict_subset(arg0.ptr, arg1.ptr)
9658         if res < 0:
9659             raise Error
9660         return bool(res)
9661     def is_subset(arg0, arg1):
9662         try:
9663             if not arg0.__class__ is map:
9664                 arg0 = map(arg0)
9665         except:
9666             raise
9667         try:
9668             if not arg1.__class__ is map:
9669                 arg1 = map(arg1)
9670         except:
9671             return union_map(arg0).is_subset(arg1)
9672         ctx = arg0.ctx
9673         res = isl.isl_map_is_subset(arg0.ptr, arg1.ptr)
9674         if res < 0:
9675             raise Error
9676         return bool(res)
9677     def lex_ge_at(*args):
9678         if len(args) == 2 and args[1].__class__ is multi_pw_aff:
9679             args = list(args)
9680             try:
9681                 if not args[0].__class__ is map:
9682                     args[0] = map(args[0])
9683             except:
9684                 raise
9685             ctx = args[0].ctx
9686             res = isl.isl_map_lex_ge_at_multi_pw_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
9687             obj = map(ctx=ctx, ptr=res)
9688             return obj
9689         raise Error
9690     def lex_gt_at(*args):
9691         if len(args) == 2 and args[1].__class__ is multi_pw_aff:
9692             args = list(args)
9693             try:
9694                 if not args[0].__class__ is map:
9695                     args[0] = map(args[0])
9696             except:
9697                 raise
9698             ctx = args[0].ctx
9699             res = isl.isl_map_lex_gt_at_multi_pw_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
9700             obj = map(ctx=ctx, ptr=res)
9701             return obj
9702         raise Error
9703     def lex_le_at(*args):
9704         if len(args) == 2 and args[1].__class__ is multi_pw_aff:
9705             args = list(args)
9706             try:
9707                 if not args[0].__class__ is map:
9708                     args[0] = map(args[0])
9709             except:
9710                 raise
9711             ctx = args[0].ctx
9712             res = isl.isl_map_lex_le_at_multi_pw_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
9713             obj = map(ctx=ctx, ptr=res)
9714             return obj
9715         raise Error
9716     def lex_lt_at(*args):
9717         if len(args) == 2 and args[1].__class__ is multi_pw_aff:
9718             args = list(args)
9719             try:
9720                 if not args[0].__class__ is map:
9721                     args[0] = map(args[0])
9722             except:
9723                 raise
9724             ctx = args[0].ctx
9725             res = isl.isl_map_lex_lt_at_multi_pw_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
9726             obj = map(ctx=ctx, ptr=res)
9727             return obj
9728         raise Error
9729     def lexmax(arg0):
9730         try:
9731             if not arg0.__class__ is map:
9732                 arg0 = map(arg0)
9733         except:
9734             raise
9735         ctx = arg0.ctx
9736         res = isl.isl_map_lexmax(isl.isl_map_copy(arg0.ptr))
9737         obj = map(ctx=ctx, ptr=res)
9738         return obj
9739     def lexmax_pw_multi_aff(arg0):
9740         try:
9741             if not arg0.__class__ is map:
9742                 arg0 = map(arg0)
9743         except:
9744             raise
9745         ctx = arg0.ctx
9746         res = isl.isl_map_lexmax_pw_multi_aff(isl.isl_map_copy(arg0.ptr))
9747         obj = pw_multi_aff(ctx=ctx, ptr=res)
9748         return obj
9749     def lexmin(arg0):
9750         try:
9751             if not arg0.__class__ is map:
9752                 arg0 = map(arg0)
9753         except:
9754             raise
9755         ctx = arg0.ctx
9756         res = isl.isl_map_lexmin(isl.isl_map_copy(arg0.ptr))
9757         obj = map(ctx=ctx, ptr=res)
9758         return obj
9759     def lexmin_pw_multi_aff(arg0):
9760         try:
9761             if not arg0.__class__ is map:
9762                 arg0 = map(arg0)
9763         except:
9764             raise
9765         ctx = arg0.ctx
9766         res = isl.isl_map_lexmin_pw_multi_aff(isl.isl_map_copy(arg0.ptr))
9767         obj = pw_multi_aff(ctx=ctx, ptr=res)
9768         return obj
9769     def lower_bound(*args):
9770         if len(args) == 2 and args[1].__class__ is multi_pw_aff:
9771             args = list(args)
9772             try:
9773                 if not args[0].__class__ is map:
9774                     args[0] = map(args[0])
9775             except:
9776                 raise
9777             ctx = args[0].ctx
9778             res = isl.isl_map_lower_bound_multi_pw_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
9779             obj = map(ctx=ctx, ptr=res)
9780             return obj
9781         raise Error
9782     def max_multi_pw_aff(arg0):
9783         try:
9784             if not arg0.__class__ is map:
9785                 arg0 = map(arg0)
9786         except:
9787             raise
9788         ctx = arg0.ctx
9789         res = isl.isl_map_max_multi_pw_aff(isl.isl_map_copy(arg0.ptr))
9790         obj = multi_pw_aff(ctx=ctx, ptr=res)
9791         return obj
9792     def min_multi_pw_aff(arg0):
9793         try:
9794             if not arg0.__class__ is map:
9795                 arg0 = map(arg0)
9796         except:
9797             raise
9798         ctx = arg0.ctx
9799         res = isl.isl_map_min_multi_pw_aff(isl.isl_map_copy(arg0.ptr))
9800         obj = multi_pw_aff(ctx=ctx, ptr=res)
9801         return obj
9802     def n_basic_map(arg0):
9803         try:
9804             if not arg0.__class__ is map:
9805                 arg0 = map(arg0)
9806         except:
9807             raise
9808         ctx = arg0.ctx
9809         res = isl.isl_map_n_basic_map(arg0.ptr)
9810         if res < 0:
9811             raise Error
9812         return int(res)
9813     def params(arg0):
9814         try:
9815             if not arg0.__class__ is map:
9816                 arg0 = map(arg0)
9817         except:
9818             raise
9819         ctx = arg0.ctx
9820         res = isl.isl_map_params(isl.isl_map_copy(arg0.ptr))
9821         obj = set(ctx=ctx, ptr=res)
9822         return obj
9823     def polyhedral_hull(arg0):
9824         try:
9825             if not arg0.__class__ is map:
9826                 arg0 = map(arg0)
9827         except:
9828             raise
9829         ctx = arg0.ctx
9830         res = isl.isl_map_polyhedral_hull(isl.isl_map_copy(arg0.ptr))
9831         obj = basic_map(ctx=ctx, ptr=res)
9832         return obj
9833     def preimage_domain(*args):
9834         if len(args) == 2 and args[1].__class__ is multi_aff:
9835             args = list(args)
9836             try:
9837                 if not args[0].__class__ is map:
9838                     args[0] = map(args[0])
9839             except:
9840                 raise
9841             ctx = args[0].ctx
9842             res = isl.isl_map_preimage_domain_multi_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
9843             obj = map(ctx=ctx, ptr=res)
9844             return obj
9845         if len(args) == 2 and args[1].__class__ is multi_pw_aff:
9846             args = list(args)
9847             try:
9848                 if not args[0].__class__ is map:
9849                     args[0] = map(args[0])
9850             except:
9851                 raise
9852             ctx = args[0].ctx
9853             res = isl.isl_map_preimage_domain_multi_pw_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
9854             obj = map(ctx=ctx, ptr=res)
9855             return obj
9856         if len(args) == 2 and args[1].__class__ is pw_multi_aff:
9857             args = list(args)
9858             try:
9859                 if not args[0].__class__ is map:
9860                     args[0] = map(args[0])
9861             except:
9862                 raise
9863             ctx = args[0].ctx
9864             res = isl.isl_map_preimage_domain_pw_multi_aff(isl.isl_map_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
9865             obj = map(ctx=ctx, ptr=res)
9866             return obj
9867         raise Error
9868     def preimage_range(*args):
9869         if len(args) == 2 and args[1].__class__ is multi_aff:
9870             args = list(args)
9871             try:
9872                 if not args[0].__class__ is map:
9873                     args[0] = map(args[0])
9874             except:
9875                 raise
9876             ctx = args[0].ctx
9877             res = isl.isl_map_preimage_range_multi_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
9878             obj = map(ctx=ctx, ptr=res)
9879             return obj
9880         if len(args) == 2 and args[1].__class__ is pw_multi_aff:
9881             args = list(args)
9882             try:
9883                 if not args[0].__class__ is map:
9884                     args[0] = map(args[0])
9885             except:
9886                 raise
9887             ctx = args[0].ctx
9888             res = isl.isl_map_preimage_range_pw_multi_aff(isl.isl_map_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
9889             obj = map(ctx=ctx, ptr=res)
9890             return obj
9891         raise Error
9892     def product(arg0, arg1):
9893         try:
9894             if not arg0.__class__ is map:
9895                 arg0 = map(arg0)
9896         except:
9897             raise
9898         try:
9899             if not arg1.__class__ is map:
9900                 arg1 = map(arg1)
9901         except:
9902             return union_map(arg0).product(arg1)
9903         ctx = arg0.ctx
9904         res = isl.isl_map_product(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
9905         obj = map(ctx=ctx, ptr=res)
9906         return obj
9907     def project_out_all_params(arg0):
9908         try:
9909             if not arg0.__class__ is map:
9910                 arg0 = map(arg0)
9911         except:
9912             raise
9913         ctx = arg0.ctx
9914         res = isl.isl_map_project_out_all_params(isl.isl_map_copy(arg0.ptr))
9915         obj = map(ctx=ctx, ptr=res)
9916         return obj
9917     def project_out_param(*args):
9918         if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
9919             args = list(args)
9920             try:
9921                 if not args[0].__class__ is map:
9922                     args[0] = map(args[0])
9923             except:
9924                 raise
9925             try:
9926                 if not args[1].__class__ is id:
9927                     args[1] = id(args[1])
9928             except:
9929                 raise
9930             ctx = args[0].ctx
9931             res = isl.isl_map_project_out_param_id(isl.isl_map_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
9932             obj = map(ctx=ctx, ptr=res)
9933             return obj
9934         if len(args) == 2 and args[1].__class__ is id_list:
9935             args = list(args)
9936             try:
9937                 if not args[0].__class__ is map:
9938                     args[0] = map(args[0])
9939             except:
9940                 raise
9941             ctx = args[0].ctx
9942             res = isl.isl_map_project_out_param_id_list(isl.isl_map_copy(args[0].ptr), isl.isl_id_list_copy(args[1].ptr))
9943             obj = map(ctx=ctx, ptr=res)
9944             return obj
9945         raise Error
9946     def range(arg0):
9947         try:
9948             if not arg0.__class__ is map:
9949                 arg0 = map(arg0)
9950         except:
9951             raise
9952         ctx = arg0.ctx
9953         res = isl.isl_map_range(isl.isl_map_copy(arg0.ptr))
9954         obj = set(ctx=ctx, ptr=res)
9955         return obj
9956     def range_factor_domain(arg0):
9957         try:
9958             if not arg0.__class__ is map:
9959                 arg0 = map(arg0)
9960         except:
9961             raise
9962         ctx = arg0.ctx
9963         res = isl.isl_map_range_factor_domain(isl.isl_map_copy(arg0.ptr))
9964         obj = map(ctx=ctx, ptr=res)
9965         return obj
9966     def range_factor_range(arg0):
9967         try:
9968             if not arg0.__class__ is map:
9969                 arg0 = map(arg0)
9970         except:
9971             raise
9972         ctx = arg0.ctx
9973         res = isl.isl_map_range_factor_range(isl.isl_map_copy(arg0.ptr))
9974         obj = map(ctx=ctx, ptr=res)
9975         return obj
9976     def range_lattice_tile(arg0):
9977         try:
9978             if not arg0.__class__ is map:
9979                 arg0 = map(arg0)
9980         except:
9981             raise
9982         ctx = arg0.ctx
9983         res = isl.isl_map_get_range_lattice_tile(arg0.ptr)
9984         obj = fixed_box(ctx=ctx, ptr=res)
9985         return obj
9986     def get_range_lattice_tile(arg0):
9987         return arg0.range_lattice_tile()
9988     def range_product(arg0, arg1):
9989         try:
9990             if not arg0.__class__ is map:
9991                 arg0 = map(arg0)
9992         except:
9993             raise
9994         try:
9995             if not arg1.__class__ is map:
9996                 arg1 = map(arg1)
9997         except:
9998             return union_map(arg0).range_product(arg1)
9999         ctx = arg0.ctx
10000         res = isl.isl_map_range_product(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
10001         obj = map(ctx=ctx, ptr=res)
10002         return obj
10003     def range_reverse(arg0):
10004         try:
10005             if not arg0.__class__ is map:
10006                 arg0 = map(arg0)
10007         except:
10008             raise
10009         ctx = arg0.ctx
10010         res = isl.isl_map_range_reverse(isl.isl_map_copy(arg0.ptr))
10011         obj = map(ctx=ctx, ptr=res)
10012         return obj
10013     def range_simple_fixed_box_hull(arg0):
10014         try:
10015             if not arg0.__class__ is map:
10016                 arg0 = map(arg0)
10017         except:
10018             raise
10019         ctx = arg0.ctx
10020         res = isl.isl_map_get_range_simple_fixed_box_hull(arg0.ptr)
10021         obj = fixed_box(ctx=ctx, ptr=res)
10022         return obj
10023     def get_range_simple_fixed_box_hull(arg0):
10024         return arg0.range_simple_fixed_box_hull()
10025     def range_tuple_dim(arg0):
10026         try:
10027             if not arg0.__class__ is map:
10028                 arg0 = map(arg0)
10029         except:
10030             raise
10031         ctx = arg0.ctx
10032         res = isl.isl_map_range_tuple_dim(arg0.ptr)
10033         if res < 0:
10034             raise Error
10035         return int(res)
10036     def range_tuple_id(arg0):
10037         try:
10038             if not arg0.__class__ is map:
10039                 arg0 = map(arg0)
10040         except:
10041             raise
10042         ctx = arg0.ctx
10043         res = isl.isl_map_get_range_tuple_id(arg0.ptr)
10044         obj = id(ctx=ctx, ptr=res)
10045         return obj
10046     def get_range_tuple_id(arg0):
10047         return arg0.range_tuple_id()
10048     def reverse(arg0):
10049         try:
10050             if not arg0.__class__ is map:
10051                 arg0 = map(arg0)
10052         except:
10053             raise
10054         ctx = arg0.ctx
10055         res = isl.isl_map_reverse(isl.isl_map_copy(arg0.ptr))
10056         obj = map(ctx=ctx, ptr=res)
10057         return obj
10058     def sample(arg0):
10059         try:
10060             if not arg0.__class__ is map:
10061                 arg0 = map(arg0)
10062         except:
10063             raise
10064         ctx = arg0.ctx
10065         res = isl.isl_map_sample(isl.isl_map_copy(arg0.ptr))
10066         obj = basic_map(ctx=ctx, ptr=res)
10067         return obj
10068     def set_domain_tuple(*args):
10069         if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
10070             args = list(args)
10071             try:
10072                 if not args[0].__class__ is map:
10073                     args[0] = map(args[0])
10074             except:
10075                 raise
10076             try:
10077                 if not args[1].__class__ is id:
10078                     args[1] = id(args[1])
10079             except:
10080                 raise
10081             ctx = args[0].ctx
10082             res = isl.isl_map_set_domain_tuple_id(isl.isl_map_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
10083             obj = map(ctx=ctx, ptr=res)
10084             return obj
10085         raise Error
10086     def set_range_tuple(*args):
10087         if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
10088             args = list(args)
10089             try:
10090                 if not args[0].__class__ is map:
10091                     args[0] = map(args[0])
10092             except:
10093                 raise
10094             try:
10095                 if not args[1].__class__ is id:
10096                     args[1] = id(args[1])
10097             except:
10098                 raise
10099             ctx = args[0].ctx
10100             res = isl.isl_map_set_range_tuple_id(isl.isl_map_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
10101             obj = map(ctx=ctx, ptr=res)
10102             return obj
10103         raise Error
10104     def space(arg0):
10105         try:
10106             if not arg0.__class__ is map:
10107                 arg0 = map(arg0)
10108         except:
10109             raise
10110         ctx = arg0.ctx
10111         res = isl.isl_map_get_space(arg0.ptr)
10112         obj = space(ctx=ctx, ptr=res)
10113         return obj
10114     def get_space(arg0):
10115         return arg0.space()
10116     def subtract(arg0, arg1):
10117         try:
10118             if not arg0.__class__ is map:
10119                 arg0 = map(arg0)
10120         except:
10121             raise
10122         try:
10123             if not arg1.__class__ is map:
10124                 arg1 = map(arg1)
10125         except:
10126             return union_map(arg0).subtract(arg1)
10127         ctx = arg0.ctx
10128         res = isl.isl_map_subtract(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
10129         obj = map(ctx=ctx, ptr=res)
10130         return obj
10131     def to_list(arg0):
10132         try:
10133             if not arg0.__class__ is map:
10134                 arg0 = map(arg0)
10135         except:
10136             raise
10137         ctx = arg0.ctx
10138         res = isl.isl_map_to_list(isl.isl_map_copy(arg0.ptr))
10139         obj = map_list(ctx=ctx, ptr=res)
10140         return obj
10141     def to_union_map(arg0):
10142         try:
10143             if not arg0.__class__ is map:
10144                 arg0 = map(arg0)
10145         except:
10146             raise
10147         ctx = arg0.ctx
10148         res = isl.isl_map_to_union_map(isl.isl_map_copy(arg0.ptr))
10149         obj = union_map(ctx=ctx, ptr=res)
10150         return obj
10151     def uncurry(arg0):
10152         try:
10153             if not arg0.__class__ is map:
10154                 arg0 = map(arg0)
10155         except:
10156             raise
10157         ctx = arg0.ctx
10158         res = isl.isl_map_uncurry(isl.isl_map_copy(arg0.ptr))
10159         obj = map(ctx=ctx, ptr=res)
10160         return obj
10161     def union(arg0, arg1):
10162         try:
10163             if not arg0.__class__ is map:
10164                 arg0 = map(arg0)
10165         except:
10166             raise
10167         try:
10168             if not arg1.__class__ is map:
10169                 arg1 = map(arg1)
10170         except:
10171             return union_map(arg0).union(arg1)
10172         ctx = arg0.ctx
10173         res = isl.isl_map_union(isl.isl_map_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
10174         obj = map(ctx=ctx, ptr=res)
10175         return obj
10176     @staticmethod
10177     def universe(arg0):
10178         try:
10179             if not arg0.__class__ is space:
10180                 arg0 = space(arg0)
10181         except:
10182             raise
10183         ctx = arg0.ctx
10184         res = isl.isl_map_universe(isl.isl_space_copy(arg0.ptr))
10185         obj = map(ctx=ctx, ptr=res)
10186         return obj
10187     def unshifted_simple_hull(arg0):
10188         try:
10189             if not arg0.__class__ is map:
10190                 arg0 = map(arg0)
10191         except:
10192             raise
10193         ctx = arg0.ctx
10194         res = isl.isl_map_unshifted_simple_hull(isl.isl_map_copy(arg0.ptr))
10195         obj = basic_map(ctx=ctx, ptr=res)
10196         return obj
10197     def upper_bound(*args):
10198         if len(args) == 2 and args[1].__class__ is multi_pw_aff:
10199             args = list(args)
10200             try:
10201                 if not args[0].__class__ is map:
10202                     args[0] = map(args[0])
10203             except:
10204                 raise
10205             ctx = args[0].ctx
10206             res = isl.isl_map_upper_bound_multi_pw_aff(isl.isl_map_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
10207             obj = map(ctx=ctx, ptr=res)
10208             return obj
10209         raise Error
10210     def wrap(arg0):
10211         try:
10212             if not arg0.__class__ is map:
10213                 arg0 = map(arg0)
10214         except:
10215             raise
10216         ctx = arg0.ctx
10217         res = isl.isl_map_wrap(isl.isl_map_copy(arg0.ptr))
10218         obj = set(ctx=ctx, ptr=res)
10219         return obj
10220     def zip(arg0):
10221         try:
10222             if not arg0.__class__ is map:
10223                 arg0 = map(arg0)
10224         except:
10225             raise
10226         ctx = arg0.ctx
10227         res = isl.isl_map_zip(isl.isl_map_copy(arg0.ptr))
10228         obj = map(ctx=ctx, ptr=res)
10229         return obj
10231 isl.isl_map_from_basic_map.restype = c_void_p
10232 isl.isl_map_from_basic_map.argtypes = [c_void_p]
10233 isl.isl_map_read_from_str.restype = c_void_p
10234 isl.isl_map_read_from_str.argtypes = [Context, c_char_p]
10235 isl.isl_map_affine_hull.restype = c_void_p
10236 isl.isl_map_affine_hull.argtypes = [c_void_p]
10237 isl.isl_map_apply_domain.restype = c_void_p
10238 isl.isl_map_apply_domain.argtypes = [c_void_p, c_void_p]
10239 isl.isl_map_apply_range.restype = c_void_p
10240 isl.isl_map_apply_range.argtypes = [c_void_p, c_void_p]
10241 isl.isl_map_as_pw_multi_aff.restype = c_void_p
10242 isl.isl_map_as_pw_multi_aff.argtypes = [c_void_p]
10243 isl.isl_map_bind_domain.restype = c_void_p
10244 isl.isl_map_bind_domain.argtypes = [c_void_p, c_void_p]
10245 isl.isl_map_bind_range.restype = c_void_p
10246 isl.isl_map_bind_range.argtypes = [c_void_p, c_void_p]
10247 isl.isl_map_coalesce.restype = c_void_p
10248 isl.isl_map_coalesce.argtypes = [c_void_p]
10249 isl.isl_map_complement.restype = c_void_p
10250 isl.isl_map_complement.argtypes = [c_void_p]
10251 isl.isl_map_curry.restype = c_void_p
10252 isl.isl_map_curry.argtypes = [c_void_p]
10253 isl.isl_map_deltas.restype = c_void_p
10254 isl.isl_map_deltas.argtypes = [c_void_p]
10255 isl.isl_map_detect_equalities.restype = c_void_p
10256 isl.isl_map_detect_equalities.argtypes = [c_void_p]
10257 isl.isl_map_domain.restype = c_void_p
10258 isl.isl_map_domain.argtypes = [c_void_p]
10259 isl.isl_map_domain_factor_domain.restype = c_void_p
10260 isl.isl_map_domain_factor_domain.argtypes = [c_void_p]
10261 isl.isl_map_domain_factor_range.restype = c_void_p
10262 isl.isl_map_domain_factor_range.argtypes = [c_void_p]
10263 isl.isl_map_domain_product.restype = c_void_p
10264 isl.isl_map_domain_product.argtypes = [c_void_p, c_void_p]
10265 isl.isl_map_domain_reverse.restype = c_void_p
10266 isl.isl_map_domain_reverse.argtypes = [c_void_p]
10267 isl.isl_map_domain_tuple_dim.argtypes = [c_void_p]
10268 isl.isl_map_get_domain_tuple_id.restype = c_void_p
10269 isl.isl_map_get_domain_tuple_id.argtypes = [c_void_p]
10270 isl.isl_map_drop_unused_params.restype = c_void_p
10271 isl.isl_map_drop_unused_params.argtypes = [c_void_p]
10272 isl.isl_map_empty.restype = c_void_p
10273 isl.isl_map_empty.argtypes = [c_void_p]
10274 isl.isl_map_eq_at_multi_pw_aff.restype = c_void_p
10275 isl.isl_map_eq_at_multi_pw_aff.argtypes = [c_void_p, c_void_p]
10276 isl.isl_map_factor_domain.restype = c_void_p
10277 isl.isl_map_factor_domain.argtypes = [c_void_p]
10278 isl.isl_map_factor_range.restype = c_void_p
10279 isl.isl_map_factor_range.argtypes = [c_void_p]
10280 isl.isl_map_fixed_power_val.restype = c_void_p
10281 isl.isl_map_fixed_power_val.argtypes = [c_void_p, c_void_p]
10282 isl.isl_map_flatten.restype = c_void_p
10283 isl.isl_map_flatten.argtypes = [c_void_p]
10284 isl.isl_map_flatten_domain.restype = c_void_p
10285 isl.isl_map_flatten_domain.argtypes = [c_void_p]
10286 isl.isl_map_flatten_range.restype = c_void_p
10287 isl.isl_map_flatten_range.argtypes = [c_void_p]
10288 isl.isl_map_foreach_basic_map.argtypes = [c_void_p, c_void_p, c_void_p]
10289 isl.isl_map_gist.restype = c_void_p
10290 isl.isl_map_gist.argtypes = [c_void_p, c_void_p]
10291 isl.isl_map_gist_domain.restype = c_void_p
10292 isl.isl_map_gist_domain.argtypes = [c_void_p, c_void_p]
10293 isl.isl_map_gist_params.restype = c_void_p
10294 isl.isl_map_gist_params.argtypes = [c_void_p, c_void_p]
10295 isl.isl_map_has_domain_tuple_id.argtypes = [c_void_p]
10296 isl.isl_map_has_range_tuple_id.argtypes = [c_void_p]
10297 isl.isl_map_intersect.restype = c_void_p
10298 isl.isl_map_intersect.argtypes = [c_void_p, c_void_p]
10299 isl.isl_map_intersect_domain.restype = c_void_p
10300 isl.isl_map_intersect_domain.argtypes = [c_void_p, c_void_p]
10301 isl.isl_map_intersect_domain_factor_domain.restype = c_void_p
10302 isl.isl_map_intersect_domain_factor_domain.argtypes = [c_void_p, c_void_p]
10303 isl.isl_map_intersect_domain_factor_range.restype = c_void_p
10304 isl.isl_map_intersect_domain_factor_range.argtypes = [c_void_p, c_void_p]
10305 isl.isl_map_intersect_domain_wrapped_domain.restype = c_void_p
10306 isl.isl_map_intersect_domain_wrapped_domain.argtypes = [c_void_p, c_void_p]
10307 isl.isl_map_intersect_params.restype = c_void_p
10308 isl.isl_map_intersect_params.argtypes = [c_void_p, c_void_p]
10309 isl.isl_map_intersect_range.restype = c_void_p
10310 isl.isl_map_intersect_range.argtypes = [c_void_p, c_void_p]
10311 isl.isl_map_intersect_range_factor_domain.restype = c_void_p
10312 isl.isl_map_intersect_range_factor_domain.argtypes = [c_void_p, c_void_p]
10313 isl.isl_map_intersect_range_factor_range.restype = c_void_p
10314 isl.isl_map_intersect_range_factor_range.argtypes = [c_void_p, c_void_p]
10315 isl.isl_map_intersect_range_wrapped_domain.restype = c_void_p
10316 isl.isl_map_intersect_range_wrapped_domain.argtypes = [c_void_p, c_void_p]
10317 isl.isl_map_is_bijective.argtypes = [c_void_p]
10318 isl.isl_map_is_disjoint.argtypes = [c_void_p, c_void_p]
10319 isl.isl_map_is_empty.argtypes = [c_void_p]
10320 isl.isl_map_is_equal.argtypes = [c_void_p, c_void_p]
10321 isl.isl_map_is_injective.argtypes = [c_void_p]
10322 isl.isl_map_is_single_valued.argtypes = [c_void_p]
10323 isl.isl_map_is_strict_subset.argtypes = [c_void_p, c_void_p]
10324 isl.isl_map_is_subset.argtypes = [c_void_p, c_void_p]
10325 isl.isl_map_lex_ge_at_multi_pw_aff.restype = c_void_p
10326 isl.isl_map_lex_ge_at_multi_pw_aff.argtypes = [c_void_p, c_void_p]
10327 isl.isl_map_lex_gt_at_multi_pw_aff.restype = c_void_p
10328 isl.isl_map_lex_gt_at_multi_pw_aff.argtypes = [c_void_p, c_void_p]
10329 isl.isl_map_lex_le_at_multi_pw_aff.restype = c_void_p
10330 isl.isl_map_lex_le_at_multi_pw_aff.argtypes = [c_void_p, c_void_p]
10331 isl.isl_map_lex_lt_at_multi_pw_aff.restype = c_void_p
10332 isl.isl_map_lex_lt_at_multi_pw_aff.argtypes = [c_void_p, c_void_p]
10333 isl.isl_map_lexmax.restype = c_void_p
10334 isl.isl_map_lexmax.argtypes = [c_void_p]
10335 isl.isl_map_lexmax_pw_multi_aff.restype = c_void_p
10336 isl.isl_map_lexmax_pw_multi_aff.argtypes = [c_void_p]
10337 isl.isl_map_lexmin.restype = c_void_p
10338 isl.isl_map_lexmin.argtypes = [c_void_p]
10339 isl.isl_map_lexmin_pw_multi_aff.restype = c_void_p
10340 isl.isl_map_lexmin_pw_multi_aff.argtypes = [c_void_p]
10341 isl.isl_map_lower_bound_multi_pw_aff.restype = c_void_p
10342 isl.isl_map_lower_bound_multi_pw_aff.argtypes = [c_void_p, c_void_p]
10343 isl.isl_map_max_multi_pw_aff.restype = c_void_p
10344 isl.isl_map_max_multi_pw_aff.argtypes = [c_void_p]
10345 isl.isl_map_min_multi_pw_aff.restype = c_void_p
10346 isl.isl_map_min_multi_pw_aff.argtypes = [c_void_p]
10347 isl.isl_map_n_basic_map.argtypes = [c_void_p]
10348 isl.isl_map_params.restype = c_void_p
10349 isl.isl_map_params.argtypes = [c_void_p]
10350 isl.isl_map_polyhedral_hull.restype = c_void_p
10351 isl.isl_map_polyhedral_hull.argtypes = [c_void_p]
10352 isl.isl_map_preimage_domain_multi_aff.restype = c_void_p
10353 isl.isl_map_preimage_domain_multi_aff.argtypes = [c_void_p, c_void_p]
10354 isl.isl_map_preimage_domain_multi_pw_aff.restype = c_void_p
10355 isl.isl_map_preimage_domain_multi_pw_aff.argtypes = [c_void_p, c_void_p]
10356 isl.isl_map_preimage_domain_pw_multi_aff.restype = c_void_p
10357 isl.isl_map_preimage_domain_pw_multi_aff.argtypes = [c_void_p, c_void_p]
10358 isl.isl_map_preimage_range_multi_aff.restype = c_void_p
10359 isl.isl_map_preimage_range_multi_aff.argtypes = [c_void_p, c_void_p]
10360 isl.isl_map_preimage_range_pw_multi_aff.restype = c_void_p
10361 isl.isl_map_preimage_range_pw_multi_aff.argtypes = [c_void_p, c_void_p]
10362 isl.isl_map_product.restype = c_void_p
10363 isl.isl_map_product.argtypes = [c_void_p, c_void_p]
10364 isl.isl_map_project_out_all_params.restype = c_void_p
10365 isl.isl_map_project_out_all_params.argtypes = [c_void_p]
10366 isl.isl_map_project_out_param_id.restype = c_void_p
10367 isl.isl_map_project_out_param_id.argtypes = [c_void_p, c_void_p]
10368 isl.isl_map_project_out_param_id_list.restype = c_void_p
10369 isl.isl_map_project_out_param_id_list.argtypes = [c_void_p, c_void_p]
10370 isl.isl_map_range.restype = c_void_p
10371 isl.isl_map_range.argtypes = [c_void_p]
10372 isl.isl_map_range_factor_domain.restype = c_void_p
10373 isl.isl_map_range_factor_domain.argtypes = [c_void_p]
10374 isl.isl_map_range_factor_range.restype = c_void_p
10375 isl.isl_map_range_factor_range.argtypes = [c_void_p]
10376 isl.isl_map_get_range_lattice_tile.restype = c_void_p
10377 isl.isl_map_get_range_lattice_tile.argtypes = [c_void_p]
10378 isl.isl_map_range_product.restype = c_void_p
10379 isl.isl_map_range_product.argtypes = [c_void_p, c_void_p]
10380 isl.isl_map_range_reverse.restype = c_void_p
10381 isl.isl_map_range_reverse.argtypes = [c_void_p]
10382 isl.isl_map_get_range_simple_fixed_box_hull.restype = c_void_p
10383 isl.isl_map_get_range_simple_fixed_box_hull.argtypes = [c_void_p]
10384 isl.isl_map_range_tuple_dim.argtypes = [c_void_p]
10385 isl.isl_map_get_range_tuple_id.restype = c_void_p
10386 isl.isl_map_get_range_tuple_id.argtypes = [c_void_p]
10387 isl.isl_map_reverse.restype = c_void_p
10388 isl.isl_map_reverse.argtypes = [c_void_p]
10389 isl.isl_map_sample.restype = c_void_p
10390 isl.isl_map_sample.argtypes = [c_void_p]
10391 isl.isl_map_set_domain_tuple_id.restype = c_void_p
10392 isl.isl_map_set_domain_tuple_id.argtypes = [c_void_p, c_void_p]
10393 isl.isl_map_set_range_tuple_id.restype = c_void_p
10394 isl.isl_map_set_range_tuple_id.argtypes = [c_void_p, c_void_p]
10395 isl.isl_map_get_space.restype = c_void_p
10396 isl.isl_map_get_space.argtypes = [c_void_p]
10397 isl.isl_map_subtract.restype = c_void_p
10398 isl.isl_map_subtract.argtypes = [c_void_p, c_void_p]
10399 isl.isl_map_to_list.restype = c_void_p
10400 isl.isl_map_to_list.argtypes = [c_void_p]
10401 isl.isl_map_to_union_map.restype = c_void_p
10402 isl.isl_map_to_union_map.argtypes = [c_void_p]
10403 isl.isl_map_uncurry.restype = c_void_p
10404 isl.isl_map_uncurry.argtypes = [c_void_p]
10405 isl.isl_map_union.restype = c_void_p
10406 isl.isl_map_union.argtypes = [c_void_p, c_void_p]
10407 isl.isl_map_universe.restype = c_void_p
10408 isl.isl_map_universe.argtypes = [c_void_p]
10409 isl.isl_map_unshifted_simple_hull.restype = c_void_p
10410 isl.isl_map_unshifted_simple_hull.argtypes = [c_void_p]
10411 isl.isl_map_upper_bound_multi_pw_aff.restype = c_void_p
10412 isl.isl_map_upper_bound_multi_pw_aff.argtypes = [c_void_p, c_void_p]
10413 isl.isl_map_wrap.restype = c_void_p
10414 isl.isl_map_wrap.argtypes = [c_void_p]
10415 isl.isl_map_zip.restype = c_void_p
10416 isl.isl_map_zip.argtypes = [c_void_p]
10417 isl.isl_map_copy.restype = c_void_p
10418 isl.isl_map_copy.argtypes = [c_void_p]
10419 isl.isl_map_free.restype = c_void_p
10420 isl.isl_map_free.argtypes = [c_void_p]
10421 isl.isl_map_to_str.restype = POINTER(c_char)
10422 isl.isl_map_to_str.argtypes = [c_void_p]
10424 class basic_map(map):
10425     def __init__(self, *args, **keywords):
10426         if "ptr" in keywords:
10427             self.ctx = keywords["ctx"]
10428             self.ptr = keywords["ptr"]
10429             return
10430         if len(args) == 1 and type(args[0]) == str:
10431             self.ctx = Context.getDefaultInstance()
10432             self.ptr = isl.isl_basic_map_read_from_str(self.ctx, args[0].encode('ascii'))
10433             return
10434         raise Error
10435     def __del__(self):
10436         if hasattr(self, 'ptr'):
10437             isl.isl_basic_map_free(self.ptr)
10438     def __str__(arg0):
10439         try:
10440             if not arg0.__class__ is basic_map:
10441                 arg0 = basic_map(arg0)
10442         except:
10443             raise
10444         ptr = isl.isl_basic_map_to_str(arg0.ptr)
10445         res = cast(ptr, c_char_p).value.decode('ascii')
10446         libc.free(ptr)
10447         return res
10448     def __repr__(self):
10449         s = str(self)
10450         if '"' in s:
10451             return 'isl.basic_map("""%s""")' % s
10452         else:
10453             return 'isl.basic_map("%s")' % s
10454     def affine_hull(arg0):
10455         try:
10456             if not arg0.__class__ is basic_map:
10457                 arg0 = basic_map(arg0)
10458         except:
10459             raise
10460         ctx = arg0.ctx
10461         res = isl.isl_basic_map_affine_hull(isl.isl_basic_map_copy(arg0.ptr))
10462         obj = basic_map(ctx=ctx, ptr=res)
10463         return obj
10464     def apply_domain(arg0, arg1):
10465         try:
10466             if not arg0.__class__ is basic_map:
10467                 arg0 = basic_map(arg0)
10468         except:
10469             raise
10470         try:
10471             if not arg1.__class__ is basic_map:
10472                 arg1 = basic_map(arg1)
10473         except:
10474             return map(arg0).apply_domain(arg1)
10475         ctx = arg0.ctx
10476         res = isl.isl_basic_map_apply_domain(isl.isl_basic_map_copy(arg0.ptr), isl.isl_basic_map_copy(arg1.ptr))
10477         obj = basic_map(ctx=ctx, ptr=res)
10478         return obj
10479     def apply_range(arg0, arg1):
10480         try:
10481             if not arg0.__class__ is basic_map:
10482                 arg0 = basic_map(arg0)
10483         except:
10484             raise
10485         try:
10486             if not arg1.__class__ is basic_map:
10487                 arg1 = basic_map(arg1)
10488         except:
10489             return map(arg0).apply_range(arg1)
10490         ctx = arg0.ctx
10491         res = isl.isl_basic_map_apply_range(isl.isl_basic_map_copy(arg0.ptr), isl.isl_basic_map_copy(arg1.ptr))
10492         obj = basic_map(ctx=ctx, ptr=res)
10493         return obj
10494     def deltas(arg0):
10495         try:
10496             if not arg0.__class__ is basic_map:
10497                 arg0 = basic_map(arg0)
10498         except:
10499             raise
10500         ctx = arg0.ctx
10501         res = isl.isl_basic_map_deltas(isl.isl_basic_map_copy(arg0.ptr))
10502         obj = basic_set(ctx=ctx, ptr=res)
10503         return obj
10504     def detect_equalities(arg0):
10505         try:
10506             if not arg0.__class__ is basic_map:
10507                 arg0 = basic_map(arg0)
10508         except:
10509             raise
10510         ctx = arg0.ctx
10511         res = isl.isl_basic_map_detect_equalities(isl.isl_basic_map_copy(arg0.ptr))
10512         obj = basic_map(ctx=ctx, ptr=res)
10513         return obj
10514     def flatten(arg0):
10515         try:
10516             if not arg0.__class__ is basic_map:
10517                 arg0 = basic_map(arg0)
10518         except:
10519             raise
10520         ctx = arg0.ctx
10521         res = isl.isl_basic_map_flatten(isl.isl_basic_map_copy(arg0.ptr))
10522         obj = basic_map(ctx=ctx, ptr=res)
10523         return obj
10524     def flatten_domain(arg0):
10525         try:
10526             if not arg0.__class__ is basic_map:
10527                 arg0 = basic_map(arg0)
10528         except:
10529             raise
10530         ctx = arg0.ctx
10531         res = isl.isl_basic_map_flatten_domain(isl.isl_basic_map_copy(arg0.ptr))
10532         obj = basic_map(ctx=ctx, ptr=res)
10533         return obj
10534     def flatten_range(arg0):
10535         try:
10536             if not arg0.__class__ is basic_map:
10537                 arg0 = basic_map(arg0)
10538         except:
10539             raise
10540         ctx = arg0.ctx
10541         res = isl.isl_basic_map_flatten_range(isl.isl_basic_map_copy(arg0.ptr))
10542         obj = basic_map(ctx=ctx, ptr=res)
10543         return obj
10544     def gist(arg0, arg1):
10545         try:
10546             if not arg0.__class__ is basic_map:
10547                 arg0 = basic_map(arg0)
10548         except:
10549             raise
10550         try:
10551             if not arg1.__class__ is basic_map:
10552                 arg1 = basic_map(arg1)
10553         except:
10554             return map(arg0).gist(arg1)
10555         ctx = arg0.ctx
10556         res = isl.isl_basic_map_gist(isl.isl_basic_map_copy(arg0.ptr), isl.isl_basic_map_copy(arg1.ptr))
10557         obj = basic_map(ctx=ctx, ptr=res)
10558         return obj
10559     def intersect(arg0, arg1):
10560         try:
10561             if not arg0.__class__ is basic_map:
10562                 arg0 = basic_map(arg0)
10563         except:
10564             raise
10565         try:
10566             if not arg1.__class__ is basic_map:
10567                 arg1 = basic_map(arg1)
10568         except:
10569             return map(arg0).intersect(arg1)
10570         ctx = arg0.ctx
10571         res = isl.isl_basic_map_intersect(isl.isl_basic_map_copy(arg0.ptr), isl.isl_basic_map_copy(arg1.ptr))
10572         obj = basic_map(ctx=ctx, ptr=res)
10573         return obj
10574     def intersect_domain(arg0, arg1):
10575         try:
10576             if not arg0.__class__ is basic_map:
10577                 arg0 = basic_map(arg0)
10578         except:
10579             raise
10580         try:
10581             if not arg1.__class__ is basic_set:
10582                 arg1 = basic_set(arg1)
10583         except:
10584             return map(arg0).intersect_domain(arg1)
10585         ctx = arg0.ctx
10586         res = isl.isl_basic_map_intersect_domain(isl.isl_basic_map_copy(arg0.ptr), isl.isl_basic_set_copy(arg1.ptr))
10587         obj = basic_map(ctx=ctx, ptr=res)
10588         return obj
10589     def intersect_params(arg0, arg1):
10590         try:
10591             if not arg0.__class__ is basic_map:
10592                 arg0 = basic_map(arg0)
10593         except:
10594             raise
10595         try:
10596             if not arg1.__class__ is basic_set:
10597                 arg1 = basic_set(arg1)
10598         except:
10599             return map(arg0).intersect_params(arg1)
10600         ctx = arg0.ctx
10601         res = isl.isl_basic_map_intersect_params(isl.isl_basic_map_copy(arg0.ptr), isl.isl_basic_set_copy(arg1.ptr))
10602         obj = basic_map(ctx=ctx, ptr=res)
10603         return obj
10604     def intersect_range(arg0, arg1):
10605         try:
10606             if not arg0.__class__ is basic_map:
10607                 arg0 = basic_map(arg0)
10608         except:
10609             raise
10610         try:
10611             if not arg1.__class__ is basic_set:
10612                 arg1 = basic_set(arg1)
10613         except:
10614             return map(arg0).intersect_range(arg1)
10615         ctx = arg0.ctx
10616         res = isl.isl_basic_map_intersect_range(isl.isl_basic_map_copy(arg0.ptr), isl.isl_basic_set_copy(arg1.ptr))
10617         obj = basic_map(ctx=ctx, ptr=res)
10618         return obj
10619     def is_empty(arg0):
10620         try:
10621             if not arg0.__class__ is basic_map:
10622                 arg0 = basic_map(arg0)
10623         except:
10624             raise
10625         ctx = arg0.ctx
10626         res = isl.isl_basic_map_is_empty(arg0.ptr)
10627         if res < 0:
10628             raise Error
10629         return bool(res)
10630     def is_equal(arg0, arg1):
10631         try:
10632             if not arg0.__class__ is basic_map:
10633                 arg0 = basic_map(arg0)
10634         except:
10635             raise
10636         try:
10637             if not arg1.__class__ is basic_map:
10638                 arg1 = basic_map(arg1)
10639         except:
10640             return map(arg0).is_equal(arg1)
10641         ctx = arg0.ctx
10642         res = isl.isl_basic_map_is_equal(arg0.ptr, arg1.ptr)
10643         if res < 0:
10644             raise Error
10645         return bool(res)
10646     def is_subset(arg0, arg1):
10647         try:
10648             if not arg0.__class__ is basic_map:
10649                 arg0 = basic_map(arg0)
10650         except:
10651             raise
10652         try:
10653             if not arg1.__class__ is basic_map:
10654                 arg1 = basic_map(arg1)
10655         except:
10656             return map(arg0).is_subset(arg1)
10657         ctx = arg0.ctx
10658         res = isl.isl_basic_map_is_subset(arg0.ptr, arg1.ptr)
10659         if res < 0:
10660             raise Error
10661         return bool(res)
10662     def lexmax(arg0):
10663         try:
10664             if not arg0.__class__ is basic_map:
10665                 arg0 = basic_map(arg0)
10666         except:
10667             raise
10668         ctx = arg0.ctx
10669         res = isl.isl_basic_map_lexmax(isl.isl_basic_map_copy(arg0.ptr))
10670         obj = map(ctx=ctx, ptr=res)
10671         return obj
10672     def lexmin(arg0):
10673         try:
10674             if not arg0.__class__ is basic_map:
10675                 arg0 = basic_map(arg0)
10676         except:
10677             raise
10678         ctx = arg0.ctx
10679         res = isl.isl_basic_map_lexmin(isl.isl_basic_map_copy(arg0.ptr))
10680         obj = map(ctx=ctx, ptr=res)
10681         return obj
10682     def reverse(arg0):
10683         try:
10684             if not arg0.__class__ is basic_map:
10685                 arg0 = basic_map(arg0)
10686         except:
10687             raise
10688         ctx = arg0.ctx
10689         res = isl.isl_basic_map_reverse(isl.isl_basic_map_copy(arg0.ptr))
10690         obj = basic_map(ctx=ctx, ptr=res)
10691         return obj
10692     def sample(arg0):
10693         try:
10694             if not arg0.__class__ is basic_map:
10695                 arg0 = basic_map(arg0)
10696         except:
10697             raise
10698         ctx = arg0.ctx
10699         res = isl.isl_basic_map_sample(isl.isl_basic_map_copy(arg0.ptr))
10700         obj = basic_map(ctx=ctx, ptr=res)
10701         return obj
10702     def union(arg0, arg1):
10703         try:
10704             if not arg0.__class__ is basic_map:
10705                 arg0 = basic_map(arg0)
10706         except:
10707             raise
10708         try:
10709             if not arg1.__class__ is basic_map:
10710                 arg1 = basic_map(arg1)
10711         except:
10712             return map(arg0).union(arg1)
10713         ctx = arg0.ctx
10714         res = isl.isl_basic_map_union(isl.isl_basic_map_copy(arg0.ptr), isl.isl_basic_map_copy(arg1.ptr))
10715         obj = map(ctx=ctx, ptr=res)
10716         return obj
10718 isl.isl_basic_map_read_from_str.restype = c_void_p
10719 isl.isl_basic_map_read_from_str.argtypes = [Context, c_char_p]
10720 isl.isl_basic_map_affine_hull.restype = c_void_p
10721 isl.isl_basic_map_affine_hull.argtypes = [c_void_p]
10722 isl.isl_basic_map_apply_domain.restype = c_void_p
10723 isl.isl_basic_map_apply_domain.argtypes = [c_void_p, c_void_p]
10724 isl.isl_basic_map_apply_range.restype = c_void_p
10725 isl.isl_basic_map_apply_range.argtypes = [c_void_p, c_void_p]
10726 isl.isl_basic_map_deltas.restype = c_void_p
10727 isl.isl_basic_map_deltas.argtypes = [c_void_p]
10728 isl.isl_basic_map_detect_equalities.restype = c_void_p
10729 isl.isl_basic_map_detect_equalities.argtypes = [c_void_p]
10730 isl.isl_basic_map_flatten.restype = c_void_p
10731 isl.isl_basic_map_flatten.argtypes = [c_void_p]
10732 isl.isl_basic_map_flatten_domain.restype = c_void_p
10733 isl.isl_basic_map_flatten_domain.argtypes = [c_void_p]
10734 isl.isl_basic_map_flatten_range.restype = c_void_p
10735 isl.isl_basic_map_flatten_range.argtypes = [c_void_p]
10736 isl.isl_basic_map_gist.restype = c_void_p
10737 isl.isl_basic_map_gist.argtypes = [c_void_p, c_void_p]
10738 isl.isl_basic_map_intersect.restype = c_void_p
10739 isl.isl_basic_map_intersect.argtypes = [c_void_p, c_void_p]
10740 isl.isl_basic_map_intersect_domain.restype = c_void_p
10741 isl.isl_basic_map_intersect_domain.argtypes = [c_void_p, c_void_p]
10742 isl.isl_basic_map_intersect_params.restype = c_void_p
10743 isl.isl_basic_map_intersect_params.argtypes = [c_void_p, c_void_p]
10744 isl.isl_basic_map_intersect_range.restype = c_void_p
10745 isl.isl_basic_map_intersect_range.argtypes = [c_void_p, c_void_p]
10746 isl.isl_basic_map_is_empty.argtypes = [c_void_p]
10747 isl.isl_basic_map_is_equal.argtypes = [c_void_p, c_void_p]
10748 isl.isl_basic_map_is_subset.argtypes = [c_void_p, c_void_p]
10749 isl.isl_basic_map_lexmax.restype = c_void_p
10750 isl.isl_basic_map_lexmax.argtypes = [c_void_p]
10751 isl.isl_basic_map_lexmin.restype = c_void_p
10752 isl.isl_basic_map_lexmin.argtypes = [c_void_p]
10753 isl.isl_basic_map_reverse.restype = c_void_p
10754 isl.isl_basic_map_reverse.argtypes = [c_void_p]
10755 isl.isl_basic_map_sample.restype = c_void_p
10756 isl.isl_basic_map_sample.argtypes = [c_void_p]
10757 isl.isl_basic_map_union.restype = c_void_p
10758 isl.isl_basic_map_union.argtypes = [c_void_p, c_void_p]
10759 isl.isl_basic_map_copy.restype = c_void_p
10760 isl.isl_basic_map_copy.argtypes = [c_void_p]
10761 isl.isl_basic_map_free.restype = c_void_p
10762 isl.isl_basic_map_free.argtypes = [c_void_p]
10763 isl.isl_basic_map_to_str.restype = POINTER(c_char)
10764 isl.isl_basic_map_to_str.argtypes = [c_void_p]
10766 class union_set(object):
10767     def __init__(self, *args, **keywords):
10768         if "ptr" in keywords:
10769             self.ctx = keywords["ctx"]
10770             self.ptr = keywords["ptr"]
10771             return
10772         if len(args) == 1 and args[0].__class__ is basic_set:
10773             self.ctx = Context.getDefaultInstance()
10774             self.ptr = isl.isl_union_set_from_basic_set(isl.isl_basic_set_copy(args[0].ptr))
10775             return
10776         if len(args) == 1 and args[0].__class__ is point:
10777             self.ctx = Context.getDefaultInstance()
10778             self.ptr = isl.isl_union_set_from_point(isl.isl_point_copy(args[0].ptr))
10779             return
10780         if len(args) == 1 and args[0].__class__ is set:
10781             self.ctx = Context.getDefaultInstance()
10782             self.ptr = isl.isl_union_set_from_set(isl.isl_set_copy(args[0].ptr))
10783             return
10784         if len(args) == 1 and type(args[0]) == str:
10785             self.ctx = Context.getDefaultInstance()
10786             self.ptr = isl.isl_union_set_read_from_str(self.ctx, args[0].encode('ascii'))
10787             return
10788         raise Error
10789     def __del__(self):
10790         if hasattr(self, 'ptr'):
10791             isl.isl_union_set_free(self.ptr)
10792     def __str__(arg0):
10793         try:
10794             if not arg0.__class__ is union_set:
10795                 arg0 = union_set(arg0)
10796         except:
10797             raise
10798         ptr = isl.isl_union_set_to_str(arg0.ptr)
10799         res = cast(ptr, c_char_p).value.decode('ascii')
10800         libc.free(ptr)
10801         return res
10802     def __repr__(self):
10803         s = str(self)
10804         if '"' in s:
10805             return 'isl.union_set("""%s""")' % s
10806         else:
10807             return 'isl.union_set("%s")' % s
10808     def affine_hull(arg0):
10809         try:
10810             if not arg0.__class__ is union_set:
10811                 arg0 = union_set(arg0)
10812         except:
10813             raise
10814         ctx = arg0.ctx
10815         res = isl.isl_union_set_affine_hull(isl.isl_union_set_copy(arg0.ptr))
10816         obj = union_set(ctx=ctx, ptr=res)
10817         return obj
10818     def apply(arg0, arg1):
10819         try:
10820             if not arg0.__class__ is union_set:
10821                 arg0 = union_set(arg0)
10822         except:
10823             raise
10824         try:
10825             if not arg1.__class__ is union_map:
10826                 arg1 = union_map(arg1)
10827         except:
10828             raise
10829         ctx = arg0.ctx
10830         res = isl.isl_union_set_apply(isl.isl_union_set_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
10831         obj = union_set(ctx=ctx, ptr=res)
10832         return obj
10833     def as_set(arg0):
10834         try:
10835             if not arg0.__class__ is union_set:
10836                 arg0 = union_set(arg0)
10837         except:
10838             raise
10839         ctx = arg0.ctx
10840         res = isl.isl_union_set_as_set(isl.isl_union_set_copy(arg0.ptr))
10841         obj = set(ctx=ctx, ptr=res)
10842         return obj
10843     def coalesce(arg0):
10844         try:
10845             if not arg0.__class__ is union_set:
10846                 arg0 = union_set(arg0)
10847         except:
10848             raise
10849         ctx = arg0.ctx
10850         res = isl.isl_union_set_coalesce(isl.isl_union_set_copy(arg0.ptr))
10851         obj = union_set(ctx=ctx, ptr=res)
10852         return obj
10853     def compute_divs(arg0):
10854         try:
10855             if not arg0.__class__ is union_set:
10856                 arg0 = union_set(arg0)
10857         except:
10858             raise
10859         ctx = arg0.ctx
10860         res = isl.isl_union_set_compute_divs(isl.isl_union_set_copy(arg0.ptr))
10861         obj = union_set(ctx=ctx, ptr=res)
10862         return obj
10863     def detect_equalities(arg0):
10864         try:
10865             if not arg0.__class__ is union_set:
10866                 arg0 = union_set(arg0)
10867         except:
10868             raise
10869         ctx = arg0.ctx
10870         res = isl.isl_union_set_detect_equalities(isl.isl_union_set_copy(arg0.ptr))
10871         obj = union_set(ctx=ctx, ptr=res)
10872         return obj
10873     def drop_unused_params(arg0):
10874         try:
10875             if not arg0.__class__ is union_set:
10876                 arg0 = union_set(arg0)
10877         except:
10878             raise
10879         ctx = arg0.ctx
10880         res = isl.isl_union_set_drop_unused_params(isl.isl_union_set_copy(arg0.ptr))
10881         obj = union_set(ctx=ctx, ptr=res)
10882         return obj
10883     @staticmethod
10884     def empty(*args):
10885         if len(args) == 0:
10886             ctx = Context.getDefaultInstance()
10887             res = isl.isl_union_set_empty_ctx(ctx)
10888             obj = union_set(ctx=ctx, ptr=res)
10889             return obj
10890         raise Error
10891     def every_set(arg0, arg1):
10892         try:
10893             if not arg0.__class__ is union_set:
10894                 arg0 = union_set(arg0)
10895         except:
10896             raise
10897         exc_info = [None]
10898         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
10899         def cb_func(cb_arg0, cb_arg1):
10900             cb_arg0 = set(ctx=arg0.ctx, ptr=isl.isl_set_copy(cb_arg0))
10901             try:
10902                 res = arg1(cb_arg0)
10903             except BaseException as e:
10904                 exc_info[0] = e
10905                 return -1
10906             return 1 if res else 0
10907         cb1 = fn(cb_func)
10908         ctx = arg0.ctx
10909         res = isl.isl_union_set_every_set(arg0.ptr, cb1, None)
10910         if exc_info[0] is not None:
10911             raise exc_info[0]
10912         if res < 0:
10913             raise Error
10914         return bool(res)
10915     def extract_set(arg0, arg1):
10916         try:
10917             if not arg0.__class__ is union_set:
10918                 arg0 = union_set(arg0)
10919         except:
10920             raise
10921         try:
10922             if not arg1.__class__ is space:
10923                 arg1 = space(arg1)
10924         except:
10925             raise
10926         ctx = arg0.ctx
10927         res = isl.isl_union_set_extract_set(arg0.ptr, isl.isl_space_copy(arg1.ptr))
10928         obj = set(ctx=ctx, ptr=res)
10929         return obj
10930     def foreach_point(arg0, arg1):
10931         try:
10932             if not arg0.__class__ is union_set:
10933                 arg0 = union_set(arg0)
10934         except:
10935             raise
10936         exc_info = [None]
10937         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
10938         def cb_func(cb_arg0, cb_arg1):
10939             cb_arg0 = point(ctx=arg0.ctx, ptr=(cb_arg0))
10940             try:
10941                 arg1(cb_arg0)
10942             except BaseException as e:
10943                 exc_info[0] = e
10944                 return -1
10945             return 0
10946         cb1 = fn(cb_func)
10947         ctx = arg0.ctx
10948         res = isl.isl_union_set_foreach_point(arg0.ptr, cb1, None)
10949         if exc_info[0] is not None:
10950             raise exc_info[0]
10951         if res < 0:
10952             raise Error
10953     def foreach_set(arg0, arg1):
10954         try:
10955             if not arg0.__class__ is union_set:
10956                 arg0 = union_set(arg0)
10957         except:
10958             raise
10959         exc_info = [None]
10960         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
10961         def cb_func(cb_arg0, cb_arg1):
10962             cb_arg0 = set(ctx=arg0.ctx, ptr=(cb_arg0))
10963             try:
10964                 arg1(cb_arg0)
10965             except BaseException as e:
10966                 exc_info[0] = e
10967                 return -1
10968             return 0
10969         cb1 = fn(cb_func)
10970         ctx = arg0.ctx
10971         res = isl.isl_union_set_foreach_set(arg0.ptr, cb1, None)
10972         if exc_info[0] is not None:
10973             raise exc_info[0]
10974         if res < 0:
10975             raise Error
10976     def gist(arg0, arg1):
10977         try:
10978             if not arg0.__class__ is union_set:
10979                 arg0 = union_set(arg0)
10980         except:
10981             raise
10982         try:
10983             if not arg1.__class__ is union_set:
10984                 arg1 = union_set(arg1)
10985         except:
10986             raise
10987         ctx = arg0.ctx
10988         res = isl.isl_union_set_gist(isl.isl_union_set_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
10989         obj = union_set(ctx=ctx, ptr=res)
10990         return obj
10991     def gist_params(arg0, arg1):
10992         try:
10993             if not arg0.__class__ is union_set:
10994                 arg0 = union_set(arg0)
10995         except:
10996             raise
10997         try:
10998             if not arg1.__class__ is set:
10999                 arg1 = set(arg1)
11000         except:
11001             raise
11002         ctx = arg0.ctx
11003         res = isl.isl_union_set_gist_params(isl.isl_union_set_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
11004         obj = union_set(ctx=ctx, ptr=res)
11005         return obj
11006     def identity(arg0):
11007         try:
11008             if not arg0.__class__ is union_set:
11009                 arg0 = union_set(arg0)
11010         except:
11011             raise
11012         ctx = arg0.ctx
11013         res = isl.isl_union_set_identity(isl.isl_union_set_copy(arg0.ptr))
11014         obj = union_map(ctx=ctx, ptr=res)
11015         return obj
11016     def intersect(arg0, arg1):
11017         try:
11018             if not arg0.__class__ is union_set:
11019                 arg0 = union_set(arg0)
11020         except:
11021             raise
11022         try:
11023             if not arg1.__class__ is union_set:
11024                 arg1 = union_set(arg1)
11025         except:
11026             raise
11027         ctx = arg0.ctx
11028         res = isl.isl_union_set_intersect(isl.isl_union_set_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
11029         obj = union_set(ctx=ctx, ptr=res)
11030         return obj
11031     def intersect_params(arg0, arg1):
11032         try:
11033             if not arg0.__class__ is union_set:
11034                 arg0 = union_set(arg0)
11035         except:
11036             raise
11037         try:
11038             if not arg1.__class__ is set:
11039                 arg1 = set(arg1)
11040         except:
11041             raise
11042         ctx = arg0.ctx
11043         res = isl.isl_union_set_intersect_params(isl.isl_union_set_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
11044         obj = union_set(ctx=ctx, ptr=res)
11045         return obj
11046     def is_disjoint(arg0, arg1):
11047         try:
11048             if not arg0.__class__ is union_set:
11049                 arg0 = union_set(arg0)
11050         except:
11051             raise
11052         try:
11053             if not arg1.__class__ is union_set:
11054                 arg1 = union_set(arg1)
11055         except:
11056             raise
11057         ctx = arg0.ctx
11058         res = isl.isl_union_set_is_disjoint(arg0.ptr, arg1.ptr)
11059         if res < 0:
11060             raise Error
11061         return bool(res)
11062     def is_empty(arg0):
11063         try:
11064             if not arg0.__class__ is union_set:
11065                 arg0 = union_set(arg0)
11066         except:
11067             raise
11068         ctx = arg0.ctx
11069         res = isl.isl_union_set_is_empty(arg0.ptr)
11070         if res < 0:
11071             raise Error
11072         return bool(res)
11073     def is_equal(arg0, arg1):
11074         try:
11075             if not arg0.__class__ is union_set:
11076                 arg0 = union_set(arg0)
11077         except:
11078             raise
11079         try:
11080             if not arg1.__class__ is union_set:
11081                 arg1 = union_set(arg1)
11082         except:
11083             raise
11084         ctx = arg0.ctx
11085         res = isl.isl_union_set_is_equal(arg0.ptr, arg1.ptr)
11086         if res < 0:
11087             raise Error
11088         return bool(res)
11089     def is_strict_subset(arg0, arg1):
11090         try:
11091             if not arg0.__class__ is union_set:
11092                 arg0 = union_set(arg0)
11093         except:
11094             raise
11095         try:
11096             if not arg1.__class__ is union_set:
11097                 arg1 = union_set(arg1)
11098         except:
11099             raise
11100         ctx = arg0.ctx
11101         res = isl.isl_union_set_is_strict_subset(arg0.ptr, arg1.ptr)
11102         if res < 0:
11103             raise Error
11104         return bool(res)
11105     def is_subset(arg0, arg1):
11106         try:
11107             if not arg0.__class__ is union_set:
11108                 arg0 = union_set(arg0)
11109         except:
11110             raise
11111         try:
11112             if not arg1.__class__ is union_set:
11113                 arg1 = union_set(arg1)
11114         except:
11115             raise
11116         ctx = arg0.ctx
11117         res = isl.isl_union_set_is_subset(arg0.ptr, arg1.ptr)
11118         if res < 0:
11119             raise Error
11120         return bool(res)
11121     def isa_set(arg0):
11122         try:
11123             if not arg0.__class__ is union_set:
11124                 arg0 = union_set(arg0)
11125         except:
11126             raise
11127         ctx = arg0.ctx
11128         res = isl.isl_union_set_isa_set(arg0.ptr)
11129         if res < 0:
11130             raise Error
11131         return bool(res)
11132     def lexmax(arg0):
11133         try:
11134             if not arg0.__class__ is union_set:
11135                 arg0 = union_set(arg0)
11136         except:
11137             raise
11138         ctx = arg0.ctx
11139         res = isl.isl_union_set_lexmax(isl.isl_union_set_copy(arg0.ptr))
11140         obj = union_set(ctx=ctx, ptr=res)
11141         return obj
11142     def lexmin(arg0):
11143         try:
11144             if not arg0.__class__ is union_set:
11145                 arg0 = union_set(arg0)
11146         except:
11147             raise
11148         ctx = arg0.ctx
11149         res = isl.isl_union_set_lexmin(isl.isl_union_set_copy(arg0.ptr))
11150         obj = union_set(ctx=ctx, ptr=res)
11151         return obj
11152     def params(arg0):
11153         try:
11154             if not arg0.__class__ is union_set:
11155                 arg0 = union_set(arg0)
11156         except:
11157             raise
11158         ctx = arg0.ctx
11159         res = isl.isl_union_set_params(isl.isl_union_set_copy(arg0.ptr))
11160         obj = set(ctx=ctx, ptr=res)
11161         return obj
11162     def polyhedral_hull(arg0):
11163         try:
11164             if not arg0.__class__ is union_set:
11165                 arg0 = union_set(arg0)
11166         except:
11167             raise
11168         ctx = arg0.ctx
11169         res = isl.isl_union_set_polyhedral_hull(isl.isl_union_set_copy(arg0.ptr))
11170         obj = union_set(ctx=ctx, ptr=res)
11171         return obj
11172     def preimage(*args):
11173         if len(args) == 2 and args[1].__class__ is multi_aff:
11174             args = list(args)
11175             try:
11176                 if not args[0].__class__ is union_set:
11177                     args[0] = union_set(args[0])
11178             except:
11179                 raise
11180             ctx = args[0].ctx
11181             res = isl.isl_union_set_preimage_multi_aff(isl.isl_union_set_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
11182             obj = union_set(ctx=ctx, ptr=res)
11183             return obj
11184         if len(args) == 2 and args[1].__class__ is pw_multi_aff:
11185             args = list(args)
11186             try:
11187                 if not args[0].__class__ is union_set:
11188                     args[0] = union_set(args[0])
11189             except:
11190                 raise
11191             ctx = args[0].ctx
11192             res = isl.isl_union_set_preimage_pw_multi_aff(isl.isl_union_set_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
11193             obj = union_set(ctx=ctx, ptr=res)
11194             return obj
11195         if len(args) == 2 and args[1].__class__ is union_pw_multi_aff:
11196             args = list(args)
11197             try:
11198                 if not args[0].__class__ is union_set:
11199                     args[0] = union_set(args[0])
11200             except:
11201                 raise
11202             ctx = args[0].ctx
11203             res = isl.isl_union_set_preimage_union_pw_multi_aff(isl.isl_union_set_copy(args[0].ptr), isl.isl_union_pw_multi_aff_copy(args[1].ptr))
11204             obj = union_set(ctx=ctx, ptr=res)
11205             return obj
11206         raise Error
11207     def project_out_all_params(arg0):
11208         try:
11209             if not arg0.__class__ is union_set:
11210                 arg0 = union_set(arg0)
11211         except:
11212             raise
11213         ctx = arg0.ctx
11214         res = isl.isl_union_set_project_out_all_params(isl.isl_union_set_copy(arg0.ptr))
11215         obj = union_set(ctx=ctx, ptr=res)
11216         return obj
11217     def sample_point(arg0):
11218         try:
11219             if not arg0.__class__ is union_set:
11220                 arg0 = union_set(arg0)
11221         except:
11222             raise
11223         ctx = arg0.ctx
11224         res = isl.isl_union_set_sample_point(isl.isl_union_set_copy(arg0.ptr))
11225         obj = point(ctx=ctx, ptr=res)
11226         return obj
11227     def set_list(arg0):
11228         try:
11229             if not arg0.__class__ is union_set:
11230                 arg0 = union_set(arg0)
11231         except:
11232             raise
11233         ctx = arg0.ctx
11234         res = isl.isl_union_set_get_set_list(arg0.ptr)
11235         obj = set_list(ctx=ctx, ptr=res)
11236         return obj
11237     def get_set_list(arg0):
11238         return arg0.set_list()
11239     def space(arg0):
11240         try:
11241             if not arg0.__class__ is union_set:
11242                 arg0 = union_set(arg0)
11243         except:
11244             raise
11245         ctx = arg0.ctx
11246         res = isl.isl_union_set_get_space(arg0.ptr)
11247         obj = space(ctx=ctx, ptr=res)
11248         return obj
11249     def get_space(arg0):
11250         return arg0.space()
11251     def subtract(arg0, arg1):
11252         try:
11253             if not arg0.__class__ is union_set:
11254                 arg0 = union_set(arg0)
11255         except:
11256             raise
11257         try:
11258             if not arg1.__class__ is union_set:
11259                 arg1 = union_set(arg1)
11260         except:
11261             raise
11262         ctx = arg0.ctx
11263         res = isl.isl_union_set_subtract(isl.isl_union_set_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
11264         obj = union_set(ctx=ctx, ptr=res)
11265         return obj
11266     def to_list(arg0):
11267         try:
11268             if not arg0.__class__ is union_set:
11269                 arg0 = union_set(arg0)
11270         except:
11271             raise
11272         ctx = arg0.ctx
11273         res = isl.isl_union_set_to_list(isl.isl_union_set_copy(arg0.ptr))
11274         obj = union_set_list(ctx=ctx, ptr=res)
11275         return obj
11276     def union(arg0, arg1):
11277         try:
11278             if not arg0.__class__ is union_set:
11279                 arg0 = union_set(arg0)
11280         except:
11281             raise
11282         try:
11283             if not arg1.__class__ is union_set:
11284                 arg1 = union_set(arg1)
11285         except:
11286             raise
11287         ctx = arg0.ctx
11288         res = isl.isl_union_set_union(isl.isl_union_set_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
11289         obj = union_set(ctx=ctx, ptr=res)
11290         return obj
11291     def universe(arg0):
11292         try:
11293             if not arg0.__class__ is union_set:
11294                 arg0 = union_set(arg0)
11295         except:
11296             raise
11297         ctx = arg0.ctx
11298         res = isl.isl_union_set_universe(isl.isl_union_set_copy(arg0.ptr))
11299         obj = union_set(ctx=ctx, ptr=res)
11300         return obj
11301     def unwrap(arg0):
11302         try:
11303             if not arg0.__class__ is union_set:
11304                 arg0 = union_set(arg0)
11305         except:
11306             raise
11307         ctx = arg0.ctx
11308         res = isl.isl_union_set_unwrap(isl.isl_union_set_copy(arg0.ptr))
11309         obj = union_map(ctx=ctx, ptr=res)
11310         return obj
11312 isl.isl_union_set_from_basic_set.restype = c_void_p
11313 isl.isl_union_set_from_basic_set.argtypes = [c_void_p]
11314 isl.isl_union_set_from_point.restype = c_void_p
11315 isl.isl_union_set_from_point.argtypes = [c_void_p]
11316 isl.isl_union_set_from_set.restype = c_void_p
11317 isl.isl_union_set_from_set.argtypes = [c_void_p]
11318 isl.isl_union_set_read_from_str.restype = c_void_p
11319 isl.isl_union_set_read_from_str.argtypes = [Context, c_char_p]
11320 isl.isl_union_set_affine_hull.restype = c_void_p
11321 isl.isl_union_set_affine_hull.argtypes = [c_void_p]
11322 isl.isl_union_set_apply.restype = c_void_p
11323 isl.isl_union_set_apply.argtypes = [c_void_p, c_void_p]
11324 isl.isl_union_set_as_set.restype = c_void_p
11325 isl.isl_union_set_as_set.argtypes = [c_void_p]
11326 isl.isl_union_set_coalesce.restype = c_void_p
11327 isl.isl_union_set_coalesce.argtypes = [c_void_p]
11328 isl.isl_union_set_compute_divs.restype = c_void_p
11329 isl.isl_union_set_compute_divs.argtypes = [c_void_p]
11330 isl.isl_union_set_detect_equalities.restype = c_void_p
11331 isl.isl_union_set_detect_equalities.argtypes = [c_void_p]
11332 isl.isl_union_set_drop_unused_params.restype = c_void_p
11333 isl.isl_union_set_drop_unused_params.argtypes = [c_void_p]
11334 isl.isl_union_set_empty_ctx.restype = c_void_p
11335 isl.isl_union_set_empty_ctx.argtypes = [Context]
11336 isl.isl_union_set_every_set.argtypes = [c_void_p, c_void_p, c_void_p]
11337 isl.isl_union_set_extract_set.restype = c_void_p
11338 isl.isl_union_set_extract_set.argtypes = [c_void_p, c_void_p]
11339 isl.isl_union_set_foreach_point.argtypes = [c_void_p, c_void_p, c_void_p]
11340 isl.isl_union_set_foreach_set.argtypes = [c_void_p, c_void_p, c_void_p]
11341 isl.isl_union_set_gist.restype = c_void_p
11342 isl.isl_union_set_gist.argtypes = [c_void_p, c_void_p]
11343 isl.isl_union_set_gist_params.restype = c_void_p
11344 isl.isl_union_set_gist_params.argtypes = [c_void_p, c_void_p]
11345 isl.isl_union_set_identity.restype = c_void_p
11346 isl.isl_union_set_identity.argtypes = [c_void_p]
11347 isl.isl_union_set_intersect.restype = c_void_p
11348 isl.isl_union_set_intersect.argtypes = [c_void_p, c_void_p]
11349 isl.isl_union_set_intersect_params.restype = c_void_p
11350 isl.isl_union_set_intersect_params.argtypes = [c_void_p, c_void_p]
11351 isl.isl_union_set_is_disjoint.argtypes = [c_void_p, c_void_p]
11352 isl.isl_union_set_is_empty.argtypes = [c_void_p]
11353 isl.isl_union_set_is_equal.argtypes = [c_void_p, c_void_p]
11354 isl.isl_union_set_is_strict_subset.argtypes = [c_void_p, c_void_p]
11355 isl.isl_union_set_is_subset.argtypes = [c_void_p, c_void_p]
11356 isl.isl_union_set_isa_set.argtypes = [c_void_p]
11357 isl.isl_union_set_lexmax.restype = c_void_p
11358 isl.isl_union_set_lexmax.argtypes = [c_void_p]
11359 isl.isl_union_set_lexmin.restype = c_void_p
11360 isl.isl_union_set_lexmin.argtypes = [c_void_p]
11361 isl.isl_union_set_params.restype = c_void_p
11362 isl.isl_union_set_params.argtypes = [c_void_p]
11363 isl.isl_union_set_polyhedral_hull.restype = c_void_p
11364 isl.isl_union_set_polyhedral_hull.argtypes = [c_void_p]
11365 isl.isl_union_set_preimage_multi_aff.restype = c_void_p
11366 isl.isl_union_set_preimage_multi_aff.argtypes = [c_void_p, c_void_p]
11367 isl.isl_union_set_preimage_pw_multi_aff.restype = c_void_p
11368 isl.isl_union_set_preimage_pw_multi_aff.argtypes = [c_void_p, c_void_p]
11369 isl.isl_union_set_preimage_union_pw_multi_aff.restype = c_void_p
11370 isl.isl_union_set_preimage_union_pw_multi_aff.argtypes = [c_void_p, c_void_p]
11371 isl.isl_union_set_project_out_all_params.restype = c_void_p
11372 isl.isl_union_set_project_out_all_params.argtypes = [c_void_p]
11373 isl.isl_union_set_sample_point.restype = c_void_p
11374 isl.isl_union_set_sample_point.argtypes = [c_void_p]
11375 isl.isl_union_set_get_set_list.restype = c_void_p
11376 isl.isl_union_set_get_set_list.argtypes = [c_void_p]
11377 isl.isl_union_set_get_space.restype = c_void_p
11378 isl.isl_union_set_get_space.argtypes = [c_void_p]
11379 isl.isl_union_set_subtract.restype = c_void_p
11380 isl.isl_union_set_subtract.argtypes = [c_void_p, c_void_p]
11381 isl.isl_union_set_to_list.restype = c_void_p
11382 isl.isl_union_set_to_list.argtypes = [c_void_p]
11383 isl.isl_union_set_union.restype = c_void_p
11384 isl.isl_union_set_union.argtypes = [c_void_p, c_void_p]
11385 isl.isl_union_set_universe.restype = c_void_p
11386 isl.isl_union_set_universe.argtypes = [c_void_p]
11387 isl.isl_union_set_unwrap.restype = c_void_p
11388 isl.isl_union_set_unwrap.argtypes = [c_void_p]
11389 isl.isl_union_set_copy.restype = c_void_p
11390 isl.isl_union_set_copy.argtypes = [c_void_p]
11391 isl.isl_union_set_free.restype = c_void_p
11392 isl.isl_union_set_free.argtypes = [c_void_p]
11393 isl.isl_union_set_to_str.restype = POINTER(c_char)
11394 isl.isl_union_set_to_str.argtypes = [c_void_p]
11396 class set(union_set):
11397     def __init__(self, *args, **keywords):
11398         if "ptr" in keywords:
11399             self.ctx = keywords["ctx"]
11400             self.ptr = keywords["ptr"]
11401             return
11402         if len(args) == 1 and args[0].__class__ is basic_set:
11403             self.ctx = Context.getDefaultInstance()
11404             self.ptr = isl.isl_set_from_basic_set(isl.isl_basic_set_copy(args[0].ptr))
11405             return
11406         if len(args) == 1 and args[0].__class__ is point:
11407             self.ctx = Context.getDefaultInstance()
11408             self.ptr = isl.isl_set_from_point(isl.isl_point_copy(args[0].ptr))
11409             return
11410         if len(args) == 1 and type(args[0]) == str:
11411             self.ctx = Context.getDefaultInstance()
11412             self.ptr = isl.isl_set_read_from_str(self.ctx, args[0].encode('ascii'))
11413             return
11414         raise Error
11415     def __del__(self):
11416         if hasattr(self, 'ptr'):
11417             isl.isl_set_free(self.ptr)
11418     def __str__(arg0):
11419         try:
11420             if not arg0.__class__ is set:
11421                 arg0 = set(arg0)
11422         except:
11423             raise
11424         ptr = isl.isl_set_to_str(arg0.ptr)
11425         res = cast(ptr, c_char_p).value.decode('ascii')
11426         libc.free(ptr)
11427         return res
11428     def __repr__(self):
11429         s = str(self)
11430         if '"' in s:
11431             return 'isl.set("""%s""")' % s
11432         else:
11433             return 'isl.set("%s")' % s
11434     def affine_hull(arg0):
11435         try:
11436             if not arg0.__class__ is set:
11437                 arg0 = set(arg0)
11438         except:
11439             raise
11440         ctx = arg0.ctx
11441         res = isl.isl_set_affine_hull(isl.isl_set_copy(arg0.ptr))
11442         obj = basic_set(ctx=ctx, ptr=res)
11443         return obj
11444     def apply(arg0, arg1):
11445         try:
11446             if not arg0.__class__ is set:
11447                 arg0 = set(arg0)
11448         except:
11449             raise
11450         try:
11451             if not arg1.__class__ is map:
11452                 arg1 = map(arg1)
11453         except:
11454             return union_set(arg0).apply(arg1)
11455         ctx = arg0.ctx
11456         res = isl.isl_set_apply(isl.isl_set_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
11457         obj = set(ctx=ctx, ptr=res)
11458         return obj
11459     def as_pw_multi_aff(arg0):
11460         try:
11461             if not arg0.__class__ is set:
11462                 arg0 = set(arg0)
11463         except:
11464             raise
11465         ctx = arg0.ctx
11466         res = isl.isl_set_as_pw_multi_aff(isl.isl_set_copy(arg0.ptr))
11467         obj = pw_multi_aff(ctx=ctx, ptr=res)
11468         return obj
11469     def bind(arg0, arg1):
11470         try:
11471             if not arg0.__class__ is set:
11472                 arg0 = set(arg0)
11473         except:
11474             raise
11475         try:
11476             if not arg1.__class__ is multi_id:
11477                 arg1 = multi_id(arg1)
11478         except:
11479             return union_set(arg0).bind(arg1)
11480         ctx = arg0.ctx
11481         res = isl.isl_set_bind(isl.isl_set_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
11482         obj = set(ctx=ctx, ptr=res)
11483         return obj
11484     def coalesce(arg0):
11485         try:
11486             if not arg0.__class__ is set:
11487                 arg0 = set(arg0)
11488         except:
11489             raise
11490         ctx = arg0.ctx
11491         res = isl.isl_set_coalesce(isl.isl_set_copy(arg0.ptr))
11492         obj = set(ctx=ctx, ptr=res)
11493         return obj
11494     def complement(arg0):
11495         try:
11496             if not arg0.__class__ is set:
11497                 arg0 = set(arg0)
11498         except:
11499             raise
11500         ctx = arg0.ctx
11501         res = isl.isl_set_complement(isl.isl_set_copy(arg0.ptr))
11502         obj = set(ctx=ctx, ptr=res)
11503         return obj
11504     def detect_equalities(arg0):
11505         try:
11506             if not arg0.__class__ is set:
11507                 arg0 = set(arg0)
11508         except:
11509             raise
11510         ctx = arg0.ctx
11511         res = isl.isl_set_detect_equalities(isl.isl_set_copy(arg0.ptr))
11512         obj = set(ctx=ctx, ptr=res)
11513         return obj
11514     def dim_max_val(arg0, arg1):
11515         try:
11516             if not arg0.__class__ is set:
11517                 arg0 = set(arg0)
11518         except:
11519             raise
11520         ctx = arg0.ctx
11521         res = isl.isl_set_dim_max_val(isl.isl_set_copy(arg0.ptr), arg1)
11522         obj = val(ctx=ctx, ptr=res)
11523         return obj
11524     def dim_min_val(arg0, arg1):
11525         try:
11526             if not arg0.__class__ is set:
11527                 arg0 = set(arg0)
11528         except:
11529             raise
11530         ctx = arg0.ctx
11531         res = isl.isl_set_dim_min_val(isl.isl_set_copy(arg0.ptr), arg1)
11532         obj = val(ctx=ctx, ptr=res)
11533         return obj
11534     def drop_unused_params(arg0):
11535         try:
11536             if not arg0.__class__ is set:
11537                 arg0 = set(arg0)
11538         except:
11539             raise
11540         ctx = arg0.ctx
11541         res = isl.isl_set_drop_unused_params(isl.isl_set_copy(arg0.ptr))
11542         obj = set(ctx=ctx, ptr=res)
11543         return obj
11544     @staticmethod
11545     def empty(arg0):
11546         try:
11547             if not arg0.__class__ is space:
11548                 arg0 = space(arg0)
11549         except:
11550             raise
11551         ctx = arg0.ctx
11552         res = isl.isl_set_empty(isl.isl_space_copy(arg0.ptr))
11553         obj = set(ctx=ctx, ptr=res)
11554         return obj
11555     def flatten(arg0):
11556         try:
11557             if not arg0.__class__ is set:
11558                 arg0 = set(arg0)
11559         except:
11560             raise
11561         ctx = arg0.ctx
11562         res = isl.isl_set_flatten(isl.isl_set_copy(arg0.ptr))
11563         obj = set(ctx=ctx, ptr=res)
11564         return obj
11565     def foreach_basic_set(arg0, arg1):
11566         try:
11567             if not arg0.__class__ is set:
11568                 arg0 = set(arg0)
11569         except:
11570             raise
11571         exc_info = [None]
11572         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
11573         def cb_func(cb_arg0, cb_arg1):
11574             cb_arg0 = basic_set(ctx=arg0.ctx, ptr=(cb_arg0))
11575             try:
11576                 arg1(cb_arg0)
11577             except BaseException as e:
11578                 exc_info[0] = e
11579                 return -1
11580             return 0
11581         cb1 = fn(cb_func)
11582         ctx = arg0.ctx
11583         res = isl.isl_set_foreach_basic_set(arg0.ptr, cb1, None)
11584         if exc_info[0] is not None:
11585             raise exc_info[0]
11586         if res < 0:
11587             raise Error
11588     def foreach_point(arg0, arg1):
11589         try:
11590             if not arg0.__class__ is set:
11591                 arg0 = set(arg0)
11592         except:
11593             raise
11594         exc_info = [None]
11595         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
11596         def cb_func(cb_arg0, cb_arg1):
11597             cb_arg0 = point(ctx=arg0.ctx, ptr=(cb_arg0))
11598             try:
11599                 arg1(cb_arg0)
11600             except BaseException as e:
11601                 exc_info[0] = e
11602                 return -1
11603             return 0
11604         cb1 = fn(cb_func)
11605         ctx = arg0.ctx
11606         res = isl.isl_set_foreach_point(arg0.ptr, cb1, None)
11607         if exc_info[0] is not None:
11608             raise exc_info[0]
11609         if res < 0:
11610             raise Error
11611     def gist(arg0, arg1):
11612         try:
11613             if not arg0.__class__ is set:
11614                 arg0 = set(arg0)
11615         except:
11616             raise
11617         try:
11618             if not arg1.__class__ is set:
11619                 arg1 = set(arg1)
11620         except:
11621             return union_set(arg0).gist(arg1)
11622         ctx = arg0.ctx
11623         res = isl.isl_set_gist(isl.isl_set_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
11624         obj = set(ctx=ctx, ptr=res)
11625         return obj
11626     def gist_params(arg0, arg1):
11627         try:
11628             if not arg0.__class__ is set:
11629                 arg0 = set(arg0)
11630         except:
11631             raise
11632         try:
11633             if not arg1.__class__ is set:
11634                 arg1 = set(arg1)
11635         except:
11636             return union_set(arg0).gist_params(arg1)
11637         ctx = arg0.ctx
11638         res = isl.isl_set_gist_params(isl.isl_set_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
11639         obj = set(ctx=ctx, ptr=res)
11640         return obj
11641     def identity(arg0):
11642         try:
11643             if not arg0.__class__ is set:
11644                 arg0 = set(arg0)
11645         except:
11646             raise
11647         ctx = arg0.ctx
11648         res = isl.isl_set_identity(isl.isl_set_copy(arg0.ptr))
11649         obj = map(ctx=ctx, ptr=res)
11650         return obj
11651     def indicator_function(arg0):
11652         try:
11653             if not arg0.__class__ is set:
11654                 arg0 = set(arg0)
11655         except:
11656             raise
11657         ctx = arg0.ctx
11658         res = isl.isl_set_indicator_function(isl.isl_set_copy(arg0.ptr))
11659         obj = pw_aff(ctx=ctx, ptr=res)
11660         return obj
11661     def insert_domain(arg0, arg1):
11662         try:
11663             if not arg0.__class__ is set:
11664                 arg0 = set(arg0)
11665         except:
11666             raise
11667         try:
11668             if not arg1.__class__ is space:
11669                 arg1 = space(arg1)
11670         except:
11671             return union_set(arg0).insert_domain(arg1)
11672         ctx = arg0.ctx
11673         res = isl.isl_set_insert_domain(isl.isl_set_copy(arg0.ptr), isl.isl_space_copy(arg1.ptr))
11674         obj = map(ctx=ctx, ptr=res)
11675         return obj
11676     def intersect(arg0, arg1):
11677         try:
11678             if not arg0.__class__ is set:
11679                 arg0 = set(arg0)
11680         except:
11681             raise
11682         try:
11683             if not arg1.__class__ is set:
11684                 arg1 = set(arg1)
11685         except:
11686             return union_set(arg0).intersect(arg1)
11687         ctx = arg0.ctx
11688         res = isl.isl_set_intersect(isl.isl_set_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
11689         obj = set(ctx=ctx, ptr=res)
11690         return obj
11691     def intersect_params(arg0, arg1):
11692         try:
11693             if not arg0.__class__ is set:
11694                 arg0 = set(arg0)
11695         except:
11696             raise
11697         try:
11698             if not arg1.__class__ is set:
11699                 arg1 = set(arg1)
11700         except:
11701             return union_set(arg0).intersect_params(arg1)
11702         ctx = arg0.ctx
11703         res = isl.isl_set_intersect_params(isl.isl_set_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
11704         obj = set(ctx=ctx, ptr=res)
11705         return obj
11706     def involves_locals(arg0):
11707         try:
11708             if not arg0.__class__ is set:
11709                 arg0 = set(arg0)
11710         except:
11711             raise
11712         ctx = arg0.ctx
11713         res = isl.isl_set_involves_locals(arg0.ptr)
11714         if res < 0:
11715             raise Error
11716         return bool(res)
11717     def is_disjoint(arg0, arg1):
11718         try:
11719             if not arg0.__class__ is set:
11720                 arg0 = set(arg0)
11721         except:
11722             raise
11723         try:
11724             if not arg1.__class__ is set:
11725                 arg1 = set(arg1)
11726         except:
11727             return union_set(arg0).is_disjoint(arg1)
11728         ctx = arg0.ctx
11729         res = isl.isl_set_is_disjoint(arg0.ptr, arg1.ptr)
11730         if res < 0:
11731             raise Error
11732         return bool(res)
11733     def is_empty(arg0):
11734         try:
11735             if not arg0.__class__ is set:
11736                 arg0 = set(arg0)
11737         except:
11738             raise
11739         ctx = arg0.ctx
11740         res = isl.isl_set_is_empty(arg0.ptr)
11741         if res < 0:
11742             raise Error
11743         return bool(res)
11744     def is_equal(arg0, arg1):
11745         try:
11746             if not arg0.__class__ is set:
11747                 arg0 = set(arg0)
11748         except:
11749             raise
11750         try:
11751             if not arg1.__class__ is set:
11752                 arg1 = set(arg1)
11753         except:
11754             return union_set(arg0).is_equal(arg1)
11755         ctx = arg0.ctx
11756         res = isl.isl_set_is_equal(arg0.ptr, arg1.ptr)
11757         if res < 0:
11758             raise Error
11759         return bool(res)
11760     def is_singleton(arg0):
11761         try:
11762             if not arg0.__class__ is set:
11763                 arg0 = set(arg0)
11764         except:
11765             raise
11766         ctx = arg0.ctx
11767         res = isl.isl_set_is_singleton(arg0.ptr)
11768         if res < 0:
11769             raise Error
11770         return bool(res)
11771     def is_strict_subset(arg0, arg1):
11772         try:
11773             if not arg0.__class__ is set:
11774                 arg0 = set(arg0)
11775         except:
11776             raise
11777         try:
11778             if not arg1.__class__ is set:
11779                 arg1 = set(arg1)
11780         except:
11781             return union_set(arg0).is_strict_subset(arg1)
11782         ctx = arg0.ctx
11783         res = isl.isl_set_is_strict_subset(arg0.ptr, arg1.ptr)
11784         if res < 0:
11785             raise Error
11786         return bool(res)
11787     def is_subset(arg0, arg1):
11788         try:
11789             if not arg0.__class__ is set:
11790                 arg0 = set(arg0)
11791         except:
11792             raise
11793         try:
11794             if not arg1.__class__ is set:
11795                 arg1 = set(arg1)
11796         except:
11797             return union_set(arg0).is_subset(arg1)
11798         ctx = arg0.ctx
11799         res = isl.isl_set_is_subset(arg0.ptr, arg1.ptr)
11800         if res < 0:
11801             raise Error
11802         return bool(res)
11803     def is_wrapping(arg0):
11804         try:
11805             if not arg0.__class__ is set:
11806                 arg0 = set(arg0)
11807         except:
11808             raise
11809         ctx = arg0.ctx
11810         res = isl.isl_set_is_wrapping(arg0.ptr)
11811         if res < 0:
11812             raise Error
11813         return bool(res)
11814     def lattice_tile(arg0):
11815         try:
11816             if not arg0.__class__ is set:
11817                 arg0 = set(arg0)
11818         except:
11819             raise
11820         ctx = arg0.ctx
11821         res = isl.isl_set_get_lattice_tile(arg0.ptr)
11822         obj = fixed_box(ctx=ctx, ptr=res)
11823         return obj
11824     def get_lattice_tile(arg0):
11825         return arg0.lattice_tile()
11826     def lexmax(arg0):
11827         try:
11828             if not arg0.__class__ is set:
11829                 arg0 = set(arg0)
11830         except:
11831             raise
11832         ctx = arg0.ctx
11833         res = isl.isl_set_lexmax(isl.isl_set_copy(arg0.ptr))
11834         obj = set(ctx=ctx, ptr=res)
11835         return obj
11836     def lexmax_pw_multi_aff(arg0):
11837         try:
11838             if not arg0.__class__ is set:
11839                 arg0 = set(arg0)
11840         except:
11841             raise
11842         ctx = arg0.ctx
11843         res = isl.isl_set_lexmax_pw_multi_aff(isl.isl_set_copy(arg0.ptr))
11844         obj = pw_multi_aff(ctx=ctx, ptr=res)
11845         return obj
11846     def lexmin(arg0):
11847         try:
11848             if not arg0.__class__ is set:
11849                 arg0 = set(arg0)
11850         except:
11851             raise
11852         ctx = arg0.ctx
11853         res = isl.isl_set_lexmin(isl.isl_set_copy(arg0.ptr))
11854         obj = set(ctx=ctx, ptr=res)
11855         return obj
11856     def lexmin_pw_multi_aff(arg0):
11857         try:
11858             if not arg0.__class__ is set:
11859                 arg0 = set(arg0)
11860         except:
11861             raise
11862         ctx = arg0.ctx
11863         res = isl.isl_set_lexmin_pw_multi_aff(isl.isl_set_copy(arg0.ptr))
11864         obj = pw_multi_aff(ctx=ctx, ptr=res)
11865         return obj
11866     def lower_bound(*args):
11867         if len(args) == 2 and args[1].__class__ is multi_pw_aff:
11868             args = list(args)
11869             try:
11870                 if not args[0].__class__ is set:
11871                     args[0] = set(args[0])
11872             except:
11873                 raise
11874             ctx = args[0].ctx
11875             res = isl.isl_set_lower_bound_multi_pw_aff(isl.isl_set_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
11876             obj = set(ctx=ctx, ptr=res)
11877             return obj
11878         if len(args) == 2 and args[1].__class__ is multi_val:
11879             args = list(args)
11880             try:
11881                 if not args[0].__class__ is set:
11882                     args[0] = set(args[0])
11883             except:
11884                 raise
11885             ctx = args[0].ctx
11886             res = isl.isl_set_lower_bound_multi_val(isl.isl_set_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
11887             obj = set(ctx=ctx, ptr=res)
11888             return obj
11889         raise Error
11890     def max_multi_pw_aff(arg0):
11891         try:
11892             if not arg0.__class__ is set:
11893                 arg0 = set(arg0)
11894         except:
11895             raise
11896         ctx = arg0.ctx
11897         res = isl.isl_set_max_multi_pw_aff(isl.isl_set_copy(arg0.ptr))
11898         obj = multi_pw_aff(ctx=ctx, ptr=res)
11899         return obj
11900     def max_val(arg0, arg1):
11901         try:
11902             if not arg0.__class__ is set:
11903                 arg0 = set(arg0)
11904         except:
11905             raise
11906         try:
11907             if not arg1.__class__ is aff:
11908                 arg1 = aff(arg1)
11909         except:
11910             return union_set(arg0).max_val(arg1)
11911         ctx = arg0.ctx
11912         res = isl.isl_set_max_val(arg0.ptr, arg1.ptr)
11913         obj = val(ctx=ctx, ptr=res)
11914         return obj
11915     def min_multi_pw_aff(arg0):
11916         try:
11917             if not arg0.__class__ is set:
11918                 arg0 = set(arg0)
11919         except:
11920             raise
11921         ctx = arg0.ctx
11922         res = isl.isl_set_min_multi_pw_aff(isl.isl_set_copy(arg0.ptr))
11923         obj = multi_pw_aff(ctx=ctx, ptr=res)
11924         return obj
11925     def min_val(arg0, arg1):
11926         try:
11927             if not arg0.__class__ is set:
11928                 arg0 = set(arg0)
11929         except:
11930             raise
11931         try:
11932             if not arg1.__class__ is aff:
11933                 arg1 = aff(arg1)
11934         except:
11935             return union_set(arg0).min_val(arg1)
11936         ctx = arg0.ctx
11937         res = isl.isl_set_min_val(arg0.ptr, arg1.ptr)
11938         obj = val(ctx=ctx, ptr=res)
11939         return obj
11940     def n_basic_set(arg0):
11941         try:
11942             if not arg0.__class__ is set:
11943                 arg0 = set(arg0)
11944         except:
11945             raise
11946         ctx = arg0.ctx
11947         res = isl.isl_set_n_basic_set(arg0.ptr)
11948         if res < 0:
11949             raise Error
11950         return int(res)
11951     def param_pw_aff_on_domain(*args):
11952         if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
11953             args = list(args)
11954             try:
11955                 if not args[0].__class__ is set:
11956                     args[0] = set(args[0])
11957             except:
11958                 raise
11959             try:
11960                 if not args[1].__class__ is id:
11961                     args[1] = id(args[1])
11962             except:
11963                 raise
11964             ctx = args[0].ctx
11965             res = isl.isl_set_param_pw_aff_on_domain_id(isl.isl_set_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
11966             obj = pw_aff(ctx=ctx, ptr=res)
11967             return obj
11968         raise Error
11969     def params(arg0):
11970         try:
11971             if not arg0.__class__ is set:
11972                 arg0 = set(arg0)
11973         except:
11974             raise
11975         ctx = arg0.ctx
11976         res = isl.isl_set_params(isl.isl_set_copy(arg0.ptr))
11977         obj = set(ctx=ctx, ptr=res)
11978         return obj
11979     def plain_multi_val_if_fixed(arg0):
11980         try:
11981             if not arg0.__class__ is set:
11982                 arg0 = set(arg0)
11983         except:
11984             raise
11985         ctx = arg0.ctx
11986         res = isl.isl_set_get_plain_multi_val_if_fixed(arg0.ptr)
11987         obj = multi_val(ctx=ctx, ptr=res)
11988         return obj
11989     def get_plain_multi_val_if_fixed(arg0):
11990         return arg0.plain_multi_val_if_fixed()
11991     def polyhedral_hull(arg0):
11992         try:
11993             if not arg0.__class__ is set:
11994                 arg0 = set(arg0)
11995         except:
11996             raise
11997         ctx = arg0.ctx
11998         res = isl.isl_set_polyhedral_hull(isl.isl_set_copy(arg0.ptr))
11999         obj = basic_set(ctx=ctx, ptr=res)
12000         return obj
12001     def preimage(*args):
12002         if len(args) == 2 and args[1].__class__ is multi_aff:
12003             args = list(args)
12004             try:
12005                 if not args[0].__class__ is set:
12006                     args[0] = set(args[0])
12007             except:
12008                 raise
12009             ctx = args[0].ctx
12010             res = isl.isl_set_preimage_multi_aff(isl.isl_set_copy(args[0].ptr), isl.isl_multi_aff_copy(args[1].ptr))
12011             obj = set(ctx=ctx, ptr=res)
12012             return obj
12013         if len(args) == 2 and args[1].__class__ is multi_pw_aff:
12014             args = list(args)
12015             try:
12016                 if not args[0].__class__ is set:
12017                     args[0] = set(args[0])
12018             except:
12019                 raise
12020             ctx = args[0].ctx
12021             res = isl.isl_set_preimage_multi_pw_aff(isl.isl_set_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
12022             obj = set(ctx=ctx, ptr=res)
12023             return obj
12024         if len(args) == 2 and args[1].__class__ is pw_multi_aff:
12025             args = list(args)
12026             try:
12027                 if not args[0].__class__ is set:
12028                     args[0] = set(args[0])
12029             except:
12030                 raise
12031             ctx = args[0].ctx
12032             res = isl.isl_set_preimage_pw_multi_aff(isl.isl_set_copy(args[0].ptr), isl.isl_pw_multi_aff_copy(args[1].ptr))
12033             obj = set(ctx=ctx, ptr=res)
12034             return obj
12035         raise Error
12036     def product(arg0, arg1):
12037         try:
12038             if not arg0.__class__ is set:
12039                 arg0 = set(arg0)
12040         except:
12041             raise
12042         try:
12043             if not arg1.__class__ is set:
12044                 arg1 = set(arg1)
12045         except:
12046             return union_set(arg0).product(arg1)
12047         ctx = arg0.ctx
12048         res = isl.isl_set_product(isl.isl_set_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
12049         obj = set(ctx=ctx, ptr=res)
12050         return obj
12051     def project_out_all_params(arg0):
12052         try:
12053             if not arg0.__class__ is set:
12054                 arg0 = set(arg0)
12055         except:
12056             raise
12057         ctx = arg0.ctx
12058         res = isl.isl_set_project_out_all_params(isl.isl_set_copy(arg0.ptr))
12059         obj = set(ctx=ctx, ptr=res)
12060         return obj
12061     def project_out_param(*args):
12062         if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
12063             args = list(args)
12064             try:
12065                 if not args[0].__class__ is set:
12066                     args[0] = set(args[0])
12067             except:
12068                 raise
12069             try:
12070                 if not args[1].__class__ is id:
12071                     args[1] = id(args[1])
12072             except:
12073                 raise
12074             ctx = args[0].ctx
12075             res = isl.isl_set_project_out_param_id(isl.isl_set_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
12076             obj = set(ctx=ctx, ptr=res)
12077             return obj
12078         if len(args) == 2 and args[1].__class__ is id_list:
12079             args = list(args)
12080             try:
12081                 if not args[0].__class__ is set:
12082                     args[0] = set(args[0])
12083             except:
12084                 raise
12085             ctx = args[0].ctx
12086             res = isl.isl_set_project_out_param_id_list(isl.isl_set_copy(args[0].ptr), isl.isl_id_list_copy(args[1].ptr))
12087             obj = set(ctx=ctx, ptr=res)
12088             return obj
12089         raise Error
12090     def pw_aff_on_domain(*args):
12091         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
12092             args = list(args)
12093             try:
12094                 if not args[0].__class__ is set:
12095                     args[0] = set(args[0])
12096             except:
12097                 raise
12098             try:
12099                 if not args[1].__class__ is val:
12100                     args[1] = val(args[1])
12101             except:
12102                 raise
12103             ctx = args[0].ctx
12104             res = isl.isl_set_pw_aff_on_domain_val(isl.isl_set_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
12105             obj = pw_aff(ctx=ctx, ptr=res)
12106             return obj
12107         raise Error
12108     def pw_multi_aff_on_domain(*args):
12109         if len(args) == 2 and args[1].__class__ is multi_val:
12110             args = list(args)
12111             try:
12112                 if not args[0].__class__ is set:
12113                     args[0] = set(args[0])
12114             except:
12115                 raise
12116             ctx = args[0].ctx
12117             res = isl.isl_set_pw_multi_aff_on_domain_multi_val(isl.isl_set_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
12118             obj = pw_multi_aff(ctx=ctx, ptr=res)
12119             return obj
12120         raise Error
12121     def sample(arg0):
12122         try:
12123             if not arg0.__class__ is set:
12124                 arg0 = set(arg0)
12125         except:
12126             raise
12127         ctx = arg0.ctx
12128         res = isl.isl_set_sample(isl.isl_set_copy(arg0.ptr))
12129         obj = basic_set(ctx=ctx, ptr=res)
12130         return obj
12131     def sample_point(arg0):
12132         try:
12133             if not arg0.__class__ is set:
12134                 arg0 = set(arg0)
12135         except:
12136             raise
12137         ctx = arg0.ctx
12138         res = isl.isl_set_sample_point(isl.isl_set_copy(arg0.ptr))
12139         obj = point(ctx=ctx, ptr=res)
12140         return obj
12141     def simple_fixed_box_hull(arg0):
12142         try:
12143             if not arg0.__class__ is set:
12144                 arg0 = set(arg0)
12145         except:
12146             raise
12147         ctx = arg0.ctx
12148         res = isl.isl_set_get_simple_fixed_box_hull(arg0.ptr)
12149         obj = fixed_box(ctx=ctx, ptr=res)
12150         return obj
12151     def get_simple_fixed_box_hull(arg0):
12152         return arg0.simple_fixed_box_hull()
12153     def space(arg0):
12154         try:
12155             if not arg0.__class__ is set:
12156                 arg0 = set(arg0)
12157         except:
12158             raise
12159         ctx = arg0.ctx
12160         res = isl.isl_set_get_space(arg0.ptr)
12161         obj = space(ctx=ctx, ptr=res)
12162         return obj
12163     def get_space(arg0):
12164         return arg0.space()
12165     def stride(arg0, arg1):
12166         try:
12167             if not arg0.__class__ is set:
12168                 arg0 = set(arg0)
12169         except:
12170             raise
12171         ctx = arg0.ctx
12172         res = isl.isl_set_get_stride(arg0.ptr, arg1)
12173         obj = val(ctx=ctx, ptr=res)
12174         return obj
12175     def get_stride(arg0, arg1):
12176         return arg0.stride(arg1)
12177     def subtract(arg0, arg1):
12178         try:
12179             if not arg0.__class__ is set:
12180                 arg0 = set(arg0)
12181         except:
12182             raise
12183         try:
12184             if not arg1.__class__ is set:
12185                 arg1 = set(arg1)
12186         except:
12187             return union_set(arg0).subtract(arg1)
12188         ctx = arg0.ctx
12189         res = isl.isl_set_subtract(isl.isl_set_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
12190         obj = set(ctx=ctx, ptr=res)
12191         return obj
12192     def to_list(arg0):
12193         try:
12194             if not arg0.__class__ is set:
12195                 arg0 = set(arg0)
12196         except:
12197             raise
12198         ctx = arg0.ctx
12199         res = isl.isl_set_to_list(isl.isl_set_copy(arg0.ptr))
12200         obj = set_list(ctx=ctx, ptr=res)
12201         return obj
12202     def to_union_set(arg0):
12203         try:
12204             if not arg0.__class__ is set:
12205                 arg0 = set(arg0)
12206         except:
12207             raise
12208         ctx = arg0.ctx
12209         res = isl.isl_set_to_union_set(isl.isl_set_copy(arg0.ptr))
12210         obj = union_set(ctx=ctx, ptr=res)
12211         return obj
12212     def translation(arg0):
12213         try:
12214             if not arg0.__class__ is set:
12215                 arg0 = set(arg0)
12216         except:
12217             raise
12218         ctx = arg0.ctx
12219         res = isl.isl_set_translation(isl.isl_set_copy(arg0.ptr))
12220         obj = map(ctx=ctx, ptr=res)
12221         return obj
12222     def tuple_dim(arg0):
12223         try:
12224             if not arg0.__class__ is set:
12225                 arg0 = set(arg0)
12226         except:
12227             raise
12228         ctx = arg0.ctx
12229         res = isl.isl_set_tuple_dim(arg0.ptr)
12230         if res < 0:
12231             raise Error
12232         return int(res)
12233     def unbind_params(arg0, arg1):
12234         try:
12235             if not arg0.__class__ is set:
12236                 arg0 = set(arg0)
12237         except:
12238             raise
12239         try:
12240             if not arg1.__class__ is multi_id:
12241                 arg1 = multi_id(arg1)
12242         except:
12243             return union_set(arg0).unbind_params(arg1)
12244         ctx = arg0.ctx
12245         res = isl.isl_set_unbind_params(isl.isl_set_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
12246         obj = set(ctx=ctx, ptr=res)
12247         return obj
12248     def unbind_params_insert_domain(arg0, arg1):
12249         try:
12250             if not arg0.__class__ is set:
12251                 arg0 = set(arg0)
12252         except:
12253             raise
12254         try:
12255             if not arg1.__class__ is multi_id:
12256                 arg1 = multi_id(arg1)
12257         except:
12258             return union_set(arg0).unbind_params_insert_domain(arg1)
12259         ctx = arg0.ctx
12260         res = isl.isl_set_unbind_params_insert_domain(isl.isl_set_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
12261         obj = map(ctx=ctx, ptr=res)
12262         return obj
12263     def union(arg0, arg1):
12264         try:
12265             if not arg0.__class__ is set:
12266                 arg0 = set(arg0)
12267         except:
12268             raise
12269         try:
12270             if not arg1.__class__ is set:
12271                 arg1 = set(arg1)
12272         except:
12273             return union_set(arg0).union(arg1)
12274         ctx = arg0.ctx
12275         res = isl.isl_set_union(isl.isl_set_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
12276         obj = set(ctx=ctx, ptr=res)
12277         return obj
12278     @staticmethod
12279     def universe(arg0):
12280         try:
12281             if not arg0.__class__ is space:
12282                 arg0 = space(arg0)
12283         except:
12284             raise
12285         ctx = arg0.ctx
12286         res = isl.isl_set_universe(isl.isl_space_copy(arg0.ptr))
12287         obj = set(ctx=ctx, ptr=res)
12288         return obj
12289     def unshifted_simple_hull(arg0):
12290         try:
12291             if not arg0.__class__ is set:
12292                 arg0 = set(arg0)
12293         except:
12294             raise
12295         ctx = arg0.ctx
12296         res = isl.isl_set_unshifted_simple_hull(isl.isl_set_copy(arg0.ptr))
12297         obj = basic_set(ctx=ctx, ptr=res)
12298         return obj
12299     def unwrap(arg0):
12300         try:
12301             if not arg0.__class__ is set:
12302                 arg0 = set(arg0)
12303         except:
12304             raise
12305         ctx = arg0.ctx
12306         res = isl.isl_set_unwrap(isl.isl_set_copy(arg0.ptr))
12307         obj = map(ctx=ctx, ptr=res)
12308         return obj
12309     def upper_bound(*args):
12310         if len(args) == 2 and args[1].__class__ is multi_pw_aff:
12311             args = list(args)
12312             try:
12313                 if not args[0].__class__ is set:
12314                     args[0] = set(args[0])
12315             except:
12316                 raise
12317             ctx = args[0].ctx
12318             res = isl.isl_set_upper_bound_multi_pw_aff(isl.isl_set_copy(args[0].ptr), isl.isl_multi_pw_aff_copy(args[1].ptr))
12319             obj = set(ctx=ctx, ptr=res)
12320             return obj
12321         if len(args) == 2 and args[1].__class__ is multi_val:
12322             args = list(args)
12323             try:
12324                 if not args[0].__class__ is set:
12325                     args[0] = set(args[0])
12326             except:
12327                 raise
12328             ctx = args[0].ctx
12329             res = isl.isl_set_upper_bound_multi_val(isl.isl_set_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
12330             obj = set(ctx=ctx, ptr=res)
12331             return obj
12332         raise Error
12333     def wrapped_reverse(arg0):
12334         try:
12335             if not arg0.__class__ is set:
12336                 arg0 = set(arg0)
12337         except:
12338             raise
12339         ctx = arg0.ctx
12340         res = isl.isl_set_wrapped_reverse(isl.isl_set_copy(arg0.ptr))
12341         obj = set(ctx=ctx, ptr=res)
12342         return obj
12344 isl.isl_set_from_basic_set.restype = c_void_p
12345 isl.isl_set_from_basic_set.argtypes = [c_void_p]
12346 isl.isl_set_from_point.restype = c_void_p
12347 isl.isl_set_from_point.argtypes = [c_void_p]
12348 isl.isl_set_read_from_str.restype = c_void_p
12349 isl.isl_set_read_from_str.argtypes = [Context, c_char_p]
12350 isl.isl_set_affine_hull.restype = c_void_p
12351 isl.isl_set_affine_hull.argtypes = [c_void_p]
12352 isl.isl_set_apply.restype = c_void_p
12353 isl.isl_set_apply.argtypes = [c_void_p, c_void_p]
12354 isl.isl_set_as_pw_multi_aff.restype = c_void_p
12355 isl.isl_set_as_pw_multi_aff.argtypes = [c_void_p]
12356 isl.isl_set_bind.restype = c_void_p
12357 isl.isl_set_bind.argtypes = [c_void_p, c_void_p]
12358 isl.isl_set_coalesce.restype = c_void_p
12359 isl.isl_set_coalesce.argtypes = [c_void_p]
12360 isl.isl_set_complement.restype = c_void_p
12361 isl.isl_set_complement.argtypes = [c_void_p]
12362 isl.isl_set_detect_equalities.restype = c_void_p
12363 isl.isl_set_detect_equalities.argtypes = [c_void_p]
12364 isl.isl_set_dim_max_val.restype = c_void_p
12365 isl.isl_set_dim_max_val.argtypes = [c_void_p, c_int]
12366 isl.isl_set_dim_min_val.restype = c_void_p
12367 isl.isl_set_dim_min_val.argtypes = [c_void_p, c_int]
12368 isl.isl_set_drop_unused_params.restype = c_void_p
12369 isl.isl_set_drop_unused_params.argtypes = [c_void_p]
12370 isl.isl_set_empty.restype = c_void_p
12371 isl.isl_set_empty.argtypes = [c_void_p]
12372 isl.isl_set_flatten.restype = c_void_p
12373 isl.isl_set_flatten.argtypes = [c_void_p]
12374 isl.isl_set_foreach_basic_set.argtypes = [c_void_p, c_void_p, c_void_p]
12375 isl.isl_set_foreach_point.argtypes = [c_void_p, c_void_p, c_void_p]
12376 isl.isl_set_gist.restype = c_void_p
12377 isl.isl_set_gist.argtypes = [c_void_p, c_void_p]
12378 isl.isl_set_gist_params.restype = c_void_p
12379 isl.isl_set_gist_params.argtypes = [c_void_p, c_void_p]
12380 isl.isl_set_identity.restype = c_void_p
12381 isl.isl_set_identity.argtypes = [c_void_p]
12382 isl.isl_set_indicator_function.restype = c_void_p
12383 isl.isl_set_indicator_function.argtypes = [c_void_p]
12384 isl.isl_set_insert_domain.restype = c_void_p
12385 isl.isl_set_insert_domain.argtypes = [c_void_p, c_void_p]
12386 isl.isl_set_intersect.restype = c_void_p
12387 isl.isl_set_intersect.argtypes = [c_void_p, c_void_p]
12388 isl.isl_set_intersect_params.restype = c_void_p
12389 isl.isl_set_intersect_params.argtypes = [c_void_p, c_void_p]
12390 isl.isl_set_involves_locals.argtypes = [c_void_p]
12391 isl.isl_set_is_disjoint.argtypes = [c_void_p, c_void_p]
12392 isl.isl_set_is_empty.argtypes = [c_void_p]
12393 isl.isl_set_is_equal.argtypes = [c_void_p, c_void_p]
12394 isl.isl_set_is_singleton.argtypes = [c_void_p]
12395 isl.isl_set_is_strict_subset.argtypes = [c_void_p, c_void_p]
12396 isl.isl_set_is_subset.argtypes = [c_void_p, c_void_p]
12397 isl.isl_set_is_wrapping.argtypes = [c_void_p]
12398 isl.isl_set_get_lattice_tile.restype = c_void_p
12399 isl.isl_set_get_lattice_tile.argtypes = [c_void_p]
12400 isl.isl_set_lexmax.restype = c_void_p
12401 isl.isl_set_lexmax.argtypes = [c_void_p]
12402 isl.isl_set_lexmax_pw_multi_aff.restype = c_void_p
12403 isl.isl_set_lexmax_pw_multi_aff.argtypes = [c_void_p]
12404 isl.isl_set_lexmin.restype = c_void_p
12405 isl.isl_set_lexmin.argtypes = [c_void_p]
12406 isl.isl_set_lexmin_pw_multi_aff.restype = c_void_p
12407 isl.isl_set_lexmin_pw_multi_aff.argtypes = [c_void_p]
12408 isl.isl_set_lower_bound_multi_pw_aff.restype = c_void_p
12409 isl.isl_set_lower_bound_multi_pw_aff.argtypes = [c_void_p, c_void_p]
12410 isl.isl_set_lower_bound_multi_val.restype = c_void_p
12411 isl.isl_set_lower_bound_multi_val.argtypes = [c_void_p, c_void_p]
12412 isl.isl_set_max_multi_pw_aff.restype = c_void_p
12413 isl.isl_set_max_multi_pw_aff.argtypes = [c_void_p]
12414 isl.isl_set_max_val.restype = c_void_p
12415 isl.isl_set_max_val.argtypes = [c_void_p, c_void_p]
12416 isl.isl_set_min_multi_pw_aff.restype = c_void_p
12417 isl.isl_set_min_multi_pw_aff.argtypes = [c_void_p]
12418 isl.isl_set_min_val.restype = c_void_p
12419 isl.isl_set_min_val.argtypes = [c_void_p, c_void_p]
12420 isl.isl_set_n_basic_set.argtypes = [c_void_p]
12421 isl.isl_set_param_pw_aff_on_domain_id.restype = c_void_p
12422 isl.isl_set_param_pw_aff_on_domain_id.argtypes = [c_void_p, c_void_p]
12423 isl.isl_set_params.restype = c_void_p
12424 isl.isl_set_params.argtypes = [c_void_p]
12425 isl.isl_set_get_plain_multi_val_if_fixed.restype = c_void_p
12426 isl.isl_set_get_plain_multi_val_if_fixed.argtypes = [c_void_p]
12427 isl.isl_set_polyhedral_hull.restype = c_void_p
12428 isl.isl_set_polyhedral_hull.argtypes = [c_void_p]
12429 isl.isl_set_preimage_multi_aff.restype = c_void_p
12430 isl.isl_set_preimage_multi_aff.argtypes = [c_void_p, c_void_p]
12431 isl.isl_set_preimage_multi_pw_aff.restype = c_void_p
12432 isl.isl_set_preimage_multi_pw_aff.argtypes = [c_void_p, c_void_p]
12433 isl.isl_set_preimage_pw_multi_aff.restype = c_void_p
12434 isl.isl_set_preimage_pw_multi_aff.argtypes = [c_void_p, c_void_p]
12435 isl.isl_set_product.restype = c_void_p
12436 isl.isl_set_product.argtypes = [c_void_p, c_void_p]
12437 isl.isl_set_project_out_all_params.restype = c_void_p
12438 isl.isl_set_project_out_all_params.argtypes = [c_void_p]
12439 isl.isl_set_project_out_param_id.restype = c_void_p
12440 isl.isl_set_project_out_param_id.argtypes = [c_void_p, c_void_p]
12441 isl.isl_set_project_out_param_id_list.restype = c_void_p
12442 isl.isl_set_project_out_param_id_list.argtypes = [c_void_p, c_void_p]
12443 isl.isl_set_pw_aff_on_domain_val.restype = c_void_p
12444 isl.isl_set_pw_aff_on_domain_val.argtypes = [c_void_p, c_void_p]
12445 isl.isl_set_pw_multi_aff_on_domain_multi_val.restype = c_void_p
12446 isl.isl_set_pw_multi_aff_on_domain_multi_val.argtypes = [c_void_p, c_void_p]
12447 isl.isl_set_sample.restype = c_void_p
12448 isl.isl_set_sample.argtypes = [c_void_p]
12449 isl.isl_set_sample_point.restype = c_void_p
12450 isl.isl_set_sample_point.argtypes = [c_void_p]
12451 isl.isl_set_get_simple_fixed_box_hull.restype = c_void_p
12452 isl.isl_set_get_simple_fixed_box_hull.argtypes = [c_void_p]
12453 isl.isl_set_get_space.restype = c_void_p
12454 isl.isl_set_get_space.argtypes = [c_void_p]
12455 isl.isl_set_get_stride.restype = c_void_p
12456 isl.isl_set_get_stride.argtypes = [c_void_p, c_int]
12457 isl.isl_set_subtract.restype = c_void_p
12458 isl.isl_set_subtract.argtypes = [c_void_p, c_void_p]
12459 isl.isl_set_to_list.restype = c_void_p
12460 isl.isl_set_to_list.argtypes = [c_void_p]
12461 isl.isl_set_to_union_set.restype = c_void_p
12462 isl.isl_set_to_union_set.argtypes = [c_void_p]
12463 isl.isl_set_translation.restype = c_void_p
12464 isl.isl_set_translation.argtypes = [c_void_p]
12465 isl.isl_set_tuple_dim.argtypes = [c_void_p]
12466 isl.isl_set_unbind_params.restype = c_void_p
12467 isl.isl_set_unbind_params.argtypes = [c_void_p, c_void_p]
12468 isl.isl_set_unbind_params_insert_domain.restype = c_void_p
12469 isl.isl_set_unbind_params_insert_domain.argtypes = [c_void_p, c_void_p]
12470 isl.isl_set_union.restype = c_void_p
12471 isl.isl_set_union.argtypes = [c_void_p, c_void_p]
12472 isl.isl_set_universe.restype = c_void_p
12473 isl.isl_set_universe.argtypes = [c_void_p]
12474 isl.isl_set_unshifted_simple_hull.restype = c_void_p
12475 isl.isl_set_unshifted_simple_hull.argtypes = [c_void_p]
12476 isl.isl_set_unwrap.restype = c_void_p
12477 isl.isl_set_unwrap.argtypes = [c_void_p]
12478 isl.isl_set_upper_bound_multi_pw_aff.restype = c_void_p
12479 isl.isl_set_upper_bound_multi_pw_aff.argtypes = [c_void_p, c_void_p]
12480 isl.isl_set_upper_bound_multi_val.restype = c_void_p
12481 isl.isl_set_upper_bound_multi_val.argtypes = [c_void_p, c_void_p]
12482 isl.isl_set_wrapped_reverse.restype = c_void_p
12483 isl.isl_set_wrapped_reverse.argtypes = [c_void_p]
12484 isl.isl_set_copy.restype = c_void_p
12485 isl.isl_set_copy.argtypes = [c_void_p]
12486 isl.isl_set_free.restype = c_void_p
12487 isl.isl_set_free.argtypes = [c_void_p]
12488 isl.isl_set_to_str.restype = POINTER(c_char)
12489 isl.isl_set_to_str.argtypes = [c_void_p]
12491 class basic_set(set):
12492     def __init__(self, *args, **keywords):
12493         if "ptr" in keywords:
12494             self.ctx = keywords["ctx"]
12495             self.ptr = keywords["ptr"]
12496             return
12497         if len(args) == 1 and args[0].__class__ is point:
12498             self.ctx = Context.getDefaultInstance()
12499             self.ptr = isl.isl_basic_set_from_point(isl.isl_point_copy(args[0].ptr))
12500             return
12501         if len(args) == 1 and type(args[0]) == str:
12502             self.ctx = Context.getDefaultInstance()
12503             self.ptr = isl.isl_basic_set_read_from_str(self.ctx, args[0].encode('ascii'))
12504             return
12505         raise Error
12506     def __del__(self):
12507         if hasattr(self, 'ptr'):
12508             isl.isl_basic_set_free(self.ptr)
12509     def __str__(arg0):
12510         try:
12511             if not arg0.__class__ is basic_set:
12512                 arg0 = basic_set(arg0)
12513         except:
12514             raise
12515         ptr = isl.isl_basic_set_to_str(arg0.ptr)
12516         res = cast(ptr, c_char_p).value.decode('ascii')
12517         libc.free(ptr)
12518         return res
12519     def __repr__(self):
12520         s = str(self)
12521         if '"' in s:
12522             return 'isl.basic_set("""%s""")' % s
12523         else:
12524             return 'isl.basic_set("%s")' % s
12525     def affine_hull(arg0):
12526         try:
12527             if not arg0.__class__ is basic_set:
12528                 arg0 = basic_set(arg0)
12529         except:
12530             raise
12531         ctx = arg0.ctx
12532         res = isl.isl_basic_set_affine_hull(isl.isl_basic_set_copy(arg0.ptr))
12533         obj = basic_set(ctx=ctx, ptr=res)
12534         return obj
12535     def apply(arg0, arg1):
12536         try:
12537             if not arg0.__class__ is basic_set:
12538                 arg0 = basic_set(arg0)
12539         except:
12540             raise
12541         try:
12542             if not arg1.__class__ is basic_map:
12543                 arg1 = basic_map(arg1)
12544         except:
12545             return set(arg0).apply(arg1)
12546         ctx = arg0.ctx
12547         res = isl.isl_basic_set_apply(isl.isl_basic_set_copy(arg0.ptr), isl.isl_basic_map_copy(arg1.ptr))
12548         obj = basic_set(ctx=ctx, ptr=res)
12549         return obj
12550     def detect_equalities(arg0):
12551         try:
12552             if not arg0.__class__ is basic_set:
12553                 arg0 = basic_set(arg0)
12554         except:
12555             raise
12556         ctx = arg0.ctx
12557         res = isl.isl_basic_set_detect_equalities(isl.isl_basic_set_copy(arg0.ptr))
12558         obj = basic_set(ctx=ctx, ptr=res)
12559         return obj
12560     def dim_max_val(arg0, arg1):
12561         try:
12562             if not arg0.__class__ is basic_set:
12563                 arg0 = basic_set(arg0)
12564         except:
12565             raise
12566         ctx = arg0.ctx
12567         res = isl.isl_basic_set_dim_max_val(isl.isl_basic_set_copy(arg0.ptr), arg1)
12568         obj = val(ctx=ctx, ptr=res)
12569         return obj
12570     def flatten(arg0):
12571         try:
12572             if not arg0.__class__ is basic_set:
12573                 arg0 = basic_set(arg0)
12574         except:
12575             raise
12576         ctx = arg0.ctx
12577         res = isl.isl_basic_set_flatten(isl.isl_basic_set_copy(arg0.ptr))
12578         obj = basic_set(ctx=ctx, ptr=res)
12579         return obj
12580     def gist(arg0, arg1):
12581         try:
12582             if not arg0.__class__ is basic_set:
12583                 arg0 = basic_set(arg0)
12584         except:
12585             raise
12586         try:
12587             if not arg1.__class__ is basic_set:
12588                 arg1 = basic_set(arg1)
12589         except:
12590             return set(arg0).gist(arg1)
12591         ctx = arg0.ctx
12592         res = isl.isl_basic_set_gist(isl.isl_basic_set_copy(arg0.ptr), isl.isl_basic_set_copy(arg1.ptr))
12593         obj = basic_set(ctx=ctx, ptr=res)
12594         return obj
12595     def intersect(arg0, arg1):
12596         try:
12597             if not arg0.__class__ is basic_set:
12598                 arg0 = basic_set(arg0)
12599         except:
12600             raise
12601         try:
12602             if not arg1.__class__ is basic_set:
12603                 arg1 = basic_set(arg1)
12604         except:
12605             return set(arg0).intersect(arg1)
12606         ctx = arg0.ctx
12607         res = isl.isl_basic_set_intersect(isl.isl_basic_set_copy(arg0.ptr), isl.isl_basic_set_copy(arg1.ptr))
12608         obj = basic_set(ctx=ctx, ptr=res)
12609         return obj
12610     def intersect_params(arg0, arg1):
12611         try:
12612             if not arg0.__class__ is basic_set:
12613                 arg0 = basic_set(arg0)
12614         except:
12615             raise
12616         try:
12617             if not arg1.__class__ is basic_set:
12618                 arg1 = basic_set(arg1)
12619         except:
12620             return set(arg0).intersect_params(arg1)
12621         ctx = arg0.ctx
12622         res = isl.isl_basic_set_intersect_params(isl.isl_basic_set_copy(arg0.ptr), isl.isl_basic_set_copy(arg1.ptr))
12623         obj = basic_set(ctx=ctx, ptr=res)
12624         return obj
12625     def is_empty(arg0):
12626         try:
12627             if not arg0.__class__ is basic_set:
12628                 arg0 = basic_set(arg0)
12629         except:
12630             raise
12631         ctx = arg0.ctx
12632         res = isl.isl_basic_set_is_empty(arg0.ptr)
12633         if res < 0:
12634             raise Error
12635         return bool(res)
12636     def is_equal(arg0, arg1):
12637         try:
12638             if not arg0.__class__ is basic_set:
12639                 arg0 = basic_set(arg0)
12640         except:
12641             raise
12642         try:
12643             if not arg1.__class__ is basic_set:
12644                 arg1 = basic_set(arg1)
12645         except:
12646             return set(arg0).is_equal(arg1)
12647         ctx = arg0.ctx
12648         res = isl.isl_basic_set_is_equal(arg0.ptr, arg1.ptr)
12649         if res < 0:
12650             raise Error
12651         return bool(res)
12652     def is_subset(arg0, arg1):
12653         try:
12654             if not arg0.__class__ is basic_set:
12655                 arg0 = basic_set(arg0)
12656         except:
12657             raise
12658         try:
12659             if not arg1.__class__ is basic_set:
12660                 arg1 = basic_set(arg1)
12661         except:
12662             return set(arg0).is_subset(arg1)
12663         ctx = arg0.ctx
12664         res = isl.isl_basic_set_is_subset(arg0.ptr, arg1.ptr)
12665         if res < 0:
12666             raise Error
12667         return bool(res)
12668     def is_wrapping(arg0):
12669         try:
12670             if not arg0.__class__ is basic_set:
12671                 arg0 = basic_set(arg0)
12672         except:
12673             raise
12674         ctx = arg0.ctx
12675         res = isl.isl_basic_set_is_wrapping(arg0.ptr)
12676         if res < 0:
12677             raise Error
12678         return bool(res)
12679     def lexmax(arg0):
12680         try:
12681             if not arg0.__class__ is basic_set:
12682                 arg0 = basic_set(arg0)
12683         except:
12684             raise
12685         ctx = arg0.ctx
12686         res = isl.isl_basic_set_lexmax(isl.isl_basic_set_copy(arg0.ptr))
12687         obj = set(ctx=ctx, ptr=res)
12688         return obj
12689     def lexmin(arg0):
12690         try:
12691             if not arg0.__class__ is basic_set:
12692                 arg0 = basic_set(arg0)
12693         except:
12694             raise
12695         ctx = arg0.ctx
12696         res = isl.isl_basic_set_lexmin(isl.isl_basic_set_copy(arg0.ptr))
12697         obj = set(ctx=ctx, ptr=res)
12698         return obj
12699     def params(arg0):
12700         try:
12701             if not arg0.__class__ is basic_set:
12702                 arg0 = basic_set(arg0)
12703         except:
12704             raise
12705         ctx = arg0.ctx
12706         res = isl.isl_basic_set_params(isl.isl_basic_set_copy(arg0.ptr))
12707         obj = basic_set(ctx=ctx, ptr=res)
12708         return obj
12709     def sample(arg0):
12710         try:
12711             if not arg0.__class__ is basic_set:
12712                 arg0 = basic_set(arg0)
12713         except:
12714             raise
12715         ctx = arg0.ctx
12716         res = isl.isl_basic_set_sample(isl.isl_basic_set_copy(arg0.ptr))
12717         obj = basic_set(ctx=ctx, ptr=res)
12718         return obj
12719     def sample_point(arg0):
12720         try:
12721             if not arg0.__class__ is basic_set:
12722                 arg0 = basic_set(arg0)
12723         except:
12724             raise
12725         ctx = arg0.ctx
12726         res = isl.isl_basic_set_sample_point(isl.isl_basic_set_copy(arg0.ptr))
12727         obj = point(ctx=ctx, ptr=res)
12728         return obj
12729     def to_set(arg0):
12730         try:
12731             if not arg0.__class__ is basic_set:
12732                 arg0 = basic_set(arg0)
12733         except:
12734             raise
12735         ctx = arg0.ctx
12736         res = isl.isl_basic_set_to_set(isl.isl_basic_set_copy(arg0.ptr))
12737         obj = set(ctx=ctx, ptr=res)
12738         return obj
12739     def union(arg0, arg1):
12740         try:
12741             if not arg0.__class__ is basic_set:
12742                 arg0 = basic_set(arg0)
12743         except:
12744             raise
12745         try:
12746             if not arg1.__class__ is basic_set:
12747                 arg1 = basic_set(arg1)
12748         except:
12749             return set(arg0).union(arg1)
12750         ctx = arg0.ctx
12751         res = isl.isl_basic_set_union(isl.isl_basic_set_copy(arg0.ptr), isl.isl_basic_set_copy(arg1.ptr))
12752         obj = set(ctx=ctx, ptr=res)
12753         return obj
12755 isl.isl_basic_set_from_point.restype = c_void_p
12756 isl.isl_basic_set_from_point.argtypes = [c_void_p]
12757 isl.isl_basic_set_read_from_str.restype = c_void_p
12758 isl.isl_basic_set_read_from_str.argtypes = [Context, c_char_p]
12759 isl.isl_basic_set_affine_hull.restype = c_void_p
12760 isl.isl_basic_set_affine_hull.argtypes = [c_void_p]
12761 isl.isl_basic_set_apply.restype = c_void_p
12762 isl.isl_basic_set_apply.argtypes = [c_void_p, c_void_p]
12763 isl.isl_basic_set_detect_equalities.restype = c_void_p
12764 isl.isl_basic_set_detect_equalities.argtypes = [c_void_p]
12765 isl.isl_basic_set_dim_max_val.restype = c_void_p
12766 isl.isl_basic_set_dim_max_val.argtypes = [c_void_p, c_int]
12767 isl.isl_basic_set_flatten.restype = c_void_p
12768 isl.isl_basic_set_flatten.argtypes = [c_void_p]
12769 isl.isl_basic_set_gist.restype = c_void_p
12770 isl.isl_basic_set_gist.argtypes = [c_void_p, c_void_p]
12771 isl.isl_basic_set_intersect.restype = c_void_p
12772 isl.isl_basic_set_intersect.argtypes = [c_void_p, c_void_p]
12773 isl.isl_basic_set_intersect_params.restype = c_void_p
12774 isl.isl_basic_set_intersect_params.argtypes = [c_void_p, c_void_p]
12775 isl.isl_basic_set_is_empty.argtypes = [c_void_p]
12776 isl.isl_basic_set_is_equal.argtypes = [c_void_p, c_void_p]
12777 isl.isl_basic_set_is_subset.argtypes = [c_void_p, c_void_p]
12778 isl.isl_basic_set_is_wrapping.argtypes = [c_void_p]
12779 isl.isl_basic_set_lexmax.restype = c_void_p
12780 isl.isl_basic_set_lexmax.argtypes = [c_void_p]
12781 isl.isl_basic_set_lexmin.restype = c_void_p
12782 isl.isl_basic_set_lexmin.argtypes = [c_void_p]
12783 isl.isl_basic_set_params.restype = c_void_p
12784 isl.isl_basic_set_params.argtypes = [c_void_p]
12785 isl.isl_basic_set_sample.restype = c_void_p
12786 isl.isl_basic_set_sample.argtypes = [c_void_p]
12787 isl.isl_basic_set_sample_point.restype = c_void_p
12788 isl.isl_basic_set_sample_point.argtypes = [c_void_p]
12789 isl.isl_basic_set_to_set.restype = c_void_p
12790 isl.isl_basic_set_to_set.argtypes = [c_void_p]
12791 isl.isl_basic_set_union.restype = c_void_p
12792 isl.isl_basic_set_union.argtypes = [c_void_p, c_void_p]
12793 isl.isl_basic_set_copy.restype = c_void_p
12794 isl.isl_basic_set_copy.argtypes = [c_void_p]
12795 isl.isl_basic_set_free.restype = c_void_p
12796 isl.isl_basic_set_free.argtypes = [c_void_p]
12797 isl.isl_basic_set_to_str.restype = POINTER(c_char)
12798 isl.isl_basic_set_to_str.argtypes = [c_void_p]
12800 class fixed_box(object):
12801     def __init__(self, *args, **keywords):
12802         if "ptr" in keywords:
12803             self.ctx = keywords["ctx"]
12804             self.ptr = keywords["ptr"]
12805             return
12806         if len(args) == 1 and type(args[0]) == str:
12807             self.ctx = Context.getDefaultInstance()
12808             self.ptr = isl.isl_fixed_box_read_from_str(self.ctx, args[0].encode('ascii'))
12809             return
12810         raise Error
12811     def __del__(self):
12812         if hasattr(self, 'ptr'):
12813             isl.isl_fixed_box_free(self.ptr)
12814     def __str__(arg0):
12815         try:
12816             if not arg0.__class__ is fixed_box:
12817                 arg0 = fixed_box(arg0)
12818         except:
12819             raise
12820         ptr = isl.isl_fixed_box_to_str(arg0.ptr)
12821         res = cast(ptr, c_char_p).value.decode('ascii')
12822         libc.free(ptr)
12823         return res
12824     def __repr__(self):
12825         s = str(self)
12826         if '"' in s:
12827             return 'isl.fixed_box("""%s""")' % s
12828         else:
12829             return 'isl.fixed_box("%s")' % s
12830     def is_valid(arg0):
12831         try:
12832             if not arg0.__class__ is fixed_box:
12833                 arg0 = fixed_box(arg0)
12834         except:
12835             raise
12836         ctx = arg0.ctx
12837         res = isl.isl_fixed_box_is_valid(arg0.ptr)
12838         if res < 0:
12839             raise Error
12840         return bool(res)
12841     def offset(arg0):
12842         try:
12843             if not arg0.__class__ is fixed_box:
12844                 arg0 = fixed_box(arg0)
12845         except:
12846             raise
12847         ctx = arg0.ctx
12848         res = isl.isl_fixed_box_get_offset(arg0.ptr)
12849         obj = multi_aff(ctx=ctx, ptr=res)
12850         return obj
12851     def get_offset(arg0):
12852         return arg0.offset()
12853     def size(arg0):
12854         try:
12855             if not arg0.__class__ is fixed_box:
12856                 arg0 = fixed_box(arg0)
12857         except:
12858             raise
12859         ctx = arg0.ctx
12860         res = isl.isl_fixed_box_get_size(arg0.ptr)
12861         obj = multi_val(ctx=ctx, ptr=res)
12862         return obj
12863     def get_size(arg0):
12864         return arg0.size()
12865     def space(arg0):
12866         try:
12867             if not arg0.__class__ is fixed_box:
12868                 arg0 = fixed_box(arg0)
12869         except:
12870             raise
12871         ctx = arg0.ctx
12872         res = isl.isl_fixed_box_get_space(arg0.ptr)
12873         obj = space(ctx=ctx, ptr=res)
12874         return obj
12875     def get_space(arg0):
12876         return arg0.space()
12878 isl.isl_fixed_box_read_from_str.restype = c_void_p
12879 isl.isl_fixed_box_read_from_str.argtypes = [Context, c_char_p]
12880 isl.isl_fixed_box_is_valid.argtypes = [c_void_p]
12881 isl.isl_fixed_box_get_offset.restype = c_void_p
12882 isl.isl_fixed_box_get_offset.argtypes = [c_void_p]
12883 isl.isl_fixed_box_get_size.restype = c_void_p
12884 isl.isl_fixed_box_get_size.argtypes = [c_void_p]
12885 isl.isl_fixed_box_get_space.restype = c_void_p
12886 isl.isl_fixed_box_get_space.argtypes = [c_void_p]
12887 isl.isl_fixed_box_copy.restype = c_void_p
12888 isl.isl_fixed_box_copy.argtypes = [c_void_p]
12889 isl.isl_fixed_box_free.restype = c_void_p
12890 isl.isl_fixed_box_free.argtypes = [c_void_p]
12891 isl.isl_fixed_box_to_str.restype = POINTER(c_char)
12892 isl.isl_fixed_box_to_str.argtypes = [c_void_p]
12894 class id(object):
12895     def __init__(self, *args, **keywords):
12896         if "ptr" in keywords:
12897             self.ctx = keywords["ctx"]
12898             self.ptr = keywords["ptr"]
12899             return
12900         if len(args) == 1 and type(args[0]) == str:
12901             self.ctx = Context.getDefaultInstance()
12902             self.ptr = isl.isl_id_read_from_str(self.ctx, args[0].encode('ascii'))
12903             return
12904         if len(args) == 2 and type(args[0]) == str:
12905             self.ctx = Context.getDefaultInstance()
12906             name = args[0].encode('ascii')
12907             self.ptr = isl.isl_id_alloc(self.ctx, name, args[1])
12908             self.ptr = isl.isl_id_set_free_user(self.ptr, Context.free_user)
12909             if self.ptr is not None:
12910                 pythonapi.Py_IncRef(py_object(args[1]))
12911             return
12912         raise Error
12913     def __del__(self):
12914         if hasattr(self, 'ptr'):
12915             isl.isl_id_free(self.ptr)
12916     def __str__(arg0):
12917         try:
12918             if not arg0.__class__ is id:
12919                 arg0 = id(arg0)
12920         except:
12921             raise
12922         ptr = isl.isl_id_to_str(arg0.ptr)
12923         res = cast(ptr, c_char_p).value.decode('ascii')
12924         libc.free(ptr)
12925         return res
12926     def __repr__(self):
12927         s = str(self)
12928         if '"' in s:
12929             return 'isl.id("""%s""")' % s
12930         else:
12931             return 'isl.id("%s")' % s
12932     def user(self):
12933         free_user = cast(Context.free_user, c_void_p)
12934         id_free_user = cast(isl.isl_id_get_free_user(self.ptr), c_void_p)
12935         if id_free_user.value != free_user.value:
12936             return None
12937         return isl.isl_id_get_user(self.ptr)
12938     def name(arg0):
12939         try:
12940             if not arg0.__class__ is id:
12941                 arg0 = id(arg0)
12942         except:
12943             raise
12944         ctx = arg0.ctx
12945         res = isl.isl_id_get_name(arg0.ptr)
12946         if res == 0:
12947             raise Error
12948         string = cast(res, c_char_p).value.decode('ascii')
12949         return string
12950     def get_name(arg0):
12951         return arg0.name()
12952     def to_list(arg0):
12953         try:
12954             if not arg0.__class__ is id:
12955                 arg0 = id(arg0)
12956         except:
12957             raise
12958         ctx = arg0.ctx
12959         res = isl.isl_id_to_list(isl.isl_id_copy(arg0.ptr))
12960         obj = id_list(ctx=ctx, ptr=res)
12961         return obj
12963 isl.isl_id_read_from_str.restype = c_void_p
12964 isl.isl_id_read_from_str.argtypes = [Context, c_char_p]
12965 isl.isl_id_get_name.restype = POINTER(c_char)
12966 isl.isl_id_get_name.argtypes = [c_void_p]
12967 isl.isl_id_to_list.restype = c_void_p
12968 isl.isl_id_to_list.argtypes = [c_void_p]
12969 isl.isl_id_copy.restype = c_void_p
12970 isl.isl_id_copy.argtypes = [c_void_p]
12971 isl.isl_id_free.restype = c_void_p
12972 isl.isl_id_free.argtypes = [c_void_p]
12973 isl.isl_id_to_str.restype = POINTER(c_char)
12974 isl.isl_id_to_str.argtypes = [c_void_p]
12976 class id_list(object):
12977     def __init__(self, *args, **keywords):
12978         if "ptr" in keywords:
12979             self.ctx = keywords["ctx"]
12980             self.ptr = keywords["ptr"]
12981             return
12982         if len(args) == 1 and type(args[0]) == int:
12983             self.ctx = Context.getDefaultInstance()
12984             self.ptr = isl.isl_id_list_alloc(self.ctx, args[0])
12985             return
12986         if len(args) == 1 and (args[0].__class__ is id or type(args[0]) == str):
12987             args = list(args)
12988             try:
12989                 if not args[0].__class__ is id:
12990                     args[0] = id(args[0])
12991             except:
12992                 raise
12993             self.ctx = Context.getDefaultInstance()
12994             self.ptr = isl.isl_id_list_from_id(isl.isl_id_copy(args[0].ptr))
12995             return
12996         if len(args) == 1 and type(args[0]) == str:
12997             self.ctx = Context.getDefaultInstance()
12998             self.ptr = isl.isl_id_list_read_from_str(self.ctx, args[0].encode('ascii'))
12999             return
13000         raise Error
13001     def __del__(self):
13002         if hasattr(self, 'ptr'):
13003             isl.isl_id_list_free(self.ptr)
13004     def __str__(arg0):
13005         try:
13006             if not arg0.__class__ is id_list:
13007                 arg0 = id_list(arg0)
13008         except:
13009             raise
13010         ptr = isl.isl_id_list_to_str(arg0.ptr)
13011         res = cast(ptr, c_char_p).value.decode('ascii')
13012         libc.free(ptr)
13013         return res
13014     def __repr__(self):
13015         s = str(self)
13016         if '"' in s:
13017             return 'isl.id_list("""%s""")' % s
13018         else:
13019             return 'isl.id_list("%s")' % s
13020     def add(arg0, arg1):
13021         try:
13022             if not arg0.__class__ is id_list:
13023                 arg0 = id_list(arg0)
13024         except:
13025             raise
13026         try:
13027             if not arg1.__class__ is id:
13028                 arg1 = id(arg1)
13029         except:
13030             raise
13031         ctx = arg0.ctx
13032         res = isl.isl_id_list_add(isl.isl_id_list_copy(arg0.ptr), isl.isl_id_copy(arg1.ptr))
13033         obj = id_list(ctx=ctx, ptr=res)
13034         return obj
13035     def at(arg0, arg1):
13036         try:
13037             if not arg0.__class__ is id_list:
13038                 arg0 = id_list(arg0)
13039         except:
13040             raise
13041         ctx = arg0.ctx
13042         res = isl.isl_id_list_get_at(arg0.ptr, arg1)
13043         obj = id(ctx=ctx, ptr=res)
13044         return obj
13045     def get_at(arg0, arg1):
13046         return arg0.at(arg1)
13047     def clear(arg0):
13048         try:
13049             if not arg0.__class__ is id_list:
13050                 arg0 = id_list(arg0)
13051         except:
13052             raise
13053         ctx = arg0.ctx
13054         res = isl.isl_id_list_clear(isl.isl_id_list_copy(arg0.ptr))
13055         obj = id_list(ctx=ctx, ptr=res)
13056         return obj
13057     def concat(arg0, arg1):
13058         try:
13059             if not arg0.__class__ is id_list:
13060                 arg0 = id_list(arg0)
13061         except:
13062             raise
13063         try:
13064             if not arg1.__class__ is id_list:
13065                 arg1 = id_list(arg1)
13066         except:
13067             raise
13068         ctx = arg0.ctx
13069         res = isl.isl_id_list_concat(isl.isl_id_list_copy(arg0.ptr), isl.isl_id_list_copy(arg1.ptr))
13070         obj = id_list(ctx=ctx, ptr=res)
13071         return obj
13072     def drop(arg0, arg1, arg2):
13073         try:
13074             if not arg0.__class__ is id_list:
13075                 arg0 = id_list(arg0)
13076         except:
13077             raise
13078         ctx = arg0.ctx
13079         res = isl.isl_id_list_drop(isl.isl_id_list_copy(arg0.ptr), arg1, arg2)
13080         obj = id_list(ctx=ctx, ptr=res)
13081         return obj
13082     def foreach(arg0, arg1):
13083         try:
13084             if not arg0.__class__ is id_list:
13085                 arg0 = id_list(arg0)
13086         except:
13087             raise
13088         exc_info = [None]
13089         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
13090         def cb_func(cb_arg0, cb_arg1):
13091             cb_arg0 = id(ctx=arg0.ctx, ptr=(cb_arg0))
13092             try:
13093                 arg1(cb_arg0)
13094             except BaseException as e:
13095                 exc_info[0] = e
13096                 return -1
13097             return 0
13098         cb1 = fn(cb_func)
13099         ctx = arg0.ctx
13100         res = isl.isl_id_list_foreach(arg0.ptr, cb1, None)
13101         if exc_info[0] is not None:
13102             raise exc_info[0]
13103         if res < 0:
13104             raise Error
13105     def foreach_scc(arg0, arg1, arg2):
13106         try:
13107             if not arg0.__class__ is id_list:
13108                 arg0 = id_list(arg0)
13109         except:
13110             raise
13111         exc_info = [None]
13112         fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
13113         def cb_func(cb_arg0, cb_arg1, cb_arg2):
13114             cb_arg0 = id(ctx=arg0.ctx, ptr=isl.isl_id_copy(cb_arg0))
13115             cb_arg1 = id(ctx=arg0.ctx, ptr=isl.isl_id_copy(cb_arg1))
13116             try:
13117                 res = arg1(cb_arg0, cb_arg1)
13118             except BaseException as e:
13119                 exc_info[0] = e
13120                 return -1
13121             return 1 if res else 0
13122         cb1 = fn(cb_func)
13123         exc_info = [None]
13124         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
13125         def cb_func(cb_arg0, cb_arg1):
13126             cb_arg0 = id_list(ctx=arg0.ctx, ptr=(cb_arg0))
13127             try:
13128                 arg2(cb_arg0)
13129             except BaseException as e:
13130                 exc_info[0] = e
13131                 return -1
13132             return 0
13133         cb2 = fn(cb_func)
13134         ctx = arg0.ctx
13135         res = isl.isl_id_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
13136         if exc_info[0] is not None:
13137             raise exc_info[0]
13138         if res < 0:
13139             raise Error
13140     def insert(arg0, arg1, arg2):
13141         try:
13142             if not arg0.__class__ is id_list:
13143                 arg0 = id_list(arg0)
13144         except:
13145             raise
13146         try:
13147             if not arg2.__class__ is id:
13148                 arg2 = id(arg2)
13149         except:
13150             raise
13151         ctx = arg0.ctx
13152         res = isl.isl_id_list_insert(isl.isl_id_list_copy(arg0.ptr), arg1, isl.isl_id_copy(arg2.ptr))
13153         obj = id_list(ctx=ctx, ptr=res)
13154         return obj
13155     def set_at(arg0, arg1, arg2):
13156         try:
13157             if not arg0.__class__ is id_list:
13158                 arg0 = id_list(arg0)
13159         except:
13160             raise
13161         try:
13162             if not arg2.__class__ is id:
13163                 arg2 = id(arg2)
13164         except:
13165             raise
13166         ctx = arg0.ctx
13167         res = isl.isl_id_list_set_at(isl.isl_id_list_copy(arg0.ptr), arg1, isl.isl_id_copy(arg2.ptr))
13168         obj = id_list(ctx=ctx, ptr=res)
13169         return obj
13170     def size(arg0):
13171         try:
13172             if not arg0.__class__ is id_list:
13173                 arg0 = id_list(arg0)
13174         except:
13175             raise
13176         ctx = arg0.ctx
13177         res = isl.isl_id_list_size(arg0.ptr)
13178         if res < 0:
13179             raise Error
13180         return int(res)
13182 isl.isl_id_list_alloc.restype = c_void_p
13183 isl.isl_id_list_alloc.argtypes = [Context, c_int]
13184 isl.isl_id_list_from_id.restype = c_void_p
13185 isl.isl_id_list_from_id.argtypes = [c_void_p]
13186 isl.isl_id_list_read_from_str.restype = c_void_p
13187 isl.isl_id_list_read_from_str.argtypes = [Context, c_char_p]
13188 isl.isl_id_list_add.restype = c_void_p
13189 isl.isl_id_list_add.argtypes = [c_void_p, c_void_p]
13190 isl.isl_id_list_get_at.restype = c_void_p
13191 isl.isl_id_list_get_at.argtypes = [c_void_p, c_int]
13192 isl.isl_id_list_clear.restype = c_void_p
13193 isl.isl_id_list_clear.argtypes = [c_void_p]
13194 isl.isl_id_list_concat.restype = c_void_p
13195 isl.isl_id_list_concat.argtypes = [c_void_p, c_void_p]
13196 isl.isl_id_list_drop.restype = c_void_p
13197 isl.isl_id_list_drop.argtypes = [c_void_p, c_int, c_int]
13198 isl.isl_id_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
13199 isl.isl_id_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
13200 isl.isl_id_list_insert.restype = c_void_p
13201 isl.isl_id_list_insert.argtypes = [c_void_p, c_int, c_void_p]
13202 isl.isl_id_list_set_at.restype = c_void_p
13203 isl.isl_id_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
13204 isl.isl_id_list_size.argtypes = [c_void_p]
13205 isl.isl_id_list_copy.restype = c_void_p
13206 isl.isl_id_list_copy.argtypes = [c_void_p]
13207 isl.isl_id_list_free.restype = c_void_p
13208 isl.isl_id_list_free.argtypes = [c_void_p]
13209 isl.isl_id_list_to_str.restype = POINTER(c_char)
13210 isl.isl_id_list_to_str.argtypes = [c_void_p]
13212 class id_to_ast_expr(object):
13213     def __init__(self, *args, **keywords):
13214         if "ptr" in keywords:
13215             self.ctx = keywords["ctx"]
13216             self.ptr = keywords["ptr"]
13217             return
13218         if len(args) == 1 and type(args[0]) == int:
13219             self.ctx = Context.getDefaultInstance()
13220             self.ptr = isl.isl_id_to_ast_expr_alloc(self.ctx, args[0])
13221             return
13222         if len(args) == 1 and type(args[0]) == str:
13223             self.ctx = Context.getDefaultInstance()
13224             self.ptr = isl.isl_id_to_ast_expr_read_from_str(self.ctx, args[0].encode('ascii'))
13225             return
13226         raise Error
13227     def __del__(self):
13228         if hasattr(self, 'ptr'):
13229             isl.isl_id_to_ast_expr_free(self.ptr)
13230     def __str__(arg0):
13231         try:
13232             if not arg0.__class__ is id_to_ast_expr:
13233                 arg0 = id_to_ast_expr(arg0)
13234         except:
13235             raise
13236         ptr = isl.isl_id_to_ast_expr_to_str(arg0.ptr)
13237         res = cast(ptr, c_char_p).value.decode('ascii')
13238         libc.free(ptr)
13239         return res
13240     def __repr__(self):
13241         s = str(self)
13242         if '"' in s:
13243             return 'isl.id_to_ast_expr("""%s""")' % s
13244         else:
13245             return 'isl.id_to_ast_expr("%s")' % s
13246     def is_equal(arg0, arg1):
13247         try:
13248             if not arg0.__class__ is id_to_ast_expr:
13249                 arg0 = id_to_ast_expr(arg0)
13250         except:
13251             raise
13252         try:
13253             if not arg1.__class__ is id_to_ast_expr:
13254                 arg1 = id_to_ast_expr(arg1)
13255         except:
13256             raise
13257         ctx = arg0.ctx
13258         res = isl.isl_id_to_ast_expr_is_equal(arg0.ptr, arg1.ptr)
13259         if res < 0:
13260             raise Error
13261         return bool(res)
13262     def set(arg0, arg1, arg2):
13263         try:
13264             if not arg0.__class__ is id_to_ast_expr:
13265                 arg0 = id_to_ast_expr(arg0)
13266         except:
13267             raise
13268         try:
13269             if not arg1.__class__ is id:
13270                 arg1 = id(arg1)
13271         except:
13272             raise
13273         try:
13274             if not arg2.__class__ is ast_expr:
13275                 arg2 = ast_expr(arg2)
13276         except:
13277             raise
13278         ctx = arg0.ctx
13279         res = isl.isl_id_to_ast_expr_set(isl.isl_id_to_ast_expr_copy(arg0.ptr), isl.isl_id_copy(arg1.ptr), isl.isl_ast_expr_copy(arg2.ptr))
13280         obj = id_to_ast_expr(ctx=ctx, ptr=res)
13281         return obj
13283 isl.isl_id_to_ast_expr_alloc.restype = c_void_p
13284 isl.isl_id_to_ast_expr_alloc.argtypes = [Context, c_int]
13285 isl.isl_id_to_ast_expr_read_from_str.restype = c_void_p
13286 isl.isl_id_to_ast_expr_read_from_str.argtypes = [Context, c_char_p]
13287 isl.isl_id_to_ast_expr_is_equal.argtypes = [c_void_p, c_void_p]
13288 isl.isl_id_to_ast_expr_set.restype = c_void_p
13289 isl.isl_id_to_ast_expr_set.argtypes = [c_void_p, c_void_p, c_void_p]
13290 isl.isl_id_to_ast_expr_copy.restype = c_void_p
13291 isl.isl_id_to_ast_expr_copy.argtypes = [c_void_p]
13292 isl.isl_id_to_ast_expr_free.restype = c_void_p
13293 isl.isl_id_to_ast_expr_free.argtypes = [c_void_p]
13294 isl.isl_id_to_ast_expr_to_str.restype = POINTER(c_char)
13295 isl.isl_id_to_ast_expr_to_str.argtypes = [c_void_p]
13297 class id_to_id(object):
13298     def __init__(self, *args, **keywords):
13299         if "ptr" in keywords:
13300             self.ctx = keywords["ctx"]
13301             self.ptr = keywords["ptr"]
13302             return
13303         if len(args) == 1 and type(args[0]) == int:
13304             self.ctx = Context.getDefaultInstance()
13305             self.ptr = isl.isl_id_to_id_alloc(self.ctx, args[0])
13306             return
13307         if len(args) == 1 and type(args[0]) == str:
13308             self.ctx = Context.getDefaultInstance()
13309             self.ptr = isl.isl_id_to_id_read_from_str(self.ctx, args[0].encode('ascii'))
13310             return
13311         raise Error
13312     def __del__(self):
13313         if hasattr(self, 'ptr'):
13314             isl.isl_id_to_id_free(self.ptr)
13315     def __str__(arg0):
13316         try:
13317             if not arg0.__class__ is id_to_id:
13318                 arg0 = id_to_id(arg0)
13319         except:
13320             raise
13321         ptr = isl.isl_id_to_id_to_str(arg0.ptr)
13322         res = cast(ptr, c_char_p).value.decode('ascii')
13323         libc.free(ptr)
13324         return res
13325     def __repr__(self):
13326         s = str(self)
13327         if '"' in s:
13328             return 'isl.id_to_id("""%s""")' % s
13329         else:
13330             return 'isl.id_to_id("%s")' % s
13331     def is_equal(arg0, arg1):
13332         try:
13333             if not arg0.__class__ is id_to_id:
13334                 arg0 = id_to_id(arg0)
13335         except:
13336             raise
13337         try:
13338             if not arg1.__class__ is id_to_id:
13339                 arg1 = id_to_id(arg1)
13340         except:
13341             raise
13342         ctx = arg0.ctx
13343         res = isl.isl_id_to_id_is_equal(arg0.ptr, arg1.ptr)
13344         if res < 0:
13345             raise Error
13346         return bool(res)
13347     def set(arg0, arg1, arg2):
13348         try:
13349             if not arg0.__class__ is id_to_id:
13350                 arg0 = id_to_id(arg0)
13351         except:
13352             raise
13353         try:
13354             if not arg1.__class__ is id:
13355                 arg1 = id(arg1)
13356         except:
13357             raise
13358         try:
13359             if not arg2.__class__ is id:
13360                 arg2 = id(arg2)
13361         except:
13362             raise
13363         ctx = arg0.ctx
13364         res = isl.isl_id_to_id_set(isl.isl_id_to_id_copy(arg0.ptr), isl.isl_id_copy(arg1.ptr), isl.isl_id_copy(arg2.ptr))
13365         obj = id_to_id(ctx=ctx, ptr=res)
13366         return obj
13368 isl.isl_id_to_id_alloc.restype = c_void_p
13369 isl.isl_id_to_id_alloc.argtypes = [Context, c_int]
13370 isl.isl_id_to_id_read_from_str.restype = c_void_p
13371 isl.isl_id_to_id_read_from_str.argtypes = [Context, c_char_p]
13372 isl.isl_id_to_id_is_equal.argtypes = [c_void_p, c_void_p]
13373 isl.isl_id_to_id_set.restype = c_void_p
13374 isl.isl_id_to_id_set.argtypes = [c_void_p, c_void_p, c_void_p]
13375 isl.isl_id_to_id_copy.restype = c_void_p
13376 isl.isl_id_to_id_copy.argtypes = [c_void_p]
13377 isl.isl_id_to_id_free.restype = c_void_p
13378 isl.isl_id_to_id_free.argtypes = [c_void_p]
13379 isl.isl_id_to_id_to_str.restype = POINTER(c_char)
13380 isl.isl_id_to_id_to_str.argtypes = [c_void_p]
13382 class map_list(object):
13383     def __init__(self, *args, **keywords):
13384         if "ptr" in keywords:
13385             self.ctx = keywords["ctx"]
13386             self.ptr = keywords["ptr"]
13387             return
13388         if len(args) == 1 and type(args[0]) == int:
13389             self.ctx = Context.getDefaultInstance()
13390             self.ptr = isl.isl_map_list_alloc(self.ctx, args[0])
13391             return
13392         if len(args) == 1 and args[0].__class__ is map:
13393             self.ctx = Context.getDefaultInstance()
13394             self.ptr = isl.isl_map_list_from_map(isl.isl_map_copy(args[0].ptr))
13395             return
13396         if len(args) == 1 and type(args[0]) == str:
13397             self.ctx = Context.getDefaultInstance()
13398             self.ptr = isl.isl_map_list_read_from_str(self.ctx, args[0].encode('ascii'))
13399             return
13400         raise Error
13401     def __del__(self):
13402         if hasattr(self, 'ptr'):
13403             isl.isl_map_list_free(self.ptr)
13404     def __str__(arg0):
13405         try:
13406             if not arg0.__class__ is map_list:
13407                 arg0 = map_list(arg0)
13408         except:
13409             raise
13410         ptr = isl.isl_map_list_to_str(arg0.ptr)
13411         res = cast(ptr, c_char_p).value.decode('ascii')
13412         libc.free(ptr)
13413         return res
13414     def __repr__(self):
13415         s = str(self)
13416         if '"' in s:
13417             return 'isl.map_list("""%s""")' % s
13418         else:
13419             return 'isl.map_list("%s")' % s
13420     def add(arg0, arg1):
13421         try:
13422             if not arg0.__class__ is map_list:
13423                 arg0 = map_list(arg0)
13424         except:
13425             raise
13426         try:
13427             if not arg1.__class__ is map:
13428                 arg1 = map(arg1)
13429         except:
13430             raise
13431         ctx = arg0.ctx
13432         res = isl.isl_map_list_add(isl.isl_map_list_copy(arg0.ptr), isl.isl_map_copy(arg1.ptr))
13433         obj = map_list(ctx=ctx, ptr=res)
13434         return obj
13435     def at(arg0, arg1):
13436         try:
13437             if not arg0.__class__ is map_list:
13438                 arg0 = map_list(arg0)
13439         except:
13440             raise
13441         ctx = arg0.ctx
13442         res = isl.isl_map_list_get_at(arg0.ptr, arg1)
13443         obj = map(ctx=ctx, ptr=res)
13444         return obj
13445     def get_at(arg0, arg1):
13446         return arg0.at(arg1)
13447     def clear(arg0):
13448         try:
13449             if not arg0.__class__ is map_list:
13450                 arg0 = map_list(arg0)
13451         except:
13452             raise
13453         ctx = arg0.ctx
13454         res = isl.isl_map_list_clear(isl.isl_map_list_copy(arg0.ptr))
13455         obj = map_list(ctx=ctx, ptr=res)
13456         return obj
13457     def concat(arg0, arg1):
13458         try:
13459             if not arg0.__class__ is map_list:
13460                 arg0 = map_list(arg0)
13461         except:
13462             raise
13463         try:
13464             if not arg1.__class__ is map_list:
13465                 arg1 = map_list(arg1)
13466         except:
13467             raise
13468         ctx = arg0.ctx
13469         res = isl.isl_map_list_concat(isl.isl_map_list_copy(arg0.ptr), isl.isl_map_list_copy(arg1.ptr))
13470         obj = map_list(ctx=ctx, ptr=res)
13471         return obj
13472     def drop(arg0, arg1, arg2):
13473         try:
13474             if not arg0.__class__ is map_list:
13475                 arg0 = map_list(arg0)
13476         except:
13477             raise
13478         ctx = arg0.ctx
13479         res = isl.isl_map_list_drop(isl.isl_map_list_copy(arg0.ptr), arg1, arg2)
13480         obj = map_list(ctx=ctx, ptr=res)
13481         return obj
13482     def foreach(arg0, arg1):
13483         try:
13484             if not arg0.__class__ is map_list:
13485                 arg0 = map_list(arg0)
13486         except:
13487             raise
13488         exc_info = [None]
13489         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
13490         def cb_func(cb_arg0, cb_arg1):
13491             cb_arg0 = map(ctx=arg0.ctx, ptr=(cb_arg0))
13492             try:
13493                 arg1(cb_arg0)
13494             except BaseException as e:
13495                 exc_info[0] = e
13496                 return -1
13497             return 0
13498         cb1 = fn(cb_func)
13499         ctx = arg0.ctx
13500         res = isl.isl_map_list_foreach(arg0.ptr, cb1, None)
13501         if exc_info[0] is not None:
13502             raise exc_info[0]
13503         if res < 0:
13504             raise Error
13505     def foreach_scc(arg0, arg1, arg2):
13506         try:
13507             if not arg0.__class__ is map_list:
13508                 arg0 = map_list(arg0)
13509         except:
13510             raise
13511         exc_info = [None]
13512         fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
13513         def cb_func(cb_arg0, cb_arg1, cb_arg2):
13514             cb_arg0 = map(ctx=arg0.ctx, ptr=isl.isl_map_copy(cb_arg0))
13515             cb_arg1 = map(ctx=arg0.ctx, ptr=isl.isl_map_copy(cb_arg1))
13516             try:
13517                 res = arg1(cb_arg0, cb_arg1)
13518             except BaseException as e:
13519                 exc_info[0] = e
13520                 return -1
13521             return 1 if res else 0
13522         cb1 = fn(cb_func)
13523         exc_info = [None]
13524         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
13525         def cb_func(cb_arg0, cb_arg1):
13526             cb_arg0 = map_list(ctx=arg0.ctx, ptr=(cb_arg0))
13527             try:
13528                 arg2(cb_arg0)
13529             except BaseException as e:
13530                 exc_info[0] = e
13531                 return -1
13532             return 0
13533         cb2 = fn(cb_func)
13534         ctx = arg0.ctx
13535         res = isl.isl_map_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
13536         if exc_info[0] is not None:
13537             raise exc_info[0]
13538         if res < 0:
13539             raise Error
13540     def insert(arg0, arg1, arg2):
13541         try:
13542             if not arg0.__class__ is map_list:
13543                 arg0 = map_list(arg0)
13544         except:
13545             raise
13546         try:
13547             if not arg2.__class__ is map:
13548                 arg2 = map(arg2)
13549         except:
13550             raise
13551         ctx = arg0.ctx
13552         res = isl.isl_map_list_insert(isl.isl_map_list_copy(arg0.ptr), arg1, isl.isl_map_copy(arg2.ptr))
13553         obj = map_list(ctx=ctx, ptr=res)
13554         return obj
13555     def set_at(arg0, arg1, arg2):
13556         try:
13557             if not arg0.__class__ is map_list:
13558                 arg0 = map_list(arg0)
13559         except:
13560             raise
13561         try:
13562             if not arg2.__class__ is map:
13563                 arg2 = map(arg2)
13564         except:
13565             raise
13566         ctx = arg0.ctx
13567         res = isl.isl_map_list_set_at(isl.isl_map_list_copy(arg0.ptr), arg1, isl.isl_map_copy(arg2.ptr))
13568         obj = map_list(ctx=ctx, ptr=res)
13569         return obj
13570     def size(arg0):
13571         try:
13572             if not arg0.__class__ is map_list:
13573                 arg0 = map_list(arg0)
13574         except:
13575             raise
13576         ctx = arg0.ctx
13577         res = isl.isl_map_list_size(arg0.ptr)
13578         if res < 0:
13579             raise Error
13580         return int(res)
13582 isl.isl_map_list_alloc.restype = c_void_p
13583 isl.isl_map_list_alloc.argtypes = [Context, c_int]
13584 isl.isl_map_list_from_map.restype = c_void_p
13585 isl.isl_map_list_from_map.argtypes = [c_void_p]
13586 isl.isl_map_list_read_from_str.restype = c_void_p
13587 isl.isl_map_list_read_from_str.argtypes = [Context, c_char_p]
13588 isl.isl_map_list_add.restype = c_void_p
13589 isl.isl_map_list_add.argtypes = [c_void_p, c_void_p]
13590 isl.isl_map_list_get_at.restype = c_void_p
13591 isl.isl_map_list_get_at.argtypes = [c_void_p, c_int]
13592 isl.isl_map_list_clear.restype = c_void_p
13593 isl.isl_map_list_clear.argtypes = [c_void_p]
13594 isl.isl_map_list_concat.restype = c_void_p
13595 isl.isl_map_list_concat.argtypes = [c_void_p, c_void_p]
13596 isl.isl_map_list_drop.restype = c_void_p
13597 isl.isl_map_list_drop.argtypes = [c_void_p, c_int, c_int]
13598 isl.isl_map_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
13599 isl.isl_map_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
13600 isl.isl_map_list_insert.restype = c_void_p
13601 isl.isl_map_list_insert.argtypes = [c_void_p, c_int, c_void_p]
13602 isl.isl_map_list_set_at.restype = c_void_p
13603 isl.isl_map_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
13604 isl.isl_map_list_size.argtypes = [c_void_p]
13605 isl.isl_map_list_copy.restype = c_void_p
13606 isl.isl_map_list_copy.argtypes = [c_void_p]
13607 isl.isl_map_list_free.restype = c_void_p
13608 isl.isl_map_list_free.argtypes = [c_void_p]
13609 isl.isl_map_list_to_str.restype = POINTER(c_char)
13610 isl.isl_map_list_to_str.argtypes = [c_void_p]
13612 class multi_id(object):
13613     def __init__(self, *args, **keywords):
13614         if "ptr" in keywords:
13615             self.ctx = keywords["ctx"]
13616             self.ptr = keywords["ptr"]
13617             return
13618         if len(args) == 2 and args[0].__class__ is space and args[1].__class__ is id_list:
13619             self.ctx = Context.getDefaultInstance()
13620             self.ptr = isl.isl_multi_id_from_id_list(isl.isl_space_copy(args[0].ptr), isl.isl_id_list_copy(args[1].ptr))
13621             return
13622         if len(args) == 1 and type(args[0]) == str:
13623             self.ctx = Context.getDefaultInstance()
13624             self.ptr = isl.isl_multi_id_read_from_str(self.ctx, args[0].encode('ascii'))
13625             return
13626         raise Error
13627     def __del__(self):
13628         if hasattr(self, 'ptr'):
13629             isl.isl_multi_id_free(self.ptr)
13630     def __str__(arg0):
13631         try:
13632             if not arg0.__class__ is multi_id:
13633                 arg0 = multi_id(arg0)
13634         except:
13635             raise
13636         ptr = isl.isl_multi_id_to_str(arg0.ptr)
13637         res = cast(ptr, c_char_p).value.decode('ascii')
13638         libc.free(ptr)
13639         return res
13640     def __repr__(self):
13641         s = str(self)
13642         if '"' in s:
13643             return 'isl.multi_id("""%s""")' % s
13644         else:
13645             return 'isl.multi_id("%s")' % s
13646     def at(arg0, arg1):
13647         try:
13648             if not arg0.__class__ is multi_id:
13649                 arg0 = multi_id(arg0)
13650         except:
13651             raise
13652         ctx = arg0.ctx
13653         res = isl.isl_multi_id_get_at(arg0.ptr, arg1)
13654         obj = id(ctx=ctx, ptr=res)
13655         return obj
13656     def get_at(arg0, arg1):
13657         return arg0.at(arg1)
13658     def flat_range_product(arg0, arg1):
13659         try:
13660             if not arg0.__class__ is multi_id:
13661                 arg0 = multi_id(arg0)
13662         except:
13663             raise
13664         try:
13665             if not arg1.__class__ is multi_id:
13666                 arg1 = multi_id(arg1)
13667         except:
13668             raise
13669         ctx = arg0.ctx
13670         res = isl.isl_multi_id_flat_range_product(isl.isl_multi_id_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
13671         obj = multi_id(ctx=ctx, ptr=res)
13672         return obj
13673     def list(arg0):
13674         try:
13675             if not arg0.__class__ is multi_id:
13676                 arg0 = multi_id(arg0)
13677         except:
13678             raise
13679         ctx = arg0.ctx
13680         res = isl.isl_multi_id_get_list(arg0.ptr)
13681         obj = id_list(ctx=ctx, ptr=res)
13682         return obj
13683     def get_list(arg0):
13684         return arg0.list()
13685     def plain_is_equal(arg0, arg1):
13686         try:
13687             if not arg0.__class__ is multi_id:
13688                 arg0 = multi_id(arg0)
13689         except:
13690             raise
13691         try:
13692             if not arg1.__class__ is multi_id:
13693                 arg1 = multi_id(arg1)
13694         except:
13695             raise
13696         ctx = arg0.ctx
13697         res = isl.isl_multi_id_plain_is_equal(arg0.ptr, arg1.ptr)
13698         if res < 0:
13699             raise Error
13700         return bool(res)
13701     def range_product(arg0, arg1):
13702         try:
13703             if not arg0.__class__ is multi_id:
13704                 arg0 = multi_id(arg0)
13705         except:
13706             raise
13707         try:
13708             if not arg1.__class__ is multi_id:
13709                 arg1 = multi_id(arg1)
13710         except:
13711             raise
13712         ctx = arg0.ctx
13713         res = isl.isl_multi_id_range_product(isl.isl_multi_id_copy(arg0.ptr), isl.isl_multi_id_copy(arg1.ptr))
13714         obj = multi_id(ctx=ctx, ptr=res)
13715         return obj
13716     def set_at(arg0, arg1, arg2):
13717         try:
13718             if not arg0.__class__ is multi_id:
13719                 arg0 = multi_id(arg0)
13720         except:
13721             raise
13722         try:
13723             if not arg2.__class__ is id:
13724                 arg2 = id(arg2)
13725         except:
13726             raise
13727         ctx = arg0.ctx
13728         res = isl.isl_multi_id_set_at(isl.isl_multi_id_copy(arg0.ptr), arg1, isl.isl_id_copy(arg2.ptr))
13729         obj = multi_id(ctx=ctx, ptr=res)
13730         return obj
13731     def size(arg0):
13732         try:
13733             if not arg0.__class__ is multi_id:
13734                 arg0 = multi_id(arg0)
13735         except:
13736             raise
13737         ctx = arg0.ctx
13738         res = isl.isl_multi_id_size(arg0.ptr)
13739         if res < 0:
13740             raise Error
13741         return int(res)
13742     def space(arg0):
13743         try:
13744             if not arg0.__class__ is multi_id:
13745                 arg0 = multi_id(arg0)
13746         except:
13747             raise
13748         ctx = arg0.ctx
13749         res = isl.isl_multi_id_get_space(arg0.ptr)
13750         obj = space(ctx=ctx, ptr=res)
13751         return obj
13752     def get_space(arg0):
13753         return arg0.space()
13755 isl.isl_multi_id_from_id_list.restype = c_void_p
13756 isl.isl_multi_id_from_id_list.argtypes = [c_void_p, c_void_p]
13757 isl.isl_multi_id_read_from_str.restype = c_void_p
13758 isl.isl_multi_id_read_from_str.argtypes = [Context, c_char_p]
13759 isl.isl_multi_id_get_at.restype = c_void_p
13760 isl.isl_multi_id_get_at.argtypes = [c_void_p, c_int]
13761 isl.isl_multi_id_flat_range_product.restype = c_void_p
13762 isl.isl_multi_id_flat_range_product.argtypes = [c_void_p, c_void_p]
13763 isl.isl_multi_id_get_list.restype = c_void_p
13764 isl.isl_multi_id_get_list.argtypes = [c_void_p]
13765 isl.isl_multi_id_plain_is_equal.argtypes = [c_void_p, c_void_p]
13766 isl.isl_multi_id_range_product.restype = c_void_p
13767 isl.isl_multi_id_range_product.argtypes = [c_void_p, c_void_p]
13768 isl.isl_multi_id_set_at.restype = c_void_p
13769 isl.isl_multi_id_set_at.argtypes = [c_void_p, c_int, c_void_p]
13770 isl.isl_multi_id_size.argtypes = [c_void_p]
13771 isl.isl_multi_id_get_space.restype = c_void_p
13772 isl.isl_multi_id_get_space.argtypes = [c_void_p]
13773 isl.isl_multi_id_copy.restype = c_void_p
13774 isl.isl_multi_id_copy.argtypes = [c_void_p]
13775 isl.isl_multi_id_free.restype = c_void_p
13776 isl.isl_multi_id_free.argtypes = [c_void_p]
13777 isl.isl_multi_id_to_str.restype = POINTER(c_char)
13778 isl.isl_multi_id_to_str.argtypes = [c_void_p]
13780 class multi_val(object):
13781     def __init__(self, *args, **keywords):
13782         if "ptr" in keywords:
13783             self.ctx = keywords["ctx"]
13784             self.ptr = keywords["ptr"]
13785             return
13786         if len(args) == 2 and args[0].__class__ is space and args[1].__class__ is val_list:
13787             self.ctx = Context.getDefaultInstance()
13788             self.ptr = isl.isl_multi_val_from_val_list(isl.isl_space_copy(args[0].ptr), isl.isl_val_list_copy(args[1].ptr))
13789             return
13790         if len(args) == 1 and type(args[0]) == str:
13791             self.ctx = Context.getDefaultInstance()
13792             self.ptr = isl.isl_multi_val_read_from_str(self.ctx, args[0].encode('ascii'))
13793             return
13794         raise Error
13795     def __del__(self):
13796         if hasattr(self, 'ptr'):
13797             isl.isl_multi_val_free(self.ptr)
13798     def __str__(arg0):
13799         try:
13800             if not arg0.__class__ is multi_val:
13801                 arg0 = multi_val(arg0)
13802         except:
13803             raise
13804         ptr = isl.isl_multi_val_to_str(arg0.ptr)
13805         res = cast(ptr, c_char_p).value.decode('ascii')
13806         libc.free(ptr)
13807         return res
13808     def __repr__(self):
13809         s = str(self)
13810         if '"' in s:
13811             return 'isl.multi_val("""%s""")' % s
13812         else:
13813             return 'isl.multi_val("%s")' % s
13814     def add(*args):
13815         if len(args) == 2 and args[1].__class__ is multi_val:
13816             args = list(args)
13817             try:
13818                 if not args[0].__class__ is multi_val:
13819                     args[0] = multi_val(args[0])
13820             except:
13821                 raise
13822             ctx = args[0].ctx
13823             res = isl.isl_multi_val_add(isl.isl_multi_val_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
13824             obj = multi_val(ctx=ctx, ptr=res)
13825             return obj
13826         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
13827             args = list(args)
13828             try:
13829                 if not args[0].__class__ is multi_val:
13830                     args[0] = multi_val(args[0])
13831             except:
13832                 raise
13833             try:
13834                 if not args[1].__class__ is val:
13835                     args[1] = val(args[1])
13836             except:
13837                 raise
13838             ctx = args[0].ctx
13839             res = isl.isl_multi_val_add_val(isl.isl_multi_val_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
13840             obj = multi_val(ctx=ctx, ptr=res)
13841             return obj
13842         raise Error
13843     def at(arg0, arg1):
13844         try:
13845             if not arg0.__class__ is multi_val:
13846                 arg0 = multi_val(arg0)
13847         except:
13848             raise
13849         ctx = arg0.ctx
13850         res = isl.isl_multi_val_get_at(arg0.ptr, arg1)
13851         obj = val(ctx=ctx, ptr=res)
13852         return obj
13853     def get_at(arg0, arg1):
13854         return arg0.at(arg1)
13855     def flat_range_product(arg0, arg1):
13856         try:
13857             if not arg0.__class__ is multi_val:
13858                 arg0 = multi_val(arg0)
13859         except:
13860             raise
13861         try:
13862             if not arg1.__class__ is multi_val:
13863                 arg1 = multi_val(arg1)
13864         except:
13865             raise
13866         ctx = arg0.ctx
13867         res = isl.isl_multi_val_flat_range_product(isl.isl_multi_val_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
13868         obj = multi_val(ctx=ctx, ptr=res)
13869         return obj
13870     def has_range_tuple_id(arg0):
13871         try:
13872             if not arg0.__class__ is multi_val:
13873                 arg0 = multi_val(arg0)
13874         except:
13875             raise
13876         ctx = arg0.ctx
13877         res = isl.isl_multi_val_has_range_tuple_id(arg0.ptr)
13878         if res < 0:
13879             raise Error
13880         return bool(res)
13881     def involves_nan(arg0):
13882         try:
13883             if not arg0.__class__ is multi_val:
13884                 arg0 = multi_val(arg0)
13885         except:
13886             raise
13887         ctx = arg0.ctx
13888         res = isl.isl_multi_val_involves_nan(arg0.ptr)
13889         if res < 0:
13890             raise Error
13891         return bool(res)
13892     def list(arg0):
13893         try:
13894             if not arg0.__class__ is multi_val:
13895                 arg0 = multi_val(arg0)
13896         except:
13897             raise
13898         ctx = arg0.ctx
13899         res = isl.isl_multi_val_get_list(arg0.ptr)
13900         obj = val_list(ctx=ctx, ptr=res)
13901         return obj
13902     def get_list(arg0):
13903         return arg0.list()
13904     def max(arg0, arg1):
13905         try:
13906             if not arg0.__class__ is multi_val:
13907                 arg0 = multi_val(arg0)
13908         except:
13909             raise
13910         try:
13911             if not arg1.__class__ is multi_val:
13912                 arg1 = multi_val(arg1)
13913         except:
13914             raise
13915         ctx = arg0.ctx
13916         res = isl.isl_multi_val_max(isl.isl_multi_val_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
13917         obj = multi_val(ctx=ctx, ptr=res)
13918         return obj
13919     def min(arg0, arg1):
13920         try:
13921             if not arg0.__class__ is multi_val:
13922                 arg0 = multi_val(arg0)
13923         except:
13924             raise
13925         try:
13926             if not arg1.__class__ is multi_val:
13927                 arg1 = multi_val(arg1)
13928         except:
13929             raise
13930         ctx = arg0.ctx
13931         res = isl.isl_multi_val_min(isl.isl_multi_val_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
13932         obj = multi_val(ctx=ctx, ptr=res)
13933         return obj
13934     def neg(arg0):
13935         try:
13936             if not arg0.__class__ is multi_val:
13937                 arg0 = multi_val(arg0)
13938         except:
13939             raise
13940         ctx = arg0.ctx
13941         res = isl.isl_multi_val_neg(isl.isl_multi_val_copy(arg0.ptr))
13942         obj = multi_val(ctx=ctx, ptr=res)
13943         return obj
13944     def plain_is_equal(arg0, arg1):
13945         try:
13946             if not arg0.__class__ is multi_val:
13947                 arg0 = multi_val(arg0)
13948         except:
13949             raise
13950         try:
13951             if not arg1.__class__ is multi_val:
13952                 arg1 = multi_val(arg1)
13953         except:
13954             raise
13955         ctx = arg0.ctx
13956         res = isl.isl_multi_val_plain_is_equal(arg0.ptr, arg1.ptr)
13957         if res < 0:
13958             raise Error
13959         return bool(res)
13960     def product(arg0, arg1):
13961         try:
13962             if not arg0.__class__ is multi_val:
13963                 arg0 = multi_val(arg0)
13964         except:
13965             raise
13966         try:
13967             if not arg1.__class__ is multi_val:
13968                 arg1 = multi_val(arg1)
13969         except:
13970             raise
13971         ctx = arg0.ctx
13972         res = isl.isl_multi_val_product(isl.isl_multi_val_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
13973         obj = multi_val(ctx=ctx, ptr=res)
13974         return obj
13975     def range_product(arg0, arg1):
13976         try:
13977             if not arg0.__class__ is multi_val:
13978                 arg0 = multi_val(arg0)
13979         except:
13980             raise
13981         try:
13982             if not arg1.__class__ is multi_val:
13983                 arg1 = multi_val(arg1)
13984         except:
13985             raise
13986         ctx = arg0.ctx
13987         res = isl.isl_multi_val_range_product(isl.isl_multi_val_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
13988         obj = multi_val(ctx=ctx, ptr=res)
13989         return obj
13990     def range_tuple_id(arg0):
13991         try:
13992             if not arg0.__class__ is multi_val:
13993                 arg0 = multi_val(arg0)
13994         except:
13995             raise
13996         ctx = arg0.ctx
13997         res = isl.isl_multi_val_get_range_tuple_id(arg0.ptr)
13998         obj = id(ctx=ctx, ptr=res)
13999         return obj
14000     def get_range_tuple_id(arg0):
14001         return arg0.range_tuple_id()
14002     def reset_range_tuple_id(arg0):
14003         try:
14004             if not arg0.__class__ is multi_val:
14005                 arg0 = multi_val(arg0)
14006         except:
14007             raise
14008         ctx = arg0.ctx
14009         res = isl.isl_multi_val_reset_range_tuple_id(isl.isl_multi_val_copy(arg0.ptr))
14010         obj = multi_val(ctx=ctx, ptr=res)
14011         return obj
14012     def scale(*args):
14013         if len(args) == 2 and args[1].__class__ is multi_val:
14014             args = list(args)
14015             try:
14016                 if not args[0].__class__ is multi_val:
14017                     args[0] = multi_val(args[0])
14018             except:
14019                 raise
14020             ctx = args[0].ctx
14021             res = isl.isl_multi_val_scale_multi_val(isl.isl_multi_val_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
14022             obj = multi_val(ctx=ctx, ptr=res)
14023             return obj
14024         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
14025             args = list(args)
14026             try:
14027                 if not args[0].__class__ is multi_val:
14028                     args[0] = multi_val(args[0])
14029             except:
14030                 raise
14031             try:
14032                 if not args[1].__class__ is val:
14033                     args[1] = val(args[1])
14034             except:
14035                 raise
14036             ctx = args[0].ctx
14037             res = isl.isl_multi_val_scale_val(isl.isl_multi_val_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
14038             obj = multi_val(ctx=ctx, ptr=res)
14039             return obj
14040         raise Error
14041     def scale_down(*args):
14042         if len(args) == 2 and args[1].__class__ is multi_val:
14043             args = list(args)
14044             try:
14045                 if not args[0].__class__ is multi_val:
14046                     args[0] = multi_val(args[0])
14047             except:
14048                 raise
14049             ctx = args[0].ctx
14050             res = isl.isl_multi_val_scale_down_multi_val(isl.isl_multi_val_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
14051             obj = multi_val(ctx=ctx, ptr=res)
14052             return obj
14053         if len(args) == 2 and (args[1].__class__ is val or type(args[1]) == int):
14054             args = list(args)
14055             try:
14056                 if not args[0].__class__ is multi_val:
14057                     args[0] = multi_val(args[0])
14058             except:
14059                 raise
14060             try:
14061                 if not args[1].__class__ is val:
14062                     args[1] = val(args[1])
14063             except:
14064                 raise
14065             ctx = args[0].ctx
14066             res = isl.isl_multi_val_scale_down_val(isl.isl_multi_val_copy(args[0].ptr), isl.isl_val_copy(args[1].ptr))
14067             obj = multi_val(ctx=ctx, ptr=res)
14068             return obj
14069         raise Error
14070     def set_at(arg0, arg1, arg2):
14071         try:
14072             if not arg0.__class__ is multi_val:
14073                 arg0 = multi_val(arg0)
14074         except:
14075             raise
14076         try:
14077             if not arg2.__class__ is val:
14078                 arg2 = val(arg2)
14079         except:
14080             raise
14081         ctx = arg0.ctx
14082         res = isl.isl_multi_val_set_at(isl.isl_multi_val_copy(arg0.ptr), arg1, isl.isl_val_copy(arg2.ptr))
14083         obj = multi_val(ctx=ctx, ptr=res)
14084         return obj
14085     def set_range_tuple(*args):
14086         if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
14087             args = list(args)
14088             try:
14089                 if not args[0].__class__ is multi_val:
14090                     args[0] = multi_val(args[0])
14091             except:
14092                 raise
14093             try:
14094                 if not args[1].__class__ is id:
14095                     args[1] = id(args[1])
14096             except:
14097                 raise
14098             ctx = args[0].ctx
14099             res = isl.isl_multi_val_set_range_tuple_id(isl.isl_multi_val_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
14100             obj = multi_val(ctx=ctx, ptr=res)
14101             return obj
14102         raise Error
14103     def size(arg0):
14104         try:
14105             if not arg0.__class__ is multi_val:
14106                 arg0 = multi_val(arg0)
14107         except:
14108             raise
14109         ctx = arg0.ctx
14110         res = isl.isl_multi_val_size(arg0.ptr)
14111         if res < 0:
14112             raise Error
14113         return int(res)
14114     def space(arg0):
14115         try:
14116             if not arg0.__class__ is multi_val:
14117                 arg0 = multi_val(arg0)
14118         except:
14119             raise
14120         ctx = arg0.ctx
14121         res = isl.isl_multi_val_get_space(arg0.ptr)
14122         obj = space(ctx=ctx, ptr=res)
14123         return obj
14124     def get_space(arg0):
14125         return arg0.space()
14126     def sub(arg0, arg1):
14127         try:
14128             if not arg0.__class__ is multi_val:
14129                 arg0 = multi_val(arg0)
14130         except:
14131             raise
14132         try:
14133             if not arg1.__class__ is multi_val:
14134                 arg1 = multi_val(arg1)
14135         except:
14136             raise
14137         ctx = arg0.ctx
14138         res = isl.isl_multi_val_sub(isl.isl_multi_val_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
14139         obj = multi_val(ctx=ctx, ptr=res)
14140         return obj
14141     @staticmethod
14142     def zero(arg0):
14143         try:
14144             if not arg0.__class__ is space:
14145                 arg0 = space(arg0)
14146         except:
14147             raise
14148         ctx = arg0.ctx
14149         res = isl.isl_multi_val_zero(isl.isl_space_copy(arg0.ptr))
14150         obj = multi_val(ctx=ctx, ptr=res)
14151         return obj
14153 isl.isl_multi_val_from_val_list.restype = c_void_p
14154 isl.isl_multi_val_from_val_list.argtypes = [c_void_p, c_void_p]
14155 isl.isl_multi_val_read_from_str.restype = c_void_p
14156 isl.isl_multi_val_read_from_str.argtypes = [Context, c_char_p]
14157 isl.isl_multi_val_add.restype = c_void_p
14158 isl.isl_multi_val_add.argtypes = [c_void_p, c_void_p]
14159 isl.isl_multi_val_add_val.restype = c_void_p
14160 isl.isl_multi_val_add_val.argtypes = [c_void_p, c_void_p]
14161 isl.isl_multi_val_get_at.restype = c_void_p
14162 isl.isl_multi_val_get_at.argtypes = [c_void_p, c_int]
14163 isl.isl_multi_val_flat_range_product.restype = c_void_p
14164 isl.isl_multi_val_flat_range_product.argtypes = [c_void_p, c_void_p]
14165 isl.isl_multi_val_has_range_tuple_id.argtypes = [c_void_p]
14166 isl.isl_multi_val_involves_nan.argtypes = [c_void_p]
14167 isl.isl_multi_val_get_list.restype = c_void_p
14168 isl.isl_multi_val_get_list.argtypes = [c_void_p]
14169 isl.isl_multi_val_max.restype = c_void_p
14170 isl.isl_multi_val_max.argtypes = [c_void_p, c_void_p]
14171 isl.isl_multi_val_min.restype = c_void_p
14172 isl.isl_multi_val_min.argtypes = [c_void_p, c_void_p]
14173 isl.isl_multi_val_neg.restype = c_void_p
14174 isl.isl_multi_val_neg.argtypes = [c_void_p]
14175 isl.isl_multi_val_plain_is_equal.argtypes = [c_void_p, c_void_p]
14176 isl.isl_multi_val_product.restype = c_void_p
14177 isl.isl_multi_val_product.argtypes = [c_void_p, c_void_p]
14178 isl.isl_multi_val_range_product.restype = c_void_p
14179 isl.isl_multi_val_range_product.argtypes = [c_void_p, c_void_p]
14180 isl.isl_multi_val_get_range_tuple_id.restype = c_void_p
14181 isl.isl_multi_val_get_range_tuple_id.argtypes = [c_void_p]
14182 isl.isl_multi_val_reset_range_tuple_id.restype = c_void_p
14183 isl.isl_multi_val_reset_range_tuple_id.argtypes = [c_void_p]
14184 isl.isl_multi_val_scale_multi_val.restype = c_void_p
14185 isl.isl_multi_val_scale_multi_val.argtypes = [c_void_p, c_void_p]
14186 isl.isl_multi_val_scale_val.restype = c_void_p
14187 isl.isl_multi_val_scale_val.argtypes = [c_void_p, c_void_p]
14188 isl.isl_multi_val_scale_down_multi_val.restype = c_void_p
14189 isl.isl_multi_val_scale_down_multi_val.argtypes = [c_void_p, c_void_p]
14190 isl.isl_multi_val_scale_down_val.restype = c_void_p
14191 isl.isl_multi_val_scale_down_val.argtypes = [c_void_p, c_void_p]
14192 isl.isl_multi_val_set_at.restype = c_void_p
14193 isl.isl_multi_val_set_at.argtypes = [c_void_p, c_int, c_void_p]
14194 isl.isl_multi_val_set_range_tuple_id.restype = c_void_p
14195 isl.isl_multi_val_set_range_tuple_id.argtypes = [c_void_p, c_void_p]
14196 isl.isl_multi_val_size.argtypes = [c_void_p]
14197 isl.isl_multi_val_get_space.restype = c_void_p
14198 isl.isl_multi_val_get_space.argtypes = [c_void_p]
14199 isl.isl_multi_val_sub.restype = c_void_p
14200 isl.isl_multi_val_sub.argtypes = [c_void_p, c_void_p]
14201 isl.isl_multi_val_zero.restype = c_void_p
14202 isl.isl_multi_val_zero.argtypes = [c_void_p]
14203 isl.isl_multi_val_copy.restype = c_void_p
14204 isl.isl_multi_val_copy.argtypes = [c_void_p]
14205 isl.isl_multi_val_free.restype = c_void_p
14206 isl.isl_multi_val_free.argtypes = [c_void_p]
14207 isl.isl_multi_val_to_str.restype = POINTER(c_char)
14208 isl.isl_multi_val_to_str.argtypes = [c_void_p]
14210 class point(basic_set):
14211     def __init__(self, *args, **keywords):
14212         if "ptr" in keywords:
14213             self.ctx = keywords["ctx"]
14214             self.ptr = keywords["ptr"]
14215             return
14216         raise Error
14217     def __del__(self):
14218         if hasattr(self, 'ptr'):
14219             isl.isl_point_free(self.ptr)
14220     def __str__(arg0):
14221         try:
14222             if not arg0.__class__ is point:
14223                 arg0 = point(arg0)
14224         except:
14225             raise
14226         ptr = isl.isl_point_to_str(arg0.ptr)
14227         res = cast(ptr, c_char_p).value.decode('ascii')
14228         libc.free(ptr)
14229         return res
14230     def __repr__(self):
14231         s = str(self)
14232         if '"' in s:
14233             return 'isl.point("""%s""")' % s
14234         else:
14235             return 'isl.point("%s")' % s
14236     def multi_val(arg0):
14237         try:
14238             if not arg0.__class__ is point:
14239                 arg0 = point(arg0)
14240         except:
14241             raise
14242         ctx = arg0.ctx
14243         res = isl.isl_point_get_multi_val(arg0.ptr)
14244         obj = multi_val(ctx=ctx, ptr=res)
14245         return obj
14246     def get_multi_val(arg0):
14247         return arg0.multi_val()
14248     def to_set(arg0):
14249         try:
14250             if not arg0.__class__ is point:
14251                 arg0 = point(arg0)
14252         except:
14253             raise
14254         ctx = arg0.ctx
14255         res = isl.isl_point_to_set(isl.isl_point_copy(arg0.ptr))
14256         obj = set(ctx=ctx, ptr=res)
14257         return obj
14259 isl.isl_point_get_multi_val.restype = c_void_p
14260 isl.isl_point_get_multi_val.argtypes = [c_void_p]
14261 isl.isl_point_to_set.restype = c_void_p
14262 isl.isl_point_to_set.argtypes = [c_void_p]
14263 isl.isl_point_copy.restype = c_void_p
14264 isl.isl_point_copy.argtypes = [c_void_p]
14265 isl.isl_point_free.restype = c_void_p
14266 isl.isl_point_free.argtypes = [c_void_p]
14267 isl.isl_point_to_str.restype = POINTER(c_char)
14268 isl.isl_point_to_str.argtypes = [c_void_p]
14270 class pw_aff_list(object):
14271     def __init__(self, *args, **keywords):
14272         if "ptr" in keywords:
14273             self.ctx = keywords["ctx"]
14274             self.ptr = keywords["ptr"]
14275             return
14276         if len(args) == 1 and type(args[0]) == int:
14277             self.ctx = Context.getDefaultInstance()
14278             self.ptr = isl.isl_pw_aff_list_alloc(self.ctx, args[0])
14279             return
14280         if len(args) == 1 and args[0].__class__ is pw_aff:
14281             self.ctx = Context.getDefaultInstance()
14282             self.ptr = isl.isl_pw_aff_list_from_pw_aff(isl.isl_pw_aff_copy(args[0].ptr))
14283             return
14284         if len(args) == 1 and type(args[0]) == str:
14285             self.ctx = Context.getDefaultInstance()
14286             self.ptr = isl.isl_pw_aff_list_read_from_str(self.ctx, args[0].encode('ascii'))
14287             return
14288         raise Error
14289     def __del__(self):
14290         if hasattr(self, 'ptr'):
14291             isl.isl_pw_aff_list_free(self.ptr)
14292     def __str__(arg0):
14293         try:
14294             if not arg0.__class__ is pw_aff_list:
14295                 arg0 = pw_aff_list(arg0)
14296         except:
14297             raise
14298         ptr = isl.isl_pw_aff_list_to_str(arg0.ptr)
14299         res = cast(ptr, c_char_p).value.decode('ascii')
14300         libc.free(ptr)
14301         return res
14302     def __repr__(self):
14303         s = str(self)
14304         if '"' in s:
14305             return 'isl.pw_aff_list("""%s""")' % s
14306         else:
14307             return 'isl.pw_aff_list("%s")' % s
14308     def add(arg0, arg1):
14309         try:
14310             if not arg0.__class__ is pw_aff_list:
14311                 arg0 = pw_aff_list(arg0)
14312         except:
14313             raise
14314         try:
14315             if not arg1.__class__ is pw_aff:
14316                 arg1 = pw_aff(arg1)
14317         except:
14318             raise
14319         ctx = arg0.ctx
14320         res = isl.isl_pw_aff_list_add(isl.isl_pw_aff_list_copy(arg0.ptr), isl.isl_pw_aff_copy(arg1.ptr))
14321         obj = pw_aff_list(ctx=ctx, ptr=res)
14322         return obj
14323     def at(arg0, arg1):
14324         try:
14325             if not arg0.__class__ is pw_aff_list:
14326                 arg0 = pw_aff_list(arg0)
14327         except:
14328             raise
14329         ctx = arg0.ctx
14330         res = isl.isl_pw_aff_list_get_at(arg0.ptr, arg1)
14331         obj = pw_aff(ctx=ctx, ptr=res)
14332         return obj
14333     def get_at(arg0, arg1):
14334         return arg0.at(arg1)
14335     def clear(arg0):
14336         try:
14337             if not arg0.__class__ is pw_aff_list:
14338                 arg0 = pw_aff_list(arg0)
14339         except:
14340             raise
14341         ctx = arg0.ctx
14342         res = isl.isl_pw_aff_list_clear(isl.isl_pw_aff_list_copy(arg0.ptr))
14343         obj = pw_aff_list(ctx=ctx, ptr=res)
14344         return obj
14345     def concat(arg0, arg1):
14346         try:
14347             if not arg0.__class__ is pw_aff_list:
14348                 arg0 = pw_aff_list(arg0)
14349         except:
14350             raise
14351         try:
14352             if not arg1.__class__ is pw_aff_list:
14353                 arg1 = pw_aff_list(arg1)
14354         except:
14355             raise
14356         ctx = arg0.ctx
14357         res = isl.isl_pw_aff_list_concat(isl.isl_pw_aff_list_copy(arg0.ptr), isl.isl_pw_aff_list_copy(arg1.ptr))
14358         obj = pw_aff_list(ctx=ctx, ptr=res)
14359         return obj
14360     def drop(arg0, arg1, arg2):
14361         try:
14362             if not arg0.__class__ is pw_aff_list:
14363                 arg0 = pw_aff_list(arg0)
14364         except:
14365             raise
14366         ctx = arg0.ctx
14367         res = isl.isl_pw_aff_list_drop(isl.isl_pw_aff_list_copy(arg0.ptr), arg1, arg2)
14368         obj = pw_aff_list(ctx=ctx, ptr=res)
14369         return obj
14370     def foreach(arg0, arg1):
14371         try:
14372             if not arg0.__class__ is pw_aff_list:
14373                 arg0 = pw_aff_list(arg0)
14374         except:
14375             raise
14376         exc_info = [None]
14377         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
14378         def cb_func(cb_arg0, cb_arg1):
14379             cb_arg0 = pw_aff(ctx=arg0.ctx, ptr=(cb_arg0))
14380             try:
14381                 arg1(cb_arg0)
14382             except BaseException as e:
14383                 exc_info[0] = e
14384                 return -1
14385             return 0
14386         cb1 = fn(cb_func)
14387         ctx = arg0.ctx
14388         res = isl.isl_pw_aff_list_foreach(arg0.ptr, cb1, None)
14389         if exc_info[0] is not None:
14390             raise exc_info[0]
14391         if res < 0:
14392             raise Error
14393     def foreach_scc(arg0, arg1, arg2):
14394         try:
14395             if not arg0.__class__ is pw_aff_list:
14396                 arg0 = pw_aff_list(arg0)
14397         except:
14398             raise
14399         exc_info = [None]
14400         fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
14401         def cb_func(cb_arg0, cb_arg1, cb_arg2):
14402             cb_arg0 = pw_aff(ctx=arg0.ctx, ptr=isl.isl_pw_aff_copy(cb_arg0))
14403             cb_arg1 = pw_aff(ctx=arg0.ctx, ptr=isl.isl_pw_aff_copy(cb_arg1))
14404             try:
14405                 res = arg1(cb_arg0, cb_arg1)
14406             except BaseException as e:
14407                 exc_info[0] = e
14408                 return -1
14409             return 1 if res else 0
14410         cb1 = fn(cb_func)
14411         exc_info = [None]
14412         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
14413         def cb_func(cb_arg0, cb_arg1):
14414             cb_arg0 = pw_aff_list(ctx=arg0.ctx, ptr=(cb_arg0))
14415             try:
14416                 arg2(cb_arg0)
14417             except BaseException as e:
14418                 exc_info[0] = e
14419                 return -1
14420             return 0
14421         cb2 = fn(cb_func)
14422         ctx = arg0.ctx
14423         res = isl.isl_pw_aff_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
14424         if exc_info[0] is not None:
14425             raise exc_info[0]
14426         if res < 0:
14427             raise Error
14428     def insert(arg0, arg1, arg2):
14429         try:
14430             if not arg0.__class__ is pw_aff_list:
14431                 arg0 = pw_aff_list(arg0)
14432         except:
14433             raise
14434         try:
14435             if not arg2.__class__ is pw_aff:
14436                 arg2 = pw_aff(arg2)
14437         except:
14438             raise
14439         ctx = arg0.ctx
14440         res = isl.isl_pw_aff_list_insert(isl.isl_pw_aff_list_copy(arg0.ptr), arg1, isl.isl_pw_aff_copy(arg2.ptr))
14441         obj = pw_aff_list(ctx=ctx, ptr=res)
14442         return obj
14443     def set_at(arg0, arg1, arg2):
14444         try:
14445             if not arg0.__class__ is pw_aff_list:
14446                 arg0 = pw_aff_list(arg0)
14447         except:
14448             raise
14449         try:
14450             if not arg2.__class__ is pw_aff:
14451                 arg2 = pw_aff(arg2)
14452         except:
14453             raise
14454         ctx = arg0.ctx
14455         res = isl.isl_pw_aff_list_set_at(isl.isl_pw_aff_list_copy(arg0.ptr), arg1, isl.isl_pw_aff_copy(arg2.ptr))
14456         obj = pw_aff_list(ctx=ctx, ptr=res)
14457         return obj
14458     def size(arg0):
14459         try:
14460             if not arg0.__class__ is pw_aff_list:
14461                 arg0 = pw_aff_list(arg0)
14462         except:
14463             raise
14464         ctx = arg0.ctx
14465         res = isl.isl_pw_aff_list_size(arg0.ptr)
14466         if res < 0:
14467             raise Error
14468         return int(res)
14470 isl.isl_pw_aff_list_alloc.restype = c_void_p
14471 isl.isl_pw_aff_list_alloc.argtypes = [Context, c_int]
14472 isl.isl_pw_aff_list_from_pw_aff.restype = c_void_p
14473 isl.isl_pw_aff_list_from_pw_aff.argtypes = [c_void_p]
14474 isl.isl_pw_aff_list_read_from_str.restype = c_void_p
14475 isl.isl_pw_aff_list_read_from_str.argtypes = [Context, c_char_p]
14476 isl.isl_pw_aff_list_add.restype = c_void_p
14477 isl.isl_pw_aff_list_add.argtypes = [c_void_p, c_void_p]
14478 isl.isl_pw_aff_list_get_at.restype = c_void_p
14479 isl.isl_pw_aff_list_get_at.argtypes = [c_void_p, c_int]
14480 isl.isl_pw_aff_list_clear.restype = c_void_p
14481 isl.isl_pw_aff_list_clear.argtypes = [c_void_p]
14482 isl.isl_pw_aff_list_concat.restype = c_void_p
14483 isl.isl_pw_aff_list_concat.argtypes = [c_void_p, c_void_p]
14484 isl.isl_pw_aff_list_drop.restype = c_void_p
14485 isl.isl_pw_aff_list_drop.argtypes = [c_void_p, c_int, c_int]
14486 isl.isl_pw_aff_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
14487 isl.isl_pw_aff_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
14488 isl.isl_pw_aff_list_insert.restype = c_void_p
14489 isl.isl_pw_aff_list_insert.argtypes = [c_void_p, c_int, c_void_p]
14490 isl.isl_pw_aff_list_set_at.restype = c_void_p
14491 isl.isl_pw_aff_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
14492 isl.isl_pw_aff_list_size.argtypes = [c_void_p]
14493 isl.isl_pw_aff_list_copy.restype = c_void_p
14494 isl.isl_pw_aff_list_copy.argtypes = [c_void_p]
14495 isl.isl_pw_aff_list_free.restype = c_void_p
14496 isl.isl_pw_aff_list_free.argtypes = [c_void_p]
14497 isl.isl_pw_aff_list_to_str.restype = POINTER(c_char)
14498 isl.isl_pw_aff_list_to_str.argtypes = [c_void_p]
14500 class pw_multi_aff_list(object):
14501     def __init__(self, *args, **keywords):
14502         if "ptr" in keywords:
14503             self.ctx = keywords["ctx"]
14504             self.ptr = keywords["ptr"]
14505             return
14506         if len(args) == 1 and type(args[0]) == int:
14507             self.ctx = Context.getDefaultInstance()
14508             self.ptr = isl.isl_pw_multi_aff_list_alloc(self.ctx, args[0])
14509             return
14510         if len(args) == 1 and args[0].__class__ is pw_multi_aff:
14511             self.ctx = Context.getDefaultInstance()
14512             self.ptr = isl.isl_pw_multi_aff_list_from_pw_multi_aff(isl.isl_pw_multi_aff_copy(args[0].ptr))
14513             return
14514         if len(args) == 1 and type(args[0]) == str:
14515             self.ctx = Context.getDefaultInstance()
14516             self.ptr = isl.isl_pw_multi_aff_list_read_from_str(self.ctx, args[0].encode('ascii'))
14517             return
14518         raise Error
14519     def __del__(self):
14520         if hasattr(self, 'ptr'):
14521             isl.isl_pw_multi_aff_list_free(self.ptr)
14522     def __str__(arg0):
14523         try:
14524             if not arg0.__class__ is pw_multi_aff_list:
14525                 arg0 = pw_multi_aff_list(arg0)
14526         except:
14527             raise
14528         ptr = isl.isl_pw_multi_aff_list_to_str(arg0.ptr)
14529         res = cast(ptr, c_char_p).value.decode('ascii')
14530         libc.free(ptr)
14531         return res
14532     def __repr__(self):
14533         s = str(self)
14534         if '"' in s:
14535             return 'isl.pw_multi_aff_list("""%s""")' % s
14536         else:
14537             return 'isl.pw_multi_aff_list("%s")' % s
14538     def add(arg0, arg1):
14539         try:
14540             if not arg0.__class__ is pw_multi_aff_list:
14541                 arg0 = pw_multi_aff_list(arg0)
14542         except:
14543             raise
14544         try:
14545             if not arg1.__class__ is pw_multi_aff:
14546                 arg1 = pw_multi_aff(arg1)
14547         except:
14548             raise
14549         ctx = arg0.ctx
14550         res = isl.isl_pw_multi_aff_list_add(isl.isl_pw_multi_aff_list_copy(arg0.ptr), isl.isl_pw_multi_aff_copy(arg1.ptr))
14551         obj = pw_multi_aff_list(ctx=ctx, ptr=res)
14552         return obj
14553     def at(arg0, arg1):
14554         try:
14555             if not arg0.__class__ is pw_multi_aff_list:
14556                 arg0 = pw_multi_aff_list(arg0)
14557         except:
14558             raise
14559         ctx = arg0.ctx
14560         res = isl.isl_pw_multi_aff_list_get_at(arg0.ptr, arg1)
14561         obj = pw_multi_aff(ctx=ctx, ptr=res)
14562         return obj
14563     def get_at(arg0, arg1):
14564         return arg0.at(arg1)
14565     def clear(arg0):
14566         try:
14567             if not arg0.__class__ is pw_multi_aff_list:
14568                 arg0 = pw_multi_aff_list(arg0)
14569         except:
14570             raise
14571         ctx = arg0.ctx
14572         res = isl.isl_pw_multi_aff_list_clear(isl.isl_pw_multi_aff_list_copy(arg0.ptr))
14573         obj = pw_multi_aff_list(ctx=ctx, ptr=res)
14574         return obj
14575     def concat(arg0, arg1):
14576         try:
14577             if not arg0.__class__ is pw_multi_aff_list:
14578                 arg0 = pw_multi_aff_list(arg0)
14579         except:
14580             raise
14581         try:
14582             if not arg1.__class__ is pw_multi_aff_list:
14583                 arg1 = pw_multi_aff_list(arg1)
14584         except:
14585             raise
14586         ctx = arg0.ctx
14587         res = isl.isl_pw_multi_aff_list_concat(isl.isl_pw_multi_aff_list_copy(arg0.ptr), isl.isl_pw_multi_aff_list_copy(arg1.ptr))
14588         obj = pw_multi_aff_list(ctx=ctx, ptr=res)
14589         return obj
14590     def drop(arg0, arg1, arg2):
14591         try:
14592             if not arg0.__class__ is pw_multi_aff_list:
14593                 arg0 = pw_multi_aff_list(arg0)
14594         except:
14595             raise
14596         ctx = arg0.ctx
14597         res = isl.isl_pw_multi_aff_list_drop(isl.isl_pw_multi_aff_list_copy(arg0.ptr), arg1, arg2)
14598         obj = pw_multi_aff_list(ctx=ctx, ptr=res)
14599         return obj
14600     def foreach(arg0, arg1):
14601         try:
14602             if not arg0.__class__ is pw_multi_aff_list:
14603                 arg0 = pw_multi_aff_list(arg0)
14604         except:
14605             raise
14606         exc_info = [None]
14607         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
14608         def cb_func(cb_arg0, cb_arg1):
14609             cb_arg0 = pw_multi_aff(ctx=arg0.ctx, ptr=(cb_arg0))
14610             try:
14611                 arg1(cb_arg0)
14612             except BaseException as e:
14613                 exc_info[0] = e
14614                 return -1
14615             return 0
14616         cb1 = fn(cb_func)
14617         ctx = arg0.ctx
14618         res = isl.isl_pw_multi_aff_list_foreach(arg0.ptr, cb1, None)
14619         if exc_info[0] is not None:
14620             raise exc_info[0]
14621         if res < 0:
14622             raise Error
14623     def foreach_scc(arg0, arg1, arg2):
14624         try:
14625             if not arg0.__class__ is pw_multi_aff_list:
14626                 arg0 = pw_multi_aff_list(arg0)
14627         except:
14628             raise
14629         exc_info = [None]
14630         fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
14631         def cb_func(cb_arg0, cb_arg1, cb_arg2):
14632             cb_arg0 = pw_multi_aff(ctx=arg0.ctx, ptr=isl.isl_pw_multi_aff_copy(cb_arg0))
14633             cb_arg1 = pw_multi_aff(ctx=arg0.ctx, ptr=isl.isl_pw_multi_aff_copy(cb_arg1))
14634             try:
14635                 res = arg1(cb_arg0, cb_arg1)
14636             except BaseException as e:
14637                 exc_info[0] = e
14638                 return -1
14639             return 1 if res else 0
14640         cb1 = fn(cb_func)
14641         exc_info = [None]
14642         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
14643         def cb_func(cb_arg0, cb_arg1):
14644             cb_arg0 = pw_multi_aff_list(ctx=arg0.ctx, ptr=(cb_arg0))
14645             try:
14646                 arg2(cb_arg0)
14647             except BaseException as e:
14648                 exc_info[0] = e
14649                 return -1
14650             return 0
14651         cb2 = fn(cb_func)
14652         ctx = arg0.ctx
14653         res = isl.isl_pw_multi_aff_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
14654         if exc_info[0] is not None:
14655             raise exc_info[0]
14656         if res < 0:
14657             raise Error
14658     def insert(arg0, arg1, arg2):
14659         try:
14660             if not arg0.__class__ is pw_multi_aff_list:
14661                 arg0 = pw_multi_aff_list(arg0)
14662         except:
14663             raise
14664         try:
14665             if not arg2.__class__ is pw_multi_aff:
14666                 arg2 = pw_multi_aff(arg2)
14667         except:
14668             raise
14669         ctx = arg0.ctx
14670         res = isl.isl_pw_multi_aff_list_insert(isl.isl_pw_multi_aff_list_copy(arg0.ptr), arg1, isl.isl_pw_multi_aff_copy(arg2.ptr))
14671         obj = pw_multi_aff_list(ctx=ctx, ptr=res)
14672         return obj
14673     def set_at(arg0, arg1, arg2):
14674         try:
14675             if not arg0.__class__ is pw_multi_aff_list:
14676                 arg0 = pw_multi_aff_list(arg0)
14677         except:
14678             raise
14679         try:
14680             if not arg2.__class__ is pw_multi_aff:
14681                 arg2 = pw_multi_aff(arg2)
14682         except:
14683             raise
14684         ctx = arg0.ctx
14685         res = isl.isl_pw_multi_aff_list_set_at(isl.isl_pw_multi_aff_list_copy(arg0.ptr), arg1, isl.isl_pw_multi_aff_copy(arg2.ptr))
14686         obj = pw_multi_aff_list(ctx=ctx, ptr=res)
14687         return obj
14688     def size(arg0):
14689         try:
14690             if not arg0.__class__ is pw_multi_aff_list:
14691                 arg0 = pw_multi_aff_list(arg0)
14692         except:
14693             raise
14694         ctx = arg0.ctx
14695         res = isl.isl_pw_multi_aff_list_size(arg0.ptr)
14696         if res < 0:
14697             raise Error
14698         return int(res)
14700 isl.isl_pw_multi_aff_list_alloc.restype = c_void_p
14701 isl.isl_pw_multi_aff_list_alloc.argtypes = [Context, c_int]
14702 isl.isl_pw_multi_aff_list_from_pw_multi_aff.restype = c_void_p
14703 isl.isl_pw_multi_aff_list_from_pw_multi_aff.argtypes = [c_void_p]
14704 isl.isl_pw_multi_aff_list_read_from_str.restype = c_void_p
14705 isl.isl_pw_multi_aff_list_read_from_str.argtypes = [Context, c_char_p]
14706 isl.isl_pw_multi_aff_list_add.restype = c_void_p
14707 isl.isl_pw_multi_aff_list_add.argtypes = [c_void_p, c_void_p]
14708 isl.isl_pw_multi_aff_list_get_at.restype = c_void_p
14709 isl.isl_pw_multi_aff_list_get_at.argtypes = [c_void_p, c_int]
14710 isl.isl_pw_multi_aff_list_clear.restype = c_void_p
14711 isl.isl_pw_multi_aff_list_clear.argtypes = [c_void_p]
14712 isl.isl_pw_multi_aff_list_concat.restype = c_void_p
14713 isl.isl_pw_multi_aff_list_concat.argtypes = [c_void_p, c_void_p]
14714 isl.isl_pw_multi_aff_list_drop.restype = c_void_p
14715 isl.isl_pw_multi_aff_list_drop.argtypes = [c_void_p, c_int, c_int]
14716 isl.isl_pw_multi_aff_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
14717 isl.isl_pw_multi_aff_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
14718 isl.isl_pw_multi_aff_list_insert.restype = c_void_p
14719 isl.isl_pw_multi_aff_list_insert.argtypes = [c_void_p, c_int, c_void_p]
14720 isl.isl_pw_multi_aff_list_set_at.restype = c_void_p
14721 isl.isl_pw_multi_aff_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
14722 isl.isl_pw_multi_aff_list_size.argtypes = [c_void_p]
14723 isl.isl_pw_multi_aff_list_copy.restype = c_void_p
14724 isl.isl_pw_multi_aff_list_copy.argtypes = [c_void_p]
14725 isl.isl_pw_multi_aff_list_free.restype = c_void_p
14726 isl.isl_pw_multi_aff_list_free.argtypes = [c_void_p]
14727 isl.isl_pw_multi_aff_list_to_str.restype = POINTER(c_char)
14728 isl.isl_pw_multi_aff_list_to_str.argtypes = [c_void_p]
14730 class schedule(object):
14731     def __init__(self, *args, **keywords):
14732         if "ptr" in keywords:
14733             self.ctx = keywords["ctx"]
14734             self.ptr = keywords["ptr"]
14735             return
14736         if len(args) == 1 and type(args[0]) == str:
14737             self.ctx = Context.getDefaultInstance()
14738             self.ptr = isl.isl_schedule_read_from_str(self.ctx, args[0].encode('ascii'))
14739             return
14740         raise Error
14741     def __del__(self):
14742         if hasattr(self, 'ptr'):
14743             isl.isl_schedule_free(self.ptr)
14744     def __str__(arg0):
14745         try:
14746             if not arg0.__class__ is schedule:
14747                 arg0 = schedule(arg0)
14748         except:
14749             raise
14750         ptr = isl.isl_schedule_to_str(arg0.ptr)
14751         res = cast(ptr, c_char_p).value.decode('ascii')
14752         libc.free(ptr)
14753         return res
14754     def __repr__(self):
14755         s = str(self)
14756         if '"' in s:
14757             return 'isl.schedule("""%s""")' % s
14758         else:
14759             return 'isl.schedule("%s")' % s
14760     def domain(arg0):
14761         try:
14762             if not arg0.__class__ is schedule:
14763                 arg0 = schedule(arg0)
14764         except:
14765             raise
14766         ctx = arg0.ctx
14767         res = isl.isl_schedule_get_domain(arg0.ptr)
14768         obj = union_set(ctx=ctx, ptr=res)
14769         return obj
14770     def get_domain(arg0):
14771         return arg0.domain()
14772     @staticmethod
14773     def from_domain(arg0):
14774         try:
14775             if not arg0.__class__ is union_set:
14776                 arg0 = union_set(arg0)
14777         except:
14778             raise
14779         ctx = arg0.ctx
14780         res = isl.isl_schedule_from_domain(isl.isl_union_set_copy(arg0.ptr))
14781         obj = schedule(ctx=ctx, ptr=res)
14782         return obj
14783     def map(arg0):
14784         try:
14785             if not arg0.__class__ is schedule:
14786                 arg0 = schedule(arg0)
14787         except:
14788             raise
14789         ctx = arg0.ctx
14790         res = isl.isl_schedule_get_map(arg0.ptr)
14791         obj = union_map(ctx=ctx, ptr=res)
14792         return obj
14793     def get_map(arg0):
14794         return arg0.map()
14795     def pullback(*args):
14796         if len(args) == 2 and args[1].__class__ is union_pw_multi_aff:
14797             args = list(args)
14798             try:
14799                 if not args[0].__class__ is schedule:
14800                     args[0] = schedule(args[0])
14801             except:
14802                 raise
14803             ctx = args[0].ctx
14804             res = isl.isl_schedule_pullback_union_pw_multi_aff(isl.isl_schedule_copy(args[0].ptr), isl.isl_union_pw_multi_aff_copy(args[1].ptr))
14805             obj = schedule(ctx=ctx, ptr=res)
14806             return obj
14807         raise Error
14808     def root(arg0):
14809         try:
14810             if not arg0.__class__ is schedule:
14811                 arg0 = schedule(arg0)
14812         except:
14813             raise
14814         ctx = arg0.ctx
14815         res = isl.isl_schedule_get_root(arg0.ptr)
14816         obj = schedule_node(ctx=ctx, ptr=res)
14817         return obj
14818     def get_root(arg0):
14819         return arg0.root()
14821 isl.isl_schedule_read_from_str.restype = c_void_p
14822 isl.isl_schedule_read_from_str.argtypes = [Context, c_char_p]
14823 isl.isl_schedule_get_domain.restype = c_void_p
14824 isl.isl_schedule_get_domain.argtypes = [c_void_p]
14825 isl.isl_schedule_from_domain.restype = c_void_p
14826 isl.isl_schedule_from_domain.argtypes = [c_void_p]
14827 isl.isl_schedule_get_map.restype = c_void_p
14828 isl.isl_schedule_get_map.argtypes = [c_void_p]
14829 isl.isl_schedule_pullback_union_pw_multi_aff.restype = c_void_p
14830 isl.isl_schedule_pullback_union_pw_multi_aff.argtypes = [c_void_p, c_void_p]
14831 isl.isl_schedule_get_root.restype = c_void_p
14832 isl.isl_schedule_get_root.argtypes = [c_void_p]
14833 isl.isl_schedule_copy.restype = c_void_p
14834 isl.isl_schedule_copy.argtypes = [c_void_p]
14835 isl.isl_schedule_free.restype = c_void_p
14836 isl.isl_schedule_free.argtypes = [c_void_p]
14837 isl.isl_schedule_to_str.restype = POINTER(c_char)
14838 isl.isl_schedule_to_str.argtypes = [c_void_p]
14840 class schedule_constraints(object):
14841     def __init__(self, *args, **keywords):
14842         if "ptr" in keywords:
14843             self.ctx = keywords["ctx"]
14844             self.ptr = keywords["ptr"]
14845             return
14846         if len(args) == 1 and type(args[0]) == str:
14847             self.ctx = Context.getDefaultInstance()
14848             self.ptr = isl.isl_schedule_constraints_read_from_str(self.ctx, args[0].encode('ascii'))
14849             return
14850         raise Error
14851     def __del__(self):
14852         if hasattr(self, 'ptr'):
14853             isl.isl_schedule_constraints_free(self.ptr)
14854     def __str__(arg0):
14855         try:
14856             if not arg0.__class__ is schedule_constraints:
14857                 arg0 = schedule_constraints(arg0)
14858         except:
14859             raise
14860         ptr = isl.isl_schedule_constraints_to_str(arg0.ptr)
14861         res = cast(ptr, c_char_p).value.decode('ascii')
14862         libc.free(ptr)
14863         return res
14864     def __repr__(self):
14865         s = str(self)
14866         if '"' in s:
14867             return 'isl.schedule_constraints("""%s""")' % s
14868         else:
14869             return 'isl.schedule_constraints("%s")' % s
14870     def coincidence(arg0):
14871         try:
14872             if not arg0.__class__ is schedule_constraints:
14873                 arg0 = schedule_constraints(arg0)
14874         except:
14875             raise
14876         ctx = arg0.ctx
14877         res = isl.isl_schedule_constraints_get_coincidence(arg0.ptr)
14878         obj = union_map(ctx=ctx, ptr=res)
14879         return obj
14880     def get_coincidence(arg0):
14881         return arg0.coincidence()
14882     def compute_schedule(arg0):
14883         try:
14884             if not arg0.__class__ is schedule_constraints:
14885                 arg0 = schedule_constraints(arg0)
14886         except:
14887             raise
14888         ctx = arg0.ctx
14889         res = isl.isl_schedule_constraints_compute_schedule(isl.isl_schedule_constraints_copy(arg0.ptr))
14890         obj = schedule(ctx=ctx, ptr=res)
14891         return obj
14892     def conditional_validity(arg0):
14893         try:
14894             if not arg0.__class__ is schedule_constraints:
14895                 arg0 = schedule_constraints(arg0)
14896         except:
14897             raise
14898         ctx = arg0.ctx
14899         res = isl.isl_schedule_constraints_get_conditional_validity(arg0.ptr)
14900         obj = union_map(ctx=ctx, ptr=res)
14901         return obj
14902     def get_conditional_validity(arg0):
14903         return arg0.conditional_validity()
14904     def conditional_validity_condition(arg0):
14905         try:
14906             if not arg0.__class__ is schedule_constraints:
14907                 arg0 = schedule_constraints(arg0)
14908         except:
14909             raise
14910         ctx = arg0.ctx
14911         res = isl.isl_schedule_constraints_get_conditional_validity_condition(arg0.ptr)
14912         obj = union_map(ctx=ctx, ptr=res)
14913         return obj
14914     def get_conditional_validity_condition(arg0):
14915         return arg0.conditional_validity_condition()
14916     def context(arg0):
14917         try:
14918             if not arg0.__class__ is schedule_constraints:
14919                 arg0 = schedule_constraints(arg0)
14920         except:
14921             raise
14922         ctx = arg0.ctx
14923         res = isl.isl_schedule_constraints_get_context(arg0.ptr)
14924         obj = set(ctx=ctx, ptr=res)
14925         return obj
14926     def get_context(arg0):
14927         return arg0.context()
14928     def domain(arg0):
14929         try:
14930             if not arg0.__class__ is schedule_constraints:
14931                 arg0 = schedule_constraints(arg0)
14932         except:
14933             raise
14934         ctx = arg0.ctx
14935         res = isl.isl_schedule_constraints_get_domain(arg0.ptr)
14936         obj = union_set(ctx=ctx, ptr=res)
14937         return obj
14938     def get_domain(arg0):
14939         return arg0.domain()
14940     @staticmethod
14941     def on_domain(arg0):
14942         try:
14943             if not arg0.__class__ is union_set:
14944                 arg0 = union_set(arg0)
14945         except:
14946             raise
14947         ctx = arg0.ctx
14948         res = isl.isl_schedule_constraints_on_domain(isl.isl_union_set_copy(arg0.ptr))
14949         obj = schedule_constraints(ctx=ctx, ptr=res)
14950         return obj
14951     def proximity(arg0):
14952         try:
14953             if not arg0.__class__ is schedule_constraints:
14954                 arg0 = schedule_constraints(arg0)
14955         except:
14956             raise
14957         ctx = arg0.ctx
14958         res = isl.isl_schedule_constraints_get_proximity(arg0.ptr)
14959         obj = union_map(ctx=ctx, ptr=res)
14960         return obj
14961     def get_proximity(arg0):
14962         return arg0.proximity()
14963     def set_coincidence(arg0, arg1):
14964         try:
14965             if not arg0.__class__ is schedule_constraints:
14966                 arg0 = schedule_constraints(arg0)
14967         except:
14968             raise
14969         try:
14970             if not arg1.__class__ is union_map:
14971                 arg1 = union_map(arg1)
14972         except:
14973             raise
14974         ctx = arg0.ctx
14975         res = isl.isl_schedule_constraints_set_coincidence(isl.isl_schedule_constraints_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
14976         obj = schedule_constraints(ctx=ctx, ptr=res)
14977         return obj
14978     def set_conditional_validity(arg0, arg1, arg2):
14979         try:
14980             if not arg0.__class__ is schedule_constraints:
14981                 arg0 = schedule_constraints(arg0)
14982         except:
14983             raise
14984         try:
14985             if not arg1.__class__ is union_map:
14986                 arg1 = union_map(arg1)
14987         except:
14988             raise
14989         try:
14990             if not arg2.__class__ is union_map:
14991                 arg2 = union_map(arg2)
14992         except:
14993             raise
14994         ctx = arg0.ctx
14995         res = isl.isl_schedule_constraints_set_conditional_validity(isl.isl_schedule_constraints_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr), isl.isl_union_map_copy(arg2.ptr))
14996         obj = schedule_constraints(ctx=ctx, ptr=res)
14997         return obj
14998     def set_context(arg0, arg1):
14999         try:
15000             if not arg0.__class__ is schedule_constraints:
15001                 arg0 = schedule_constraints(arg0)
15002         except:
15003             raise
15004         try:
15005             if not arg1.__class__ is set:
15006                 arg1 = set(arg1)
15007         except:
15008             raise
15009         ctx = arg0.ctx
15010         res = isl.isl_schedule_constraints_set_context(isl.isl_schedule_constraints_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
15011         obj = schedule_constraints(ctx=ctx, ptr=res)
15012         return obj
15013     def set_proximity(arg0, arg1):
15014         try:
15015             if not arg0.__class__ is schedule_constraints:
15016                 arg0 = schedule_constraints(arg0)
15017         except:
15018             raise
15019         try:
15020             if not arg1.__class__ is union_map:
15021                 arg1 = union_map(arg1)
15022         except:
15023             raise
15024         ctx = arg0.ctx
15025         res = isl.isl_schedule_constraints_set_proximity(isl.isl_schedule_constraints_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
15026         obj = schedule_constraints(ctx=ctx, ptr=res)
15027         return obj
15028     def set_validity(arg0, arg1):
15029         try:
15030             if not arg0.__class__ is schedule_constraints:
15031                 arg0 = schedule_constraints(arg0)
15032         except:
15033             raise
15034         try:
15035             if not arg1.__class__ is union_map:
15036                 arg1 = union_map(arg1)
15037         except:
15038             raise
15039         ctx = arg0.ctx
15040         res = isl.isl_schedule_constraints_set_validity(isl.isl_schedule_constraints_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
15041         obj = schedule_constraints(ctx=ctx, ptr=res)
15042         return obj
15043     def validity(arg0):
15044         try:
15045             if not arg0.__class__ is schedule_constraints:
15046                 arg0 = schedule_constraints(arg0)
15047         except:
15048             raise
15049         ctx = arg0.ctx
15050         res = isl.isl_schedule_constraints_get_validity(arg0.ptr)
15051         obj = union_map(ctx=ctx, ptr=res)
15052         return obj
15053     def get_validity(arg0):
15054         return arg0.validity()
15056 isl.isl_schedule_constraints_read_from_str.restype = c_void_p
15057 isl.isl_schedule_constraints_read_from_str.argtypes = [Context, c_char_p]
15058 isl.isl_schedule_constraints_get_coincidence.restype = c_void_p
15059 isl.isl_schedule_constraints_get_coincidence.argtypes = [c_void_p]
15060 isl.isl_schedule_constraints_compute_schedule.restype = c_void_p
15061 isl.isl_schedule_constraints_compute_schedule.argtypes = [c_void_p]
15062 isl.isl_schedule_constraints_get_conditional_validity.restype = c_void_p
15063 isl.isl_schedule_constraints_get_conditional_validity.argtypes = [c_void_p]
15064 isl.isl_schedule_constraints_get_conditional_validity_condition.restype = c_void_p
15065 isl.isl_schedule_constraints_get_conditional_validity_condition.argtypes = [c_void_p]
15066 isl.isl_schedule_constraints_get_context.restype = c_void_p
15067 isl.isl_schedule_constraints_get_context.argtypes = [c_void_p]
15068 isl.isl_schedule_constraints_get_domain.restype = c_void_p
15069 isl.isl_schedule_constraints_get_domain.argtypes = [c_void_p]
15070 isl.isl_schedule_constraints_on_domain.restype = c_void_p
15071 isl.isl_schedule_constraints_on_domain.argtypes = [c_void_p]
15072 isl.isl_schedule_constraints_get_proximity.restype = c_void_p
15073 isl.isl_schedule_constraints_get_proximity.argtypes = [c_void_p]
15074 isl.isl_schedule_constraints_set_coincidence.restype = c_void_p
15075 isl.isl_schedule_constraints_set_coincidence.argtypes = [c_void_p, c_void_p]
15076 isl.isl_schedule_constraints_set_conditional_validity.restype = c_void_p
15077 isl.isl_schedule_constraints_set_conditional_validity.argtypes = [c_void_p, c_void_p, c_void_p]
15078 isl.isl_schedule_constraints_set_context.restype = c_void_p
15079 isl.isl_schedule_constraints_set_context.argtypes = [c_void_p, c_void_p]
15080 isl.isl_schedule_constraints_set_proximity.restype = c_void_p
15081 isl.isl_schedule_constraints_set_proximity.argtypes = [c_void_p, c_void_p]
15082 isl.isl_schedule_constraints_set_validity.restype = c_void_p
15083 isl.isl_schedule_constraints_set_validity.argtypes = [c_void_p, c_void_p]
15084 isl.isl_schedule_constraints_get_validity.restype = c_void_p
15085 isl.isl_schedule_constraints_get_validity.argtypes = [c_void_p]
15086 isl.isl_schedule_constraints_copy.restype = c_void_p
15087 isl.isl_schedule_constraints_copy.argtypes = [c_void_p]
15088 isl.isl_schedule_constraints_free.restype = c_void_p
15089 isl.isl_schedule_constraints_free.argtypes = [c_void_p]
15090 isl.isl_schedule_constraints_to_str.restype = POINTER(c_char)
15091 isl.isl_schedule_constraints_to_str.argtypes = [c_void_p]
15093 class schedule_node(object):
15094     def __init__(self, *args, **keywords):
15095         if "ptr" in keywords:
15096             self.ctx = keywords["ctx"]
15097             self.ptr = keywords["ptr"]
15098             return
15099         if len(args) == 1 and isinstance(args[0], schedule_node_band):
15100             self.ctx = args[0].ctx
15101             self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15102             return
15103         if len(args) == 1 and isinstance(args[0], schedule_node_context):
15104             self.ctx = args[0].ctx
15105             self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15106             return
15107         if len(args) == 1 and isinstance(args[0], schedule_node_domain):
15108             self.ctx = args[0].ctx
15109             self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15110             return
15111         if len(args) == 1 and isinstance(args[0], schedule_node_expansion):
15112             self.ctx = args[0].ctx
15113             self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15114             return
15115         if len(args) == 1 and isinstance(args[0], schedule_node_extension):
15116             self.ctx = args[0].ctx
15117             self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15118             return
15119         if len(args) == 1 and isinstance(args[0], schedule_node_filter):
15120             self.ctx = args[0].ctx
15121             self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15122             return
15123         if len(args) == 1 and isinstance(args[0], schedule_node_leaf):
15124             self.ctx = args[0].ctx
15125             self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15126             return
15127         if len(args) == 1 and isinstance(args[0], schedule_node_guard):
15128             self.ctx = args[0].ctx
15129             self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15130             return
15131         if len(args) == 1 and isinstance(args[0], schedule_node_mark):
15132             self.ctx = args[0].ctx
15133             self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15134             return
15135         if len(args) == 1 and isinstance(args[0], schedule_node_sequence):
15136             self.ctx = args[0].ctx
15137             self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15138             return
15139         if len(args) == 1 and isinstance(args[0], schedule_node_set):
15140             self.ctx = args[0].ctx
15141             self.ptr = isl.isl_schedule_node_copy(args[0].ptr)
15142             return
15143         raise Error
15144     def __del__(self):
15145         if hasattr(self, 'ptr'):
15146             isl.isl_schedule_node_free(self.ptr)
15147     def __new__(cls, *args, **keywords):
15148         if "ptr" in keywords:
15149             type = isl.isl_schedule_node_get_type(keywords["ptr"])
15150             if type == 0:
15151                 return schedule_node_band(**keywords)
15152             if type == 1:
15153                 return schedule_node_context(**keywords)
15154             if type == 2:
15155                 return schedule_node_domain(**keywords)
15156             if type == 3:
15157                 return schedule_node_expansion(**keywords)
15158             if type == 4:
15159                 return schedule_node_extension(**keywords)
15160             if type == 5:
15161                 return schedule_node_filter(**keywords)
15162             if type == 6:
15163                 return schedule_node_leaf(**keywords)
15164             if type == 7:
15165                 return schedule_node_guard(**keywords)
15166             if type == 8:
15167                 return schedule_node_mark(**keywords)
15168             if type == 9:
15169                 return schedule_node_sequence(**keywords)
15170             if type == 10:
15171                 return schedule_node_set(**keywords)
15172             raise Error
15173         return super(schedule_node, cls).__new__(cls)
15174     def __str__(arg0):
15175         try:
15176             if not arg0.__class__ is schedule_node:
15177                 arg0 = schedule_node(arg0)
15178         except:
15179             raise
15180         ptr = isl.isl_schedule_node_to_str(arg0.ptr)
15181         res = cast(ptr, c_char_p).value.decode('ascii')
15182         libc.free(ptr)
15183         return res
15184     def __repr__(self):
15185         s = str(self)
15186         if '"' in s:
15187             return 'isl.schedule_node("""%s""")' % s
15188         else:
15189             return 'isl.schedule_node("%s")' % s
15190     def ancestor(arg0, arg1):
15191         try:
15192             if not arg0.__class__ is schedule_node:
15193                 arg0 = schedule_node(arg0)
15194         except:
15195             raise
15196         ctx = arg0.ctx
15197         res = isl.isl_schedule_node_ancestor(isl.isl_schedule_node_copy(arg0.ptr), arg1)
15198         obj = schedule_node(ctx=ctx, ptr=res)
15199         return obj
15200     def ancestor_child_position(arg0, arg1):
15201         try:
15202             if not arg0.__class__ is schedule_node:
15203                 arg0 = schedule_node(arg0)
15204         except:
15205             raise
15206         try:
15207             if not arg1.__class__ is schedule_node:
15208                 arg1 = schedule_node(arg1)
15209         except:
15210             raise
15211         ctx = arg0.ctx
15212         res = isl.isl_schedule_node_get_ancestor_child_position(arg0.ptr, arg1.ptr)
15213         if res < 0:
15214             raise Error
15215         return int(res)
15216     def get_ancestor_child_position(arg0, arg1):
15217         return arg0.ancestor_child_position(arg1)
15218     def child(arg0, arg1):
15219         try:
15220             if not arg0.__class__ is schedule_node:
15221                 arg0 = schedule_node(arg0)
15222         except:
15223             raise
15224         ctx = arg0.ctx
15225         res = isl.isl_schedule_node_child(isl.isl_schedule_node_copy(arg0.ptr), arg1)
15226         obj = schedule_node(ctx=ctx, ptr=res)
15227         return obj
15228     def child_position(arg0):
15229         try:
15230             if not arg0.__class__ is schedule_node:
15231                 arg0 = schedule_node(arg0)
15232         except:
15233             raise
15234         ctx = arg0.ctx
15235         res = isl.isl_schedule_node_get_child_position(arg0.ptr)
15236         if res < 0:
15237             raise Error
15238         return int(res)
15239     def get_child_position(arg0):
15240         return arg0.child_position()
15241     def every_descendant(arg0, arg1):
15242         try:
15243             if not arg0.__class__ is schedule_node:
15244                 arg0 = schedule_node(arg0)
15245         except:
15246             raise
15247         exc_info = [None]
15248         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
15249         def cb_func(cb_arg0, cb_arg1):
15250             cb_arg0 = schedule_node(ctx=arg0.ctx, ptr=isl.isl_schedule_node_copy(cb_arg0))
15251             try:
15252                 res = arg1(cb_arg0)
15253             except BaseException as e:
15254                 exc_info[0] = e
15255                 return -1
15256             return 1 if res else 0
15257         cb1 = fn(cb_func)
15258         ctx = arg0.ctx
15259         res = isl.isl_schedule_node_every_descendant(arg0.ptr, cb1, None)
15260         if exc_info[0] is not None:
15261             raise exc_info[0]
15262         if res < 0:
15263             raise Error
15264         return bool(res)
15265     def first_child(arg0):
15266         try:
15267             if not arg0.__class__ is schedule_node:
15268                 arg0 = schedule_node(arg0)
15269         except:
15270             raise
15271         ctx = arg0.ctx
15272         res = isl.isl_schedule_node_first_child(isl.isl_schedule_node_copy(arg0.ptr))
15273         obj = schedule_node(ctx=ctx, ptr=res)
15274         return obj
15275     def foreach_ancestor_top_down(arg0, arg1):
15276         try:
15277             if not arg0.__class__ is schedule_node:
15278                 arg0 = schedule_node(arg0)
15279         except:
15280             raise
15281         exc_info = [None]
15282         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
15283         def cb_func(cb_arg0, cb_arg1):
15284             cb_arg0 = schedule_node(ctx=arg0.ctx, ptr=isl.isl_schedule_node_copy(cb_arg0))
15285             try:
15286                 arg1(cb_arg0)
15287             except BaseException as e:
15288                 exc_info[0] = e
15289                 return -1
15290             return 0
15291         cb1 = fn(cb_func)
15292         ctx = arg0.ctx
15293         res = isl.isl_schedule_node_foreach_ancestor_top_down(arg0.ptr, cb1, None)
15294         if exc_info[0] is not None:
15295             raise exc_info[0]
15296         if res < 0:
15297             raise Error
15298     def foreach_descendant_top_down(arg0, arg1):
15299         try:
15300             if not arg0.__class__ is schedule_node:
15301                 arg0 = schedule_node(arg0)
15302         except:
15303             raise
15304         exc_info = [None]
15305         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
15306         def cb_func(cb_arg0, cb_arg1):
15307             cb_arg0 = schedule_node(ctx=arg0.ctx, ptr=isl.isl_schedule_node_copy(cb_arg0))
15308             try:
15309                 res = arg1(cb_arg0)
15310             except BaseException as e:
15311                 exc_info[0] = e
15312                 return -1
15313             return 1 if res else 0
15314         cb1 = fn(cb_func)
15315         ctx = arg0.ctx
15316         res = isl.isl_schedule_node_foreach_descendant_top_down(arg0.ptr, cb1, None)
15317         if exc_info[0] is not None:
15318             raise exc_info[0]
15319         if res < 0:
15320             raise Error
15321     @staticmethod
15322     def from_domain(arg0):
15323         try:
15324             if not arg0.__class__ is union_set:
15325                 arg0 = union_set(arg0)
15326         except:
15327             raise
15328         ctx = arg0.ctx
15329         res = isl.isl_schedule_node_from_domain(isl.isl_union_set_copy(arg0.ptr))
15330         obj = schedule_node(ctx=ctx, ptr=res)
15331         return obj
15332     @staticmethod
15333     def from_extension(arg0):
15334         try:
15335             if not arg0.__class__ is union_map:
15336                 arg0 = union_map(arg0)
15337         except:
15338             raise
15339         ctx = arg0.ctx
15340         res = isl.isl_schedule_node_from_extension(isl.isl_union_map_copy(arg0.ptr))
15341         obj = schedule_node(ctx=ctx, ptr=res)
15342         return obj
15343     def graft_after(arg0, arg1):
15344         try:
15345             if not arg0.__class__ is schedule_node:
15346                 arg0 = schedule_node(arg0)
15347         except:
15348             raise
15349         try:
15350             if not arg1.__class__ is schedule_node:
15351                 arg1 = schedule_node(arg1)
15352         except:
15353             raise
15354         ctx = arg0.ctx
15355         res = isl.isl_schedule_node_graft_after(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_schedule_node_copy(arg1.ptr))
15356         obj = schedule_node(ctx=ctx, ptr=res)
15357         return obj
15358     def graft_before(arg0, arg1):
15359         try:
15360             if not arg0.__class__ is schedule_node:
15361                 arg0 = schedule_node(arg0)
15362         except:
15363             raise
15364         try:
15365             if not arg1.__class__ is schedule_node:
15366                 arg1 = schedule_node(arg1)
15367         except:
15368             raise
15369         ctx = arg0.ctx
15370         res = isl.isl_schedule_node_graft_before(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_schedule_node_copy(arg1.ptr))
15371         obj = schedule_node(ctx=ctx, ptr=res)
15372         return obj
15373     def has_children(arg0):
15374         try:
15375             if not arg0.__class__ is schedule_node:
15376                 arg0 = schedule_node(arg0)
15377         except:
15378             raise
15379         ctx = arg0.ctx
15380         res = isl.isl_schedule_node_has_children(arg0.ptr)
15381         if res < 0:
15382             raise Error
15383         return bool(res)
15384     def has_next_sibling(arg0):
15385         try:
15386             if not arg0.__class__ is schedule_node:
15387                 arg0 = schedule_node(arg0)
15388         except:
15389             raise
15390         ctx = arg0.ctx
15391         res = isl.isl_schedule_node_has_next_sibling(arg0.ptr)
15392         if res < 0:
15393             raise Error
15394         return bool(res)
15395     def has_parent(arg0):
15396         try:
15397             if not arg0.__class__ is schedule_node:
15398                 arg0 = schedule_node(arg0)
15399         except:
15400             raise
15401         ctx = arg0.ctx
15402         res = isl.isl_schedule_node_has_parent(arg0.ptr)
15403         if res < 0:
15404             raise Error
15405         return bool(res)
15406     def has_previous_sibling(arg0):
15407         try:
15408             if not arg0.__class__ is schedule_node:
15409                 arg0 = schedule_node(arg0)
15410         except:
15411             raise
15412         ctx = arg0.ctx
15413         res = isl.isl_schedule_node_has_previous_sibling(arg0.ptr)
15414         if res < 0:
15415             raise Error
15416         return bool(res)
15417     def insert_context(arg0, arg1):
15418         try:
15419             if not arg0.__class__ is schedule_node:
15420                 arg0 = schedule_node(arg0)
15421         except:
15422             raise
15423         try:
15424             if not arg1.__class__ is set:
15425                 arg1 = set(arg1)
15426         except:
15427             raise
15428         ctx = arg0.ctx
15429         res = isl.isl_schedule_node_insert_context(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
15430         obj = schedule_node(ctx=ctx, ptr=res)
15431         return obj
15432     def insert_filter(arg0, arg1):
15433         try:
15434             if not arg0.__class__ is schedule_node:
15435                 arg0 = schedule_node(arg0)
15436         except:
15437             raise
15438         try:
15439             if not arg1.__class__ is union_set:
15440                 arg1 = union_set(arg1)
15441         except:
15442             raise
15443         ctx = arg0.ctx
15444         res = isl.isl_schedule_node_insert_filter(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
15445         obj = schedule_node(ctx=ctx, ptr=res)
15446         return obj
15447     def insert_guard(arg0, arg1):
15448         try:
15449             if not arg0.__class__ is schedule_node:
15450                 arg0 = schedule_node(arg0)
15451         except:
15452             raise
15453         try:
15454             if not arg1.__class__ is set:
15455                 arg1 = set(arg1)
15456         except:
15457             raise
15458         ctx = arg0.ctx
15459         res = isl.isl_schedule_node_insert_guard(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
15460         obj = schedule_node(ctx=ctx, ptr=res)
15461         return obj
15462     def insert_mark(arg0, arg1):
15463         try:
15464             if not arg0.__class__ is schedule_node:
15465                 arg0 = schedule_node(arg0)
15466         except:
15467             raise
15468         try:
15469             if not arg1.__class__ is id:
15470                 arg1 = id(arg1)
15471         except:
15472             raise
15473         ctx = arg0.ctx
15474         res = isl.isl_schedule_node_insert_mark(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_id_copy(arg1.ptr))
15475         obj = schedule_node(ctx=ctx, ptr=res)
15476         return obj
15477     def insert_partial_schedule(arg0, arg1):
15478         try:
15479             if not arg0.__class__ is schedule_node:
15480                 arg0 = schedule_node(arg0)
15481         except:
15482             raise
15483         try:
15484             if not arg1.__class__ is multi_union_pw_aff:
15485                 arg1 = multi_union_pw_aff(arg1)
15486         except:
15487             raise
15488         ctx = arg0.ctx
15489         res = isl.isl_schedule_node_insert_partial_schedule(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_multi_union_pw_aff_copy(arg1.ptr))
15490         obj = schedule_node(ctx=ctx, ptr=res)
15491         return obj
15492     def insert_sequence(arg0, arg1):
15493         try:
15494             if not arg0.__class__ is schedule_node:
15495                 arg0 = schedule_node(arg0)
15496         except:
15497             raise
15498         try:
15499             if not arg1.__class__ is union_set_list:
15500                 arg1 = union_set_list(arg1)
15501         except:
15502             raise
15503         ctx = arg0.ctx
15504         res = isl.isl_schedule_node_insert_sequence(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_union_set_list_copy(arg1.ptr))
15505         obj = schedule_node(ctx=ctx, ptr=res)
15506         return obj
15507     def insert_set(arg0, arg1):
15508         try:
15509             if not arg0.__class__ is schedule_node:
15510                 arg0 = schedule_node(arg0)
15511         except:
15512             raise
15513         try:
15514             if not arg1.__class__ is union_set_list:
15515                 arg1 = union_set_list(arg1)
15516         except:
15517             raise
15518         ctx = arg0.ctx
15519         res = isl.isl_schedule_node_insert_set(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_union_set_list_copy(arg1.ptr))
15520         obj = schedule_node(ctx=ctx, ptr=res)
15521         return obj
15522     def is_equal(arg0, arg1):
15523         try:
15524             if not arg0.__class__ is schedule_node:
15525                 arg0 = schedule_node(arg0)
15526         except:
15527             raise
15528         try:
15529             if not arg1.__class__ is schedule_node:
15530                 arg1 = schedule_node(arg1)
15531         except:
15532             raise
15533         ctx = arg0.ctx
15534         res = isl.isl_schedule_node_is_equal(arg0.ptr, arg1.ptr)
15535         if res < 0:
15536             raise Error
15537         return bool(res)
15538     def is_subtree_anchored(arg0):
15539         try:
15540             if not arg0.__class__ is schedule_node:
15541                 arg0 = schedule_node(arg0)
15542         except:
15543             raise
15544         ctx = arg0.ctx
15545         res = isl.isl_schedule_node_is_subtree_anchored(arg0.ptr)
15546         if res < 0:
15547             raise Error
15548         return bool(res)
15549     def map_descendant_bottom_up(arg0, arg1):
15550         try:
15551             if not arg0.__class__ is schedule_node:
15552                 arg0 = schedule_node(arg0)
15553         except:
15554             raise
15555         exc_info = [None]
15556         fn = CFUNCTYPE(c_void_p, c_void_p, c_void_p)
15557         def cb_func(cb_arg0, cb_arg1):
15558             cb_arg0 = schedule_node(ctx=arg0.ctx, ptr=(cb_arg0))
15559             try:
15560                 res = arg1(cb_arg0)
15561             except BaseException as e:
15562                 exc_info[0] = e
15563                 return None
15564             return isl.isl_schedule_node_copy(res.ptr)
15565         cb1 = fn(cb_func)
15566         ctx = arg0.ctx
15567         res = isl.isl_schedule_node_map_descendant_bottom_up(isl.isl_schedule_node_copy(arg0.ptr), cb1, None)
15568         if exc_info[0] is not None:
15569             raise exc_info[0]
15570         obj = schedule_node(ctx=ctx, ptr=res)
15571         return obj
15572     def n_children(arg0):
15573         try:
15574             if not arg0.__class__ is schedule_node:
15575                 arg0 = schedule_node(arg0)
15576         except:
15577             raise
15578         ctx = arg0.ctx
15579         res = isl.isl_schedule_node_n_children(arg0.ptr)
15580         if res < 0:
15581             raise Error
15582         return int(res)
15583     def next_sibling(arg0):
15584         try:
15585             if not arg0.__class__ is schedule_node:
15586                 arg0 = schedule_node(arg0)
15587         except:
15588             raise
15589         ctx = arg0.ctx
15590         res = isl.isl_schedule_node_next_sibling(isl.isl_schedule_node_copy(arg0.ptr))
15591         obj = schedule_node(ctx=ctx, ptr=res)
15592         return obj
15593     def order_after(arg0, arg1):
15594         try:
15595             if not arg0.__class__ is schedule_node:
15596                 arg0 = schedule_node(arg0)
15597         except:
15598             raise
15599         try:
15600             if not arg1.__class__ is union_set:
15601                 arg1 = union_set(arg1)
15602         except:
15603             raise
15604         ctx = arg0.ctx
15605         res = isl.isl_schedule_node_order_after(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
15606         obj = schedule_node(ctx=ctx, ptr=res)
15607         return obj
15608     def order_before(arg0, arg1):
15609         try:
15610             if not arg0.__class__ is schedule_node:
15611                 arg0 = schedule_node(arg0)
15612         except:
15613             raise
15614         try:
15615             if not arg1.__class__ is union_set:
15616                 arg1 = union_set(arg1)
15617         except:
15618             raise
15619         ctx = arg0.ctx
15620         res = isl.isl_schedule_node_order_before(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
15621         obj = schedule_node(ctx=ctx, ptr=res)
15622         return obj
15623     def parent(arg0):
15624         try:
15625             if not arg0.__class__ is schedule_node:
15626                 arg0 = schedule_node(arg0)
15627         except:
15628             raise
15629         ctx = arg0.ctx
15630         res = isl.isl_schedule_node_parent(isl.isl_schedule_node_copy(arg0.ptr))
15631         obj = schedule_node(ctx=ctx, ptr=res)
15632         return obj
15633     def prefix_schedule_multi_union_pw_aff(arg0):
15634         try:
15635             if not arg0.__class__ is schedule_node:
15636                 arg0 = schedule_node(arg0)
15637         except:
15638             raise
15639         ctx = arg0.ctx
15640         res = isl.isl_schedule_node_get_prefix_schedule_multi_union_pw_aff(arg0.ptr)
15641         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
15642         return obj
15643     def get_prefix_schedule_multi_union_pw_aff(arg0):
15644         return arg0.prefix_schedule_multi_union_pw_aff()
15645     def prefix_schedule_union_map(arg0):
15646         try:
15647             if not arg0.__class__ is schedule_node:
15648                 arg0 = schedule_node(arg0)
15649         except:
15650             raise
15651         ctx = arg0.ctx
15652         res = isl.isl_schedule_node_get_prefix_schedule_union_map(arg0.ptr)
15653         obj = union_map(ctx=ctx, ptr=res)
15654         return obj
15655     def get_prefix_schedule_union_map(arg0):
15656         return arg0.prefix_schedule_union_map()
15657     def prefix_schedule_union_pw_multi_aff(arg0):
15658         try:
15659             if not arg0.__class__ is schedule_node:
15660                 arg0 = schedule_node(arg0)
15661         except:
15662             raise
15663         ctx = arg0.ctx
15664         res = isl.isl_schedule_node_get_prefix_schedule_union_pw_multi_aff(arg0.ptr)
15665         obj = union_pw_multi_aff(ctx=ctx, ptr=res)
15666         return obj
15667     def get_prefix_schedule_union_pw_multi_aff(arg0):
15668         return arg0.prefix_schedule_union_pw_multi_aff()
15669     def previous_sibling(arg0):
15670         try:
15671             if not arg0.__class__ is schedule_node:
15672                 arg0 = schedule_node(arg0)
15673         except:
15674             raise
15675         ctx = arg0.ctx
15676         res = isl.isl_schedule_node_previous_sibling(isl.isl_schedule_node_copy(arg0.ptr))
15677         obj = schedule_node(ctx=ctx, ptr=res)
15678         return obj
15679     def root(arg0):
15680         try:
15681             if not arg0.__class__ is schedule_node:
15682                 arg0 = schedule_node(arg0)
15683         except:
15684             raise
15685         ctx = arg0.ctx
15686         res = isl.isl_schedule_node_root(isl.isl_schedule_node_copy(arg0.ptr))
15687         obj = schedule_node(ctx=ctx, ptr=res)
15688         return obj
15689     def schedule(arg0):
15690         try:
15691             if not arg0.__class__ is schedule_node:
15692                 arg0 = schedule_node(arg0)
15693         except:
15694             raise
15695         ctx = arg0.ctx
15696         res = isl.isl_schedule_node_get_schedule(arg0.ptr)
15697         obj = schedule(ctx=ctx, ptr=res)
15698         return obj
15699     def get_schedule(arg0):
15700         return arg0.schedule()
15701     def shared_ancestor(arg0, arg1):
15702         try:
15703             if not arg0.__class__ is schedule_node:
15704                 arg0 = schedule_node(arg0)
15705         except:
15706             raise
15707         try:
15708             if not arg1.__class__ is schedule_node:
15709                 arg1 = schedule_node(arg1)
15710         except:
15711             raise
15712         ctx = arg0.ctx
15713         res = isl.isl_schedule_node_get_shared_ancestor(arg0.ptr, arg1.ptr)
15714         obj = schedule_node(ctx=ctx, ptr=res)
15715         return obj
15716     def get_shared_ancestor(arg0, arg1):
15717         return arg0.shared_ancestor(arg1)
15718     def tree_depth(arg0):
15719         try:
15720             if not arg0.__class__ is schedule_node:
15721                 arg0 = schedule_node(arg0)
15722         except:
15723             raise
15724         ctx = arg0.ctx
15725         res = isl.isl_schedule_node_get_tree_depth(arg0.ptr)
15726         if res < 0:
15727             raise Error
15728         return int(res)
15729     def get_tree_depth(arg0):
15730         return arg0.tree_depth()
15732 isl.isl_schedule_node_ancestor.restype = c_void_p
15733 isl.isl_schedule_node_ancestor.argtypes = [c_void_p, c_int]
15734 isl.isl_schedule_node_get_ancestor_child_position.argtypes = [c_void_p, c_void_p]
15735 isl.isl_schedule_node_child.restype = c_void_p
15736 isl.isl_schedule_node_child.argtypes = [c_void_p, c_int]
15737 isl.isl_schedule_node_get_child_position.argtypes = [c_void_p]
15738 isl.isl_schedule_node_every_descendant.argtypes = [c_void_p, c_void_p, c_void_p]
15739 isl.isl_schedule_node_first_child.restype = c_void_p
15740 isl.isl_schedule_node_first_child.argtypes = [c_void_p]
15741 isl.isl_schedule_node_foreach_ancestor_top_down.argtypes = [c_void_p, c_void_p, c_void_p]
15742 isl.isl_schedule_node_foreach_descendant_top_down.argtypes = [c_void_p, c_void_p, c_void_p]
15743 isl.isl_schedule_node_from_domain.restype = c_void_p
15744 isl.isl_schedule_node_from_domain.argtypes = [c_void_p]
15745 isl.isl_schedule_node_from_extension.restype = c_void_p
15746 isl.isl_schedule_node_from_extension.argtypes = [c_void_p]
15747 isl.isl_schedule_node_graft_after.restype = c_void_p
15748 isl.isl_schedule_node_graft_after.argtypes = [c_void_p, c_void_p]
15749 isl.isl_schedule_node_graft_before.restype = c_void_p
15750 isl.isl_schedule_node_graft_before.argtypes = [c_void_p, c_void_p]
15751 isl.isl_schedule_node_has_children.argtypes = [c_void_p]
15752 isl.isl_schedule_node_has_next_sibling.argtypes = [c_void_p]
15753 isl.isl_schedule_node_has_parent.argtypes = [c_void_p]
15754 isl.isl_schedule_node_has_previous_sibling.argtypes = [c_void_p]
15755 isl.isl_schedule_node_insert_context.restype = c_void_p
15756 isl.isl_schedule_node_insert_context.argtypes = [c_void_p, c_void_p]
15757 isl.isl_schedule_node_insert_filter.restype = c_void_p
15758 isl.isl_schedule_node_insert_filter.argtypes = [c_void_p, c_void_p]
15759 isl.isl_schedule_node_insert_guard.restype = c_void_p
15760 isl.isl_schedule_node_insert_guard.argtypes = [c_void_p, c_void_p]
15761 isl.isl_schedule_node_insert_mark.restype = c_void_p
15762 isl.isl_schedule_node_insert_mark.argtypes = [c_void_p, c_void_p]
15763 isl.isl_schedule_node_insert_partial_schedule.restype = c_void_p
15764 isl.isl_schedule_node_insert_partial_schedule.argtypes = [c_void_p, c_void_p]
15765 isl.isl_schedule_node_insert_sequence.restype = c_void_p
15766 isl.isl_schedule_node_insert_sequence.argtypes = [c_void_p, c_void_p]
15767 isl.isl_schedule_node_insert_set.restype = c_void_p
15768 isl.isl_schedule_node_insert_set.argtypes = [c_void_p, c_void_p]
15769 isl.isl_schedule_node_is_equal.argtypes = [c_void_p, c_void_p]
15770 isl.isl_schedule_node_is_subtree_anchored.argtypes = [c_void_p]
15771 isl.isl_schedule_node_map_descendant_bottom_up.restype = c_void_p
15772 isl.isl_schedule_node_map_descendant_bottom_up.argtypes = [c_void_p, c_void_p, c_void_p]
15773 isl.isl_schedule_node_n_children.argtypes = [c_void_p]
15774 isl.isl_schedule_node_next_sibling.restype = c_void_p
15775 isl.isl_schedule_node_next_sibling.argtypes = [c_void_p]
15776 isl.isl_schedule_node_order_after.restype = c_void_p
15777 isl.isl_schedule_node_order_after.argtypes = [c_void_p, c_void_p]
15778 isl.isl_schedule_node_order_before.restype = c_void_p
15779 isl.isl_schedule_node_order_before.argtypes = [c_void_p, c_void_p]
15780 isl.isl_schedule_node_parent.restype = c_void_p
15781 isl.isl_schedule_node_parent.argtypes = [c_void_p]
15782 isl.isl_schedule_node_get_prefix_schedule_multi_union_pw_aff.restype = c_void_p
15783 isl.isl_schedule_node_get_prefix_schedule_multi_union_pw_aff.argtypes = [c_void_p]
15784 isl.isl_schedule_node_get_prefix_schedule_union_map.restype = c_void_p
15785 isl.isl_schedule_node_get_prefix_schedule_union_map.argtypes = [c_void_p]
15786 isl.isl_schedule_node_get_prefix_schedule_union_pw_multi_aff.restype = c_void_p
15787 isl.isl_schedule_node_get_prefix_schedule_union_pw_multi_aff.argtypes = [c_void_p]
15788 isl.isl_schedule_node_previous_sibling.restype = c_void_p
15789 isl.isl_schedule_node_previous_sibling.argtypes = [c_void_p]
15790 isl.isl_schedule_node_root.restype = c_void_p
15791 isl.isl_schedule_node_root.argtypes = [c_void_p]
15792 isl.isl_schedule_node_get_schedule.restype = c_void_p
15793 isl.isl_schedule_node_get_schedule.argtypes = [c_void_p]
15794 isl.isl_schedule_node_get_shared_ancestor.restype = c_void_p
15795 isl.isl_schedule_node_get_shared_ancestor.argtypes = [c_void_p, c_void_p]
15796 isl.isl_schedule_node_get_tree_depth.argtypes = [c_void_p]
15797 isl.isl_schedule_node_copy.restype = c_void_p
15798 isl.isl_schedule_node_copy.argtypes = [c_void_p]
15799 isl.isl_schedule_node_free.restype = c_void_p
15800 isl.isl_schedule_node_free.argtypes = [c_void_p]
15801 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
15802 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
15803 isl.isl_schedule_node_get_type.argtypes = [c_void_p]
15805 class schedule_node_band(schedule_node):
15806     def __init__(self, *args, **keywords):
15807         if "ptr" in keywords:
15808             self.ctx = keywords["ctx"]
15809             self.ptr = keywords["ptr"]
15810             return
15811         raise Error
15812     def __del__(self):
15813         if hasattr(self, 'ptr'):
15814             isl.isl_schedule_node_free(self.ptr)
15815     def __new__(cls, *args, **keywords):
15816         return super(schedule_node_band, cls).__new__(cls)
15817     def __str__(arg0):
15818         try:
15819             if not arg0.__class__ is schedule_node_band:
15820                 arg0 = schedule_node_band(arg0)
15821         except:
15822             raise
15823         ptr = isl.isl_schedule_node_to_str(arg0.ptr)
15824         res = cast(ptr, c_char_p).value.decode('ascii')
15825         libc.free(ptr)
15826         return res
15827     def __repr__(self):
15828         s = str(self)
15829         if '"' in s:
15830             return 'isl.schedule_node_band("""%s""")' % s
15831         else:
15832             return 'isl.schedule_node_band("%s")' % s
15833     def ast_build_options(arg0):
15834         try:
15835             if not arg0.__class__ is schedule_node:
15836                 arg0 = schedule_node(arg0)
15837         except:
15838             raise
15839         ctx = arg0.ctx
15840         res = isl.isl_schedule_node_band_get_ast_build_options(arg0.ptr)
15841         obj = union_set(ctx=ctx, ptr=res)
15842         return obj
15843     def get_ast_build_options(arg0):
15844         return arg0.ast_build_options()
15845     def ast_isolate_option(arg0):
15846         try:
15847             if not arg0.__class__ is schedule_node:
15848                 arg0 = schedule_node(arg0)
15849         except:
15850             raise
15851         ctx = arg0.ctx
15852         res = isl.isl_schedule_node_band_get_ast_isolate_option(arg0.ptr)
15853         obj = set(ctx=ctx, ptr=res)
15854         return obj
15855     def get_ast_isolate_option(arg0):
15856         return arg0.ast_isolate_option()
15857     def member_get_coincident(arg0, arg1):
15858         try:
15859             if not arg0.__class__ is schedule_node:
15860                 arg0 = schedule_node(arg0)
15861         except:
15862             raise
15863         ctx = arg0.ctx
15864         res = isl.isl_schedule_node_band_member_get_coincident(arg0.ptr, arg1)
15865         if res < 0:
15866             raise Error
15867         return bool(res)
15868     def member_set_coincident(arg0, arg1, arg2):
15869         try:
15870             if not arg0.__class__ is schedule_node:
15871                 arg0 = schedule_node(arg0)
15872         except:
15873             raise
15874         ctx = arg0.ctx
15875         res = isl.isl_schedule_node_band_member_set_coincident(isl.isl_schedule_node_copy(arg0.ptr), arg1, arg2)
15876         obj = schedule_node(ctx=ctx, ptr=res)
15877         return obj
15878     def mod(arg0, arg1):
15879         try:
15880             if not arg0.__class__ is schedule_node:
15881                 arg0 = schedule_node(arg0)
15882         except:
15883             raise
15884         try:
15885             if not arg1.__class__ is multi_val:
15886                 arg1 = multi_val(arg1)
15887         except:
15888             raise
15889         ctx = arg0.ctx
15890         res = isl.isl_schedule_node_band_mod(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
15891         obj = schedule_node(ctx=ctx, ptr=res)
15892         return obj
15893     def n_member(arg0):
15894         try:
15895             if not arg0.__class__ is schedule_node:
15896                 arg0 = schedule_node(arg0)
15897         except:
15898             raise
15899         ctx = arg0.ctx
15900         res = isl.isl_schedule_node_band_n_member(arg0.ptr)
15901         if res < 0:
15902             raise Error
15903         return int(res)
15904     def partial_schedule(arg0):
15905         try:
15906             if not arg0.__class__ is schedule_node:
15907                 arg0 = schedule_node(arg0)
15908         except:
15909             raise
15910         ctx = arg0.ctx
15911         res = isl.isl_schedule_node_band_get_partial_schedule(arg0.ptr)
15912         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
15913         return obj
15914     def get_partial_schedule(arg0):
15915         return arg0.partial_schedule()
15916     def permutable(arg0):
15917         try:
15918             if not arg0.__class__ is schedule_node:
15919                 arg0 = schedule_node(arg0)
15920         except:
15921             raise
15922         ctx = arg0.ctx
15923         res = isl.isl_schedule_node_band_get_permutable(arg0.ptr)
15924         if res < 0:
15925             raise Error
15926         return bool(res)
15927     def get_permutable(arg0):
15928         return arg0.permutable()
15929     def scale(arg0, arg1):
15930         try:
15931             if not arg0.__class__ is schedule_node:
15932                 arg0 = schedule_node(arg0)
15933         except:
15934             raise
15935         try:
15936             if not arg1.__class__ is multi_val:
15937                 arg1 = multi_val(arg1)
15938         except:
15939             raise
15940         ctx = arg0.ctx
15941         res = isl.isl_schedule_node_band_scale(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
15942         obj = schedule_node(ctx=ctx, ptr=res)
15943         return obj
15944     def scale_down(arg0, arg1):
15945         try:
15946             if not arg0.__class__ is schedule_node:
15947                 arg0 = schedule_node(arg0)
15948         except:
15949             raise
15950         try:
15951             if not arg1.__class__ is multi_val:
15952                 arg1 = multi_val(arg1)
15953         except:
15954             raise
15955         ctx = arg0.ctx
15956         res = isl.isl_schedule_node_band_scale_down(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
15957         obj = schedule_node(ctx=ctx, ptr=res)
15958         return obj
15959     def set_ast_build_options(arg0, arg1):
15960         try:
15961             if not arg0.__class__ is schedule_node:
15962                 arg0 = schedule_node(arg0)
15963         except:
15964             raise
15965         try:
15966             if not arg1.__class__ is union_set:
15967                 arg1 = union_set(arg1)
15968         except:
15969             raise
15970         ctx = arg0.ctx
15971         res = isl.isl_schedule_node_band_set_ast_build_options(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
15972         obj = schedule_node(ctx=ctx, ptr=res)
15973         return obj
15974     def set_permutable(arg0, arg1):
15975         try:
15976             if not arg0.__class__ is schedule_node:
15977                 arg0 = schedule_node(arg0)
15978         except:
15979             raise
15980         ctx = arg0.ctx
15981         res = isl.isl_schedule_node_band_set_permutable(isl.isl_schedule_node_copy(arg0.ptr), arg1)
15982         obj = schedule_node(ctx=ctx, ptr=res)
15983         return obj
15984     def shift(arg0, arg1):
15985         try:
15986             if not arg0.__class__ is schedule_node:
15987                 arg0 = schedule_node(arg0)
15988         except:
15989             raise
15990         try:
15991             if not arg1.__class__ is multi_union_pw_aff:
15992                 arg1 = multi_union_pw_aff(arg1)
15993         except:
15994             raise
15995         ctx = arg0.ctx
15996         res = isl.isl_schedule_node_band_shift(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_multi_union_pw_aff_copy(arg1.ptr))
15997         obj = schedule_node(ctx=ctx, ptr=res)
15998         return obj
15999     def split(arg0, arg1):
16000         try:
16001             if not arg0.__class__ is schedule_node:
16002                 arg0 = schedule_node(arg0)
16003         except:
16004             raise
16005         ctx = arg0.ctx
16006         res = isl.isl_schedule_node_band_split(isl.isl_schedule_node_copy(arg0.ptr), arg1)
16007         obj = schedule_node(ctx=ctx, ptr=res)
16008         return obj
16009     def tile(arg0, arg1):
16010         try:
16011             if not arg0.__class__ is schedule_node:
16012                 arg0 = schedule_node(arg0)
16013         except:
16014             raise
16015         try:
16016             if not arg1.__class__ is multi_val:
16017                 arg1 = multi_val(arg1)
16018         except:
16019             raise
16020         ctx = arg0.ctx
16021         res = isl.isl_schedule_node_band_tile(isl.isl_schedule_node_copy(arg0.ptr), isl.isl_multi_val_copy(arg1.ptr))
16022         obj = schedule_node(ctx=ctx, ptr=res)
16023         return obj
16024     def member_set_ast_loop_default(arg0, arg1):
16025         try:
16026             if not arg0.__class__ is schedule_node:
16027                 arg0 = schedule_node(arg0)
16028         except:
16029             raise
16030         ctx = arg0.ctx
16031         res = isl.isl_schedule_node_band_member_set_ast_loop_type(isl.isl_schedule_node_copy(arg0.ptr), arg1, 0)
16032         obj = schedule_node(ctx=ctx, ptr=res)
16033         return obj
16034     def member_set_ast_loop_atomic(arg0, arg1):
16035         try:
16036             if not arg0.__class__ is schedule_node:
16037                 arg0 = schedule_node(arg0)
16038         except:
16039             raise
16040         ctx = arg0.ctx
16041         res = isl.isl_schedule_node_band_member_set_ast_loop_type(isl.isl_schedule_node_copy(arg0.ptr), arg1, 1)
16042         obj = schedule_node(ctx=ctx, ptr=res)
16043         return obj
16044     def member_set_ast_loop_unroll(arg0, arg1):
16045         try:
16046             if not arg0.__class__ is schedule_node:
16047                 arg0 = schedule_node(arg0)
16048         except:
16049             raise
16050         ctx = arg0.ctx
16051         res = isl.isl_schedule_node_band_member_set_ast_loop_type(isl.isl_schedule_node_copy(arg0.ptr), arg1, 2)
16052         obj = schedule_node(ctx=ctx, ptr=res)
16053         return obj
16054     def member_set_ast_loop_separate(arg0, arg1):
16055         try:
16056             if not arg0.__class__ is schedule_node:
16057                 arg0 = schedule_node(arg0)
16058         except:
16059             raise
16060         ctx = arg0.ctx
16061         res = isl.isl_schedule_node_band_member_set_ast_loop_type(isl.isl_schedule_node_copy(arg0.ptr), arg1, 3)
16062         obj = schedule_node(ctx=ctx, ptr=res)
16063         return obj
16065 isl.isl_schedule_node_band_get_ast_build_options.restype = c_void_p
16066 isl.isl_schedule_node_band_get_ast_build_options.argtypes = [c_void_p]
16067 isl.isl_schedule_node_band_get_ast_isolate_option.restype = c_void_p
16068 isl.isl_schedule_node_band_get_ast_isolate_option.argtypes = [c_void_p]
16069 isl.isl_schedule_node_band_member_get_coincident.argtypes = [c_void_p, c_int]
16070 isl.isl_schedule_node_band_member_set_coincident.restype = c_void_p
16071 isl.isl_schedule_node_band_member_set_coincident.argtypes = [c_void_p, c_int, c_int]
16072 isl.isl_schedule_node_band_mod.restype = c_void_p
16073 isl.isl_schedule_node_band_mod.argtypes = [c_void_p, c_void_p]
16074 isl.isl_schedule_node_band_n_member.argtypes = [c_void_p]
16075 isl.isl_schedule_node_band_get_partial_schedule.restype = c_void_p
16076 isl.isl_schedule_node_band_get_partial_schedule.argtypes = [c_void_p]
16077 isl.isl_schedule_node_band_get_permutable.argtypes = [c_void_p]
16078 isl.isl_schedule_node_band_scale.restype = c_void_p
16079 isl.isl_schedule_node_band_scale.argtypes = [c_void_p, c_void_p]
16080 isl.isl_schedule_node_band_scale_down.restype = c_void_p
16081 isl.isl_schedule_node_band_scale_down.argtypes = [c_void_p, c_void_p]
16082 isl.isl_schedule_node_band_set_ast_build_options.restype = c_void_p
16083 isl.isl_schedule_node_band_set_ast_build_options.argtypes = [c_void_p, c_void_p]
16084 isl.isl_schedule_node_band_set_permutable.restype = c_void_p
16085 isl.isl_schedule_node_band_set_permutable.argtypes = [c_void_p, c_int]
16086 isl.isl_schedule_node_band_shift.restype = c_void_p
16087 isl.isl_schedule_node_band_shift.argtypes = [c_void_p, c_void_p]
16088 isl.isl_schedule_node_band_split.restype = c_void_p
16089 isl.isl_schedule_node_band_split.argtypes = [c_void_p, c_int]
16090 isl.isl_schedule_node_band_tile.restype = c_void_p
16091 isl.isl_schedule_node_band_tile.argtypes = [c_void_p, c_void_p]
16092 isl.isl_schedule_node_band_member_set_ast_loop_type.restype = c_void_p
16093 isl.isl_schedule_node_band_member_set_ast_loop_type.argtypes = [c_void_p, c_int, c_int]
16094 isl.isl_schedule_node_copy.restype = c_void_p
16095 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16096 isl.isl_schedule_node_free.restype = c_void_p
16097 isl.isl_schedule_node_free.argtypes = [c_void_p]
16098 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16099 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16101 class schedule_node_context(schedule_node):
16102     def __init__(self, *args, **keywords):
16103         if "ptr" in keywords:
16104             self.ctx = keywords["ctx"]
16105             self.ptr = keywords["ptr"]
16106             return
16107         raise Error
16108     def __del__(self):
16109         if hasattr(self, 'ptr'):
16110             isl.isl_schedule_node_free(self.ptr)
16111     def __new__(cls, *args, **keywords):
16112         return super(schedule_node_context, cls).__new__(cls)
16113     def __str__(arg0):
16114         try:
16115             if not arg0.__class__ is schedule_node_context:
16116                 arg0 = schedule_node_context(arg0)
16117         except:
16118             raise
16119         ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16120         res = cast(ptr, c_char_p).value.decode('ascii')
16121         libc.free(ptr)
16122         return res
16123     def __repr__(self):
16124         s = str(self)
16125         if '"' in s:
16126             return 'isl.schedule_node_context("""%s""")' % s
16127         else:
16128             return 'isl.schedule_node_context("%s")' % s
16129     def context(arg0):
16130         try:
16131             if not arg0.__class__ is schedule_node:
16132                 arg0 = schedule_node(arg0)
16133         except:
16134             raise
16135         ctx = arg0.ctx
16136         res = isl.isl_schedule_node_context_get_context(arg0.ptr)
16137         obj = set(ctx=ctx, ptr=res)
16138         return obj
16139     def get_context(arg0):
16140         return arg0.context()
16142 isl.isl_schedule_node_context_get_context.restype = c_void_p
16143 isl.isl_schedule_node_context_get_context.argtypes = [c_void_p]
16144 isl.isl_schedule_node_copy.restype = c_void_p
16145 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16146 isl.isl_schedule_node_free.restype = c_void_p
16147 isl.isl_schedule_node_free.argtypes = [c_void_p]
16148 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16149 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16151 class schedule_node_domain(schedule_node):
16152     def __init__(self, *args, **keywords):
16153         if "ptr" in keywords:
16154             self.ctx = keywords["ctx"]
16155             self.ptr = keywords["ptr"]
16156             return
16157         raise Error
16158     def __del__(self):
16159         if hasattr(self, 'ptr'):
16160             isl.isl_schedule_node_free(self.ptr)
16161     def __new__(cls, *args, **keywords):
16162         return super(schedule_node_domain, cls).__new__(cls)
16163     def __str__(arg0):
16164         try:
16165             if not arg0.__class__ is schedule_node_domain:
16166                 arg0 = schedule_node_domain(arg0)
16167         except:
16168             raise
16169         ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16170         res = cast(ptr, c_char_p).value.decode('ascii')
16171         libc.free(ptr)
16172         return res
16173     def __repr__(self):
16174         s = str(self)
16175         if '"' in s:
16176             return 'isl.schedule_node_domain("""%s""")' % s
16177         else:
16178             return 'isl.schedule_node_domain("%s")' % s
16179     def domain(arg0):
16180         try:
16181             if not arg0.__class__ is schedule_node:
16182                 arg0 = schedule_node(arg0)
16183         except:
16184             raise
16185         ctx = arg0.ctx
16186         res = isl.isl_schedule_node_domain_get_domain(arg0.ptr)
16187         obj = union_set(ctx=ctx, ptr=res)
16188         return obj
16189     def get_domain(arg0):
16190         return arg0.domain()
16192 isl.isl_schedule_node_domain_get_domain.restype = c_void_p
16193 isl.isl_schedule_node_domain_get_domain.argtypes = [c_void_p]
16194 isl.isl_schedule_node_copy.restype = c_void_p
16195 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16196 isl.isl_schedule_node_free.restype = c_void_p
16197 isl.isl_schedule_node_free.argtypes = [c_void_p]
16198 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16199 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16201 class schedule_node_expansion(schedule_node):
16202     def __init__(self, *args, **keywords):
16203         if "ptr" in keywords:
16204             self.ctx = keywords["ctx"]
16205             self.ptr = keywords["ptr"]
16206             return
16207         raise Error
16208     def __del__(self):
16209         if hasattr(self, 'ptr'):
16210             isl.isl_schedule_node_free(self.ptr)
16211     def __new__(cls, *args, **keywords):
16212         return super(schedule_node_expansion, cls).__new__(cls)
16213     def __str__(arg0):
16214         try:
16215             if not arg0.__class__ is schedule_node_expansion:
16216                 arg0 = schedule_node_expansion(arg0)
16217         except:
16218             raise
16219         ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16220         res = cast(ptr, c_char_p).value.decode('ascii')
16221         libc.free(ptr)
16222         return res
16223     def __repr__(self):
16224         s = str(self)
16225         if '"' in s:
16226             return 'isl.schedule_node_expansion("""%s""")' % s
16227         else:
16228             return 'isl.schedule_node_expansion("%s")' % s
16229     def contraction(arg0):
16230         try:
16231             if not arg0.__class__ is schedule_node:
16232                 arg0 = schedule_node(arg0)
16233         except:
16234             raise
16235         ctx = arg0.ctx
16236         res = isl.isl_schedule_node_expansion_get_contraction(arg0.ptr)
16237         obj = union_pw_multi_aff(ctx=ctx, ptr=res)
16238         return obj
16239     def get_contraction(arg0):
16240         return arg0.contraction()
16241     def expansion(arg0):
16242         try:
16243             if not arg0.__class__ is schedule_node:
16244                 arg0 = schedule_node(arg0)
16245         except:
16246             raise
16247         ctx = arg0.ctx
16248         res = isl.isl_schedule_node_expansion_get_expansion(arg0.ptr)
16249         obj = union_map(ctx=ctx, ptr=res)
16250         return obj
16251     def get_expansion(arg0):
16252         return arg0.expansion()
16254 isl.isl_schedule_node_expansion_get_contraction.restype = c_void_p
16255 isl.isl_schedule_node_expansion_get_contraction.argtypes = [c_void_p]
16256 isl.isl_schedule_node_expansion_get_expansion.restype = c_void_p
16257 isl.isl_schedule_node_expansion_get_expansion.argtypes = [c_void_p]
16258 isl.isl_schedule_node_copy.restype = c_void_p
16259 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16260 isl.isl_schedule_node_free.restype = c_void_p
16261 isl.isl_schedule_node_free.argtypes = [c_void_p]
16262 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16263 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16265 class schedule_node_extension(schedule_node):
16266     def __init__(self, *args, **keywords):
16267         if "ptr" in keywords:
16268             self.ctx = keywords["ctx"]
16269             self.ptr = keywords["ptr"]
16270             return
16271         raise Error
16272     def __del__(self):
16273         if hasattr(self, 'ptr'):
16274             isl.isl_schedule_node_free(self.ptr)
16275     def __new__(cls, *args, **keywords):
16276         return super(schedule_node_extension, cls).__new__(cls)
16277     def __str__(arg0):
16278         try:
16279             if not arg0.__class__ is schedule_node_extension:
16280                 arg0 = schedule_node_extension(arg0)
16281         except:
16282             raise
16283         ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16284         res = cast(ptr, c_char_p).value.decode('ascii')
16285         libc.free(ptr)
16286         return res
16287     def __repr__(self):
16288         s = str(self)
16289         if '"' in s:
16290             return 'isl.schedule_node_extension("""%s""")' % s
16291         else:
16292             return 'isl.schedule_node_extension("%s")' % s
16293     def extension(arg0):
16294         try:
16295             if not arg0.__class__ is schedule_node:
16296                 arg0 = schedule_node(arg0)
16297         except:
16298             raise
16299         ctx = arg0.ctx
16300         res = isl.isl_schedule_node_extension_get_extension(arg0.ptr)
16301         obj = union_map(ctx=ctx, ptr=res)
16302         return obj
16303     def get_extension(arg0):
16304         return arg0.extension()
16306 isl.isl_schedule_node_extension_get_extension.restype = c_void_p
16307 isl.isl_schedule_node_extension_get_extension.argtypes = [c_void_p]
16308 isl.isl_schedule_node_copy.restype = c_void_p
16309 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16310 isl.isl_schedule_node_free.restype = c_void_p
16311 isl.isl_schedule_node_free.argtypes = [c_void_p]
16312 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16313 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16315 class schedule_node_filter(schedule_node):
16316     def __init__(self, *args, **keywords):
16317         if "ptr" in keywords:
16318             self.ctx = keywords["ctx"]
16319             self.ptr = keywords["ptr"]
16320             return
16321         raise Error
16322     def __del__(self):
16323         if hasattr(self, 'ptr'):
16324             isl.isl_schedule_node_free(self.ptr)
16325     def __new__(cls, *args, **keywords):
16326         return super(schedule_node_filter, cls).__new__(cls)
16327     def __str__(arg0):
16328         try:
16329             if not arg0.__class__ is schedule_node_filter:
16330                 arg0 = schedule_node_filter(arg0)
16331         except:
16332             raise
16333         ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16334         res = cast(ptr, c_char_p).value.decode('ascii')
16335         libc.free(ptr)
16336         return res
16337     def __repr__(self):
16338         s = str(self)
16339         if '"' in s:
16340             return 'isl.schedule_node_filter("""%s""")' % s
16341         else:
16342             return 'isl.schedule_node_filter("%s")' % s
16343     def filter(arg0):
16344         try:
16345             if not arg0.__class__ is schedule_node:
16346                 arg0 = schedule_node(arg0)
16347         except:
16348             raise
16349         ctx = arg0.ctx
16350         res = isl.isl_schedule_node_filter_get_filter(arg0.ptr)
16351         obj = union_set(ctx=ctx, ptr=res)
16352         return obj
16353     def get_filter(arg0):
16354         return arg0.filter()
16356 isl.isl_schedule_node_filter_get_filter.restype = c_void_p
16357 isl.isl_schedule_node_filter_get_filter.argtypes = [c_void_p]
16358 isl.isl_schedule_node_copy.restype = c_void_p
16359 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16360 isl.isl_schedule_node_free.restype = c_void_p
16361 isl.isl_schedule_node_free.argtypes = [c_void_p]
16362 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16363 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16365 class schedule_node_guard(schedule_node):
16366     def __init__(self, *args, **keywords):
16367         if "ptr" in keywords:
16368             self.ctx = keywords["ctx"]
16369             self.ptr = keywords["ptr"]
16370             return
16371         raise Error
16372     def __del__(self):
16373         if hasattr(self, 'ptr'):
16374             isl.isl_schedule_node_free(self.ptr)
16375     def __new__(cls, *args, **keywords):
16376         return super(schedule_node_guard, cls).__new__(cls)
16377     def __str__(arg0):
16378         try:
16379             if not arg0.__class__ is schedule_node_guard:
16380                 arg0 = schedule_node_guard(arg0)
16381         except:
16382             raise
16383         ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16384         res = cast(ptr, c_char_p).value.decode('ascii')
16385         libc.free(ptr)
16386         return res
16387     def __repr__(self):
16388         s = str(self)
16389         if '"' in s:
16390             return 'isl.schedule_node_guard("""%s""")' % s
16391         else:
16392             return 'isl.schedule_node_guard("%s")' % s
16393     def guard(arg0):
16394         try:
16395             if not arg0.__class__ is schedule_node:
16396                 arg0 = schedule_node(arg0)
16397         except:
16398             raise
16399         ctx = arg0.ctx
16400         res = isl.isl_schedule_node_guard_get_guard(arg0.ptr)
16401         obj = set(ctx=ctx, ptr=res)
16402         return obj
16403     def get_guard(arg0):
16404         return arg0.guard()
16406 isl.isl_schedule_node_guard_get_guard.restype = c_void_p
16407 isl.isl_schedule_node_guard_get_guard.argtypes = [c_void_p]
16408 isl.isl_schedule_node_copy.restype = c_void_p
16409 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16410 isl.isl_schedule_node_free.restype = c_void_p
16411 isl.isl_schedule_node_free.argtypes = [c_void_p]
16412 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16413 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16415 class schedule_node_leaf(schedule_node):
16416     def __init__(self, *args, **keywords):
16417         if "ptr" in keywords:
16418             self.ctx = keywords["ctx"]
16419             self.ptr = keywords["ptr"]
16420             return
16421         raise Error
16422     def __del__(self):
16423         if hasattr(self, 'ptr'):
16424             isl.isl_schedule_node_free(self.ptr)
16425     def __new__(cls, *args, **keywords):
16426         return super(schedule_node_leaf, cls).__new__(cls)
16427     def __str__(arg0):
16428         try:
16429             if not arg0.__class__ is schedule_node_leaf:
16430                 arg0 = schedule_node_leaf(arg0)
16431         except:
16432             raise
16433         ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16434         res = cast(ptr, c_char_p).value.decode('ascii')
16435         libc.free(ptr)
16436         return res
16437     def __repr__(self):
16438         s = str(self)
16439         if '"' in s:
16440             return 'isl.schedule_node_leaf("""%s""")' % s
16441         else:
16442             return 'isl.schedule_node_leaf("%s")' % s
16444 isl.isl_schedule_node_copy.restype = c_void_p
16445 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16446 isl.isl_schedule_node_free.restype = c_void_p
16447 isl.isl_schedule_node_free.argtypes = [c_void_p]
16448 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16449 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16451 class schedule_node_mark(schedule_node):
16452     def __init__(self, *args, **keywords):
16453         if "ptr" in keywords:
16454             self.ctx = keywords["ctx"]
16455             self.ptr = keywords["ptr"]
16456             return
16457         raise Error
16458     def __del__(self):
16459         if hasattr(self, 'ptr'):
16460             isl.isl_schedule_node_free(self.ptr)
16461     def __new__(cls, *args, **keywords):
16462         return super(schedule_node_mark, cls).__new__(cls)
16463     def __str__(arg0):
16464         try:
16465             if not arg0.__class__ is schedule_node_mark:
16466                 arg0 = schedule_node_mark(arg0)
16467         except:
16468             raise
16469         ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16470         res = cast(ptr, c_char_p).value.decode('ascii')
16471         libc.free(ptr)
16472         return res
16473     def __repr__(self):
16474         s = str(self)
16475         if '"' in s:
16476             return 'isl.schedule_node_mark("""%s""")' % s
16477         else:
16478             return 'isl.schedule_node_mark("%s")' % s
16480 isl.isl_schedule_node_copy.restype = c_void_p
16481 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16482 isl.isl_schedule_node_free.restype = c_void_p
16483 isl.isl_schedule_node_free.argtypes = [c_void_p]
16484 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16485 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16487 class schedule_node_sequence(schedule_node):
16488     def __init__(self, *args, **keywords):
16489         if "ptr" in keywords:
16490             self.ctx = keywords["ctx"]
16491             self.ptr = keywords["ptr"]
16492             return
16493         raise Error
16494     def __del__(self):
16495         if hasattr(self, 'ptr'):
16496             isl.isl_schedule_node_free(self.ptr)
16497     def __new__(cls, *args, **keywords):
16498         return super(schedule_node_sequence, cls).__new__(cls)
16499     def __str__(arg0):
16500         try:
16501             if not arg0.__class__ is schedule_node_sequence:
16502                 arg0 = schedule_node_sequence(arg0)
16503         except:
16504             raise
16505         ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16506         res = cast(ptr, c_char_p).value.decode('ascii')
16507         libc.free(ptr)
16508         return res
16509     def __repr__(self):
16510         s = str(self)
16511         if '"' in s:
16512             return 'isl.schedule_node_sequence("""%s""")' % s
16513         else:
16514             return 'isl.schedule_node_sequence("%s")' % s
16516 isl.isl_schedule_node_copy.restype = c_void_p
16517 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16518 isl.isl_schedule_node_free.restype = c_void_p
16519 isl.isl_schedule_node_free.argtypes = [c_void_p]
16520 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16521 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16523 class schedule_node_set(schedule_node):
16524     def __init__(self, *args, **keywords):
16525         if "ptr" in keywords:
16526             self.ctx = keywords["ctx"]
16527             self.ptr = keywords["ptr"]
16528             return
16529         raise Error
16530     def __del__(self):
16531         if hasattr(self, 'ptr'):
16532             isl.isl_schedule_node_free(self.ptr)
16533     def __new__(cls, *args, **keywords):
16534         return super(schedule_node_set, cls).__new__(cls)
16535     def __str__(arg0):
16536         try:
16537             if not arg0.__class__ is schedule_node_set:
16538                 arg0 = schedule_node_set(arg0)
16539         except:
16540             raise
16541         ptr = isl.isl_schedule_node_to_str(arg0.ptr)
16542         res = cast(ptr, c_char_p).value.decode('ascii')
16543         libc.free(ptr)
16544         return res
16545     def __repr__(self):
16546         s = str(self)
16547         if '"' in s:
16548             return 'isl.schedule_node_set("""%s""")' % s
16549         else:
16550             return 'isl.schedule_node_set("%s")' % s
16552 isl.isl_schedule_node_copy.restype = c_void_p
16553 isl.isl_schedule_node_copy.argtypes = [c_void_p]
16554 isl.isl_schedule_node_free.restype = c_void_p
16555 isl.isl_schedule_node_free.argtypes = [c_void_p]
16556 isl.isl_schedule_node_to_str.restype = POINTER(c_char)
16557 isl.isl_schedule_node_to_str.argtypes = [c_void_p]
16559 class set_list(object):
16560     def __init__(self, *args, **keywords):
16561         if "ptr" in keywords:
16562             self.ctx = keywords["ctx"]
16563             self.ptr = keywords["ptr"]
16564             return
16565         if len(args) == 1 and type(args[0]) == int:
16566             self.ctx = Context.getDefaultInstance()
16567             self.ptr = isl.isl_set_list_alloc(self.ctx, args[0])
16568             return
16569         if len(args) == 1 and args[0].__class__ is set:
16570             self.ctx = Context.getDefaultInstance()
16571             self.ptr = isl.isl_set_list_from_set(isl.isl_set_copy(args[0].ptr))
16572             return
16573         if len(args) == 1 and type(args[0]) == str:
16574             self.ctx = Context.getDefaultInstance()
16575             self.ptr = isl.isl_set_list_read_from_str(self.ctx, args[0].encode('ascii'))
16576             return
16577         raise Error
16578     def __del__(self):
16579         if hasattr(self, 'ptr'):
16580             isl.isl_set_list_free(self.ptr)
16581     def __str__(arg0):
16582         try:
16583             if not arg0.__class__ is set_list:
16584                 arg0 = set_list(arg0)
16585         except:
16586             raise
16587         ptr = isl.isl_set_list_to_str(arg0.ptr)
16588         res = cast(ptr, c_char_p).value.decode('ascii')
16589         libc.free(ptr)
16590         return res
16591     def __repr__(self):
16592         s = str(self)
16593         if '"' in s:
16594             return 'isl.set_list("""%s""")' % s
16595         else:
16596             return 'isl.set_list("%s")' % s
16597     def add(arg0, arg1):
16598         try:
16599             if not arg0.__class__ is set_list:
16600                 arg0 = set_list(arg0)
16601         except:
16602             raise
16603         try:
16604             if not arg1.__class__ is set:
16605                 arg1 = set(arg1)
16606         except:
16607             raise
16608         ctx = arg0.ctx
16609         res = isl.isl_set_list_add(isl.isl_set_list_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
16610         obj = set_list(ctx=ctx, ptr=res)
16611         return obj
16612     def at(arg0, arg1):
16613         try:
16614             if not arg0.__class__ is set_list:
16615                 arg0 = set_list(arg0)
16616         except:
16617             raise
16618         ctx = arg0.ctx
16619         res = isl.isl_set_list_get_at(arg0.ptr, arg1)
16620         obj = set(ctx=ctx, ptr=res)
16621         return obj
16622     def get_at(arg0, arg1):
16623         return arg0.at(arg1)
16624     def clear(arg0):
16625         try:
16626             if not arg0.__class__ is set_list:
16627                 arg0 = set_list(arg0)
16628         except:
16629             raise
16630         ctx = arg0.ctx
16631         res = isl.isl_set_list_clear(isl.isl_set_list_copy(arg0.ptr))
16632         obj = set_list(ctx=ctx, ptr=res)
16633         return obj
16634     def concat(arg0, arg1):
16635         try:
16636             if not arg0.__class__ is set_list:
16637                 arg0 = set_list(arg0)
16638         except:
16639             raise
16640         try:
16641             if not arg1.__class__ is set_list:
16642                 arg1 = set_list(arg1)
16643         except:
16644             raise
16645         ctx = arg0.ctx
16646         res = isl.isl_set_list_concat(isl.isl_set_list_copy(arg0.ptr), isl.isl_set_list_copy(arg1.ptr))
16647         obj = set_list(ctx=ctx, ptr=res)
16648         return obj
16649     def drop(arg0, arg1, arg2):
16650         try:
16651             if not arg0.__class__ is set_list:
16652                 arg0 = set_list(arg0)
16653         except:
16654             raise
16655         ctx = arg0.ctx
16656         res = isl.isl_set_list_drop(isl.isl_set_list_copy(arg0.ptr), arg1, arg2)
16657         obj = set_list(ctx=ctx, ptr=res)
16658         return obj
16659     def foreach(arg0, arg1):
16660         try:
16661             if not arg0.__class__ is set_list:
16662                 arg0 = set_list(arg0)
16663         except:
16664             raise
16665         exc_info = [None]
16666         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
16667         def cb_func(cb_arg0, cb_arg1):
16668             cb_arg0 = set(ctx=arg0.ctx, ptr=(cb_arg0))
16669             try:
16670                 arg1(cb_arg0)
16671             except BaseException as e:
16672                 exc_info[0] = e
16673                 return -1
16674             return 0
16675         cb1 = fn(cb_func)
16676         ctx = arg0.ctx
16677         res = isl.isl_set_list_foreach(arg0.ptr, cb1, None)
16678         if exc_info[0] is not None:
16679             raise exc_info[0]
16680         if res < 0:
16681             raise Error
16682     def foreach_scc(arg0, arg1, arg2):
16683         try:
16684             if not arg0.__class__ is set_list:
16685                 arg0 = set_list(arg0)
16686         except:
16687             raise
16688         exc_info = [None]
16689         fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
16690         def cb_func(cb_arg0, cb_arg1, cb_arg2):
16691             cb_arg0 = set(ctx=arg0.ctx, ptr=isl.isl_set_copy(cb_arg0))
16692             cb_arg1 = set(ctx=arg0.ctx, ptr=isl.isl_set_copy(cb_arg1))
16693             try:
16694                 res = arg1(cb_arg0, cb_arg1)
16695             except BaseException as e:
16696                 exc_info[0] = e
16697                 return -1
16698             return 1 if res else 0
16699         cb1 = fn(cb_func)
16700         exc_info = [None]
16701         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
16702         def cb_func(cb_arg0, cb_arg1):
16703             cb_arg0 = set_list(ctx=arg0.ctx, ptr=(cb_arg0))
16704             try:
16705                 arg2(cb_arg0)
16706             except BaseException as e:
16707                 exc_info[0] = e
16708                 return -1
16709             return 0
16710         cb2 = fn(cb_func)
16711         ctx = arg0.ctx
16712         res = isl.isl_set_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
16713         if exc_info[0] is not None:
16714             raise exc_info[0]
16715         if res < 0:
16716             raise Error
16717     def insert(arg0, arg1, arg2):
16718         try:
16719             if not arg0.__class__ is set_list:
16720                 arg0 = set_list(arg0)
16721         except:
16722             raise
16723         try:
16724             if not arg2.__class__ is set:
16725                 arg2 = set(arg2)
16726         except:
16727             raise
16728         ctx = arg0.ctx
16729         res = isl.isl_set_list_insert(isl.isl_set_list_copy(arg0.ptr), arg1, isl.isl_set_copy(arg2.ptr))
16730         obj = set_list(ctx=ctx, ptr=res)
16731         return obj
16732     def set_at(arg0, arg1, arg2):
16733         try:
16734             if not arg0.__class__ is set_list:
16735                 arg0 = set_list(arg0)
16736         except:
16737             raise
16738         try:
16739             if not arg2.__class__ is set:
16740                 arg2 = set(arg2)
16741         except:
16742             raise
16743         ctx = arg0.ctx
16744         res = isl.isl_set_list_set_at(isl.isl_set_list_copy(arg0.ptr), arg1, isl.isl_set_copy(arg2.ptr))
16745         obj = set_list(ctx=ctx, ptr=res)
16746         return obj
16747     def size(arg0):
16748         try:
16749             if not arg0.__class__ is set_list:
16750                 arg0 = set_list(arg0)
16751         except:
16752             raise
16753         ctx = arg0.ctx
16754         res = isl.isl_set_list_size(arg0.ptr)
16755         if res < 0:
16756             raise Error
16757         return int(res)
16759 isl.isl_set_list_alloc.restype = c_void_p
16760 isl.isl_set_list_alloc.argtypes = [Context, c_int]
16761 isl.isl_set_list_from_set.restype = c_void_p
16762 isl.isl_set_list_from_set.argtypes = [c_void_p]
16763 isl.isl_set_list_read_from_str.restype = c_void_p
16764 isl.isl_set_list_read_from_str.argtypes = [Context, c_char_p]
16765 isl.isl_set_list_add.restype = c_void_p
16766 isl.isl_set_list_add.argtypes = [c_void_p, c_void_p]
16767 isl.isl_set_list_get_at.restype = c_void_p
16768 isl.isl_set_list_get_at.argtypes = [c_void_p, c_int]
16769 isl.isl_set_list_clear.restype = c_void_p
16770 isl.isl_set_list_clear.argtypes = [c_void_p]
16771 isl.isl_set_list_concat.restype = c_void_p
16772 isl.isl_set_list_concat.argtypes = [c_void_p, c_void_p]
16773 isl.isl_set_list_drop.restype = c_void_p
16774 isl.isl_set_list_drop.argtypes = [c_void_p, c_int, c_int]
16775 isl.isl_set_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
16776 isl.isl_set_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
16777 isl.isl_set_list_insert.restype = c_void_p
16778 isl.isl_set_list_insert.argtypes = [c_void_p, c_int, c_void_p]
16779 isl.isl_set_list_set_at.restype = c_void_p
16780 isl.isl_set_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
16781 isl.isl_set_list_size.argtypes = [c_void_p]
16782 isl.isl_set_list_copy.restype = c_void_p
16783 isl.isl_set_list_copy.argtypes = [c_void_p]
16784 isl.isl_set_list_free.restype = c_void_p
16785 isl.isl_set_list_free.argtypes = [c_void_p]
16786 isl.isl_set_list_to_str.restype = POINTER(c_char)
16787 isl.isl_set_list_to_str.argtypes = [c_void_p]
16789 class space(object):
16790     def __init__(self, *args, **keywords):
16791         if "ptr" in keywords:
16792             self.ctx = keywords["ctx"]
16793             self.ptr = keywords["ptr"]
16794             return
16795         if len(args) == 1 and type(args[0]) == str:
16796             self.ctx = Context.getDefaultInstance()
16797             self.ptr = isl.isl_space_read_from_str(self.ctx, args[0].encode('ascii'))
16798             return
16799         raise Error
16800     def __del__(self):
16801         if hasattr(self, 'ptr'):
16802             isl.isl_space_free(self.ptr)
16803     def __str__(arg0):
16804         try:
16805             if not arg0.__class__ is space:
16806                 arg0 = space(arg0)
16807         except:
16808             raise
16809         ptr = isl.isl_space_to_str(arg0.ptr)
16810         res = cast(ptr, c_char_p).value.decode('ascii')
16811         libc.free(ptr)
16812         return res
16813     def __repr__(self):
16814         s = str(self)
16815         if '"' in s:
16816             return 'isl.space("""%s""")' % s
16817         else:
16818             return 'isl.space("%s")' % s
16819     def add_named_tuple(*args):
16820         if len(args) == 3 and (args[1].__class__ is id or type(args[1]) == str) and type(args[2]) == int:
16821             args = list(args)
16822             try:
16823                 if not args[0].__class__ is space:
16824                     args[0] = space(args[0])
16825             except:
16826                 raise
16827             try:
16828                 if not args[1].__class__ is id:
16829                     args[1] = id(args[1])
16830             except:
16831                 raise
16832             ctx = args[0].ctx
16833             res = isl.isl_space_add_named_tuple_id_ui(isl.isl_space_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr), args[2])
16834             obj = space(ctx=ctx, ptr=res)
16835             return obj
16836         raise Error
16837     def add_param(*args):
16838         if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
16839             args = list(args)
16840             try:
16841                 if not args[0].__class__ is space:
16842                     args[0] = space(args[0])
16843             except:
16844                 raise
16845             try:
16846                 if not args[1].__class__ is id:
16847                     args[1] = id(args[1])
16848             except:
16849                 raise
16850             ctx = args[0].ctx
16851             res = isl.isl_space_add_param_id(isl.isl_space_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
16852             obj = space(ctx=ctx, ptr=res)
16853             return obj
16854         raise Error
16855     def add_unnamed_tuple(*args):
16856         if len(args) == 2 and type(args[1]) == int:
16857             args = list(args)
16858             try:
16859                 if not args[0].__class__ is space:
16860                     args[0] = space(args[0])
16861             except:
16862                 raise
16863             ctx = args[0].ctx
16864             res = isl.isl_space_add_unnamed_tuple_ui(isl.isl_space_copy(args[0].ptr), args[1])
16865             obj = space(ctx=ctx, ptr=res)
16866             return obj
16867         raise Error
16868     def curry(arg0):
16869         try:
16870             if not arg0.__class__ is space:
16871                 arg0 = space(arg0)
16872         except:
16873             raise
16874         ctx = arg0.ctx
16875         res = isl.isl_space_curry(isl.isl_space_copy(arg0.ptr))
16876         obj = space(ctx=ctx, ptr=res)
16877         return obj
16878     def domain(arg0):
16879         try:
16880             if not arg0.__class__ is space:
16881                 arg0 = space(arg0)
16882         except:
16883             raise
16884         ctx = arg0.ctx
16885         res = isl.isl_space_domain(isl.isl_space_copy(arg0.ptr))
16886         obj = space(ctx=ctx, ptr=res)
16887         return obj
16888     def domain_map_multi_aff(arg0):
16889         try:
16890             if not arg0.__class__ is space:
16891                 arg0 = space(arg0)
16892         except:
16893             raise
16894         ctx = arg0.ctx
16895         res = isl.isl_space_domain_map_multi_aff(isl.isl_space_copy(arg0.ptr))
16896         obj = multi_aff(ctx=ctx, ptr=res)
16897         return obj
16898     def domain_map_pw_multi_aff(arg0):
16899         try:
16900             if not arg0.__class__ is space:
16901                 arg0 = space(arg0)
16902         except:
16903             raise
16904         ctx = arg0.ctx
16905         res = isl.isl_space_domain_map_pw_multi_aff(isl.isl_space_copy(arg0.ptr))
16906         obj = pw_multi_aff(ctx=ctx, ptr=res)
16907         return obj
16908     def domain_reverse(arg0):
16909         try:
16910             if not arg0.__class__ is space:
16911                 arg0 = space(arg0)
16912         except:
16913             raise
16914         ctx = arg0.ctx
16915         res = isl.isl_space_domain_reverse(isl.isl_space_copy(arg0.ptr))
16916         obj = space(ctx=ctx, ptr=res)
16917         return obj
16918     def domain_tuple_id(arg0):
16919         try:
16920             if not arg0.__class__ is space:
16921                 arg0 = space(arg0)
16922         except:
16923             raise
16924         ctx = arg0.ctx
16925         res = isl.isl_space_get_domain_tuple_id(arg0.ptr)
16926         obj = id(ctx=ctx, ptr=res)
16927         return obj
16928     def get_domain_tuple_id(arg0):
16929         return arg0.domain_tuple_id()
16930     def drop_all_params(arg0):
16931         try:
16932             if not arg0.__class__ is space:
16933                 arg0 = space(arg0)
16934         except:
16935             raise
16936         ctx = arg0.ctx
16937         res = isl.isl_space_drop_all_params(isl.isl_space_copy(arg0.ptr))
16938         obj = space(ctx=ctx, ptr=res)
16939         return obj
16940     def flatten_domain(arg0):
16941         try:
16942             if not arg0.__class__ is space:
16943                 arg0 = space(arg0)
16944         except:
16945             raise
16946         ctx = arg0.ctx
16947         res = isl.isl_space_flatten_domain(isl.isl_space_copy(arg0.ptr))
16948         obj = space(ctx=ctx, ptr=res)
16949         return obj
16950     def flatten_range(arg0):
16951         try:
16952             if not arg0.__class__ is space:
16953                 arg0 = space(arg0)
16954         except:
16955             raise
16956         ctx = arg0.ctx
16957         res = isl.isl_space_flatten_range(isl.isl_space_copy(arg0.ptr))
16958         obj = space(ctx=ctx, ptr=res)
16959         return obj
16960     def has_domain_tuple_id(arg0):
16961         try:
16962             if not arg0.__class__ is space:
16963                 arg0 = space(arg0)
16964         except:
16965             raise
16966         ctx = arg0.ctx
16967         res = isl.isl_space_has_domain_tuple_id(arg0.ptr)
16968         if res < 0:
16969             raise Error
16970         return bool(res)
16971     def has_range_tuple_id(arg0):
16972         try:
16973             if not arg0.__class__ is space:
16974                 arg0 = space(arg0)
16975         except:
16976             raise
16977         ctx = arg0.ctx
16978         res = isl.isl_space_has_range_tuple_id(arg0.ptr)
16979         if res < 0:
16980             raise Error
16981         return bool(res)
16982     def identity_multi_aff_on_domain(arg0):
16983         try:
16984             if not arg0.__class__ is space:
16985                 arg0 = space(arg0)
16986         except:
16987             raise
16988         ctx = arg0.ctx
16989         res = isl.isl_space_identity_multi_aff_on_domain(isl.isl_space_copy(arg0.ptr))
16990         obj = multi_aff(ctx=ctx, ptr=res)
16991         return obj
16992     def identity_multi_pw_aff_on_domain(arg0):
16993         try:
16994             if not arg0.__class__ is space:
16995                 arg0 = space(arg0)
16996         except:
16997             raise
16998         ctx = arg0.ctx
16999         res = isl.isl_space_identity_multi_pw_aff_on_domain(isl.isl_space_copy(arg0.ptr))
17000         obj = multi_pw_aff(ctx=ctx, ptr=res)
17001         return obj
17002     def identity_pw_multi_aff_on_domain(arg0):
17003         try:
17004             if not arg0.__class__ is space:
17005                 arg0 = space(arg0)
17006         except:
17007             raise
17008         ctx = arg0.ctx
17009         res = isl.isl_space_identity_pw_multi_aff_on_domain(isl.isl_space_copy(arg0.ptr))
17010         obj = pw_multi_aff(ctx=ctx, ptr=res)
17011         return obj
17012     def is_equal(arg0, arg1):
17013         try:
17014             if not arg0.__class__ is space:
17015                 arg0 = space(arg0)
17016         except:
17017             raise
17018         try:
17019             if not arg1.__class__ is space:
17020                 arg1 = space(arg1)
17021         except:
17022             raise
17023         ctx = arg0.ctx
17024         res = isl.isl_space_is_equal(arg0.ptr, arg1.ptr)
17025         if res < 0:
17026             raise Error
17027         return bool(res)
17028     def is_wrapping(arg0):
17029         try:
17030             if not arg0.__class__ is space:
17031                 arg0 = space(arg0)
17032         except:
17033             raise
17034         ctx = arg0.ctx
17035         res = isl.isl_space_is_wrapping(arg0.ptr)
17036         if res < 0:
17037             raise Error
17038         return bool(res)
17039     def map_from_set(arg0):
17040         try:
17041             if not arg0.__class__ is space:
17042                 arg0 = space(arg0)
17043         except:
17044             raise
17045         ctx = arg0.ctx
17046         res = isl.isl_space_map_from_set(isl.isl_space_copy(arg0.ptr))
17047         obj = space(ctx=ctx, ptr=res)
17048         return obj
17049     def multi_aff(arg0, arg1):
17050         try:
17051             if not arg0.__class__ is space:
17052                 arg0 = space(arg0)
17053         except:
17054             raise
17055         try:
17056             if not arg1.__class__ is aff_list:
17057                 arg1 = aff_list(arg1)
17058         except:
17059             raise
17060         ctx = arg0.ctx
17061         res = isl.isl_space_multi_aff(isl.isl_space_copy(arg0.ptr), isl.isl_aff_list_copy(arg1.ptr))
17062         obj = multi_aff(ctx=ctx, ptr=res)
17063         return obj
17064     def multi_aff_on_domain(*args):
17065         if len(args) == 2 and args[1].__class__ is multi_val:
17066             args = list(args)
17067             try:
17068                 if not args[0].__class__ is space:
17069                     args[0] = space(args[0])
17070             except:
17071                 raise
17072             ctx = args[0].ctx
17073             res = isl.isl_space_multi_aff_on_domain_multi_val(isl.isl_space_copy(args[0].ptr), isl.isl_multi_val_copy(args[1].ptr))
17074             obj = multi_aff(ctx=ctx, ptr=res)
17075             return obj
17076         raise Error
17077     def multi_id(arg0, arg1):
17078         try:
17079             if not arg0.__class__ is space:
17080                 arg0 = space(arg0)
17081         except:
17082             raise
17083         try:
17084             if not arg1.__class__ is id_list:
17085                 arg1 = id_list(arg1)
17086         except:
17087             raise
17088         ctx = arg0.ctx
17089         res = isl.isl_space_multi_id(isl.isl_space_copy(arg0.ptr), isl.isl_id_list_copy(arg1.ptr))
17090         obj = multi_id(ctx=ctx, ptr=res)
17091         return obj
17092     def multi_pw_aff(arg0, arg1):
17093         try:
17094             if not arg0.__class__ is space:
17095                 arg0 = space(arg0)
17096         except:
17097             raise
17098         try:
17099             if not arg1.__class__ is pw_aff_list:
17100                 arg1 = pw_aff_list(arg1)
17101         except:
17102             raise
17103         ctx = arg0.ctx
17104         res = isl.isl_space_multi_pw_aff(isl.isl_space_copy(arg0.ptr), isl.isl_pw_aff_list_copy(arg1.ptr))
17105         obj = multi_pw_aff(ctx=ctx, ptr=res)
17106         return obj
17107     def multi_union_pw_aff(arg0, arg1):
17108         try:
17109             if not arg0.__class__ is space:
17110                 arg0 = space(arg0)
17111         except:
17112             raise
17113         try:
17114             if not arg1.__class__ is union_pw_aff_list:
17115                 arg1 = union_pw_aff_list(arg1)
17116         except:
17117             raise
17118         ctx = arg0.ctx
17119         res = isl.isl_space_multi_union_pw_aff(isl.isl_space_copy(arg0.ptr), isl.isl_union_pw_aff_list_copy(arg1.ptr))
17120         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
17121         return obj
17122     def multi_val(arg0, arg1):
17123         try:
17124             if not arg0.__class__ is space:
17125                 arg0 = space(arg0)
17126         except:
17127             raise
17128         try:
17129             if not arg1.__class__ is val_list:
17130                 arg1 = val_list(arg1)
17131         except:
17132             raise
17133         ctx = arg0.ctx
17134         res = isl.isl_space_multi_val(isl.isl_space_copy(arg0.ptr), isl.isl_val_list_copy(arg1.ptr))
17135         obj = multi_val(ctx=ctx, ptr=res)
17136         return obj
17137     def param_aff_on_domain(*args):
17138         if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
17139             args = list(args)
17140             try:
17141                 if not args[0].__class__ is space:
17142                     args[0] = space(args[0])
17143             except:
17144                 raise
17145             try:
17146                 if not args[1].__class__ is id:
17147                     args[1] = id(args[1])
17148             except:
17149                 raise
17150             ctx = args[0].ctx
17151             res = isl.isl_space_param_aff_on_domain_id(isl.isl_space_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
17152             obj = aff(ctx=ctx, ptr=res)
17153             return obj
17154         raise Error
17155     def params(arg0):
17156         try:
17157             if not arg0.__class__ is space:
17158                 arg0 = space(arg0)
17159         except:
17160             raise
17161         ctx = arg0.ctx
17162         res = isl.isl_space_params(isl.isl_space_copy(arg0.ptr))
17163         obj = space(ctx=ctx, ptr=res)
17164         return obj
17165     def product(arg0, arg1):
17166         try:
17167             if not arg0.__class__ is space:
17168                 arg0 = space(arg0)
17169         except:
17170             raise
17171         try:
17172             if not arg1.__class__ is space:
17173                 arg1 = space(arg1)
17174         except:
17175             raise
17176         ctx = arg0.ctx
17177         res = isl.isl_space_product(isl.isl_space_copy(arg0.ptr), isl.isl_space_copy(arg1.ptr))
17178         obj = space(ctx=ctx, ptr=res)
17179         return obj
17180     def range(arg0):
17181         try:
17182             if not arg0.__class__ is space:
17183                 arg0 = space(arg0)
17184         except:
17185             raise
17186         ctx = arg0.ctx
17187         res = isl.isl_space_range(isl.isl_space_copy(arg0.ptr))
17188         obj = space(ctx=ctx, ptr=res)
17189         return obj
17190     def range_map_multi_aff(arg0):
17191         try:
17192             if not arg0.__class__ is space:
17193                 arg0 = space(arg0)
17194         except:
17195             raise
17196         ctx = arg0.ctx
17197         res = isl.isl_space_range_map_multi_aff(isl.isl_space_copy(arg0.ptr))
17198         obj = multi_aff(ctx=ctx, ptr=res)
17199         return obj
17200     def range_map_pw_multi_aff(arg0):
17201         try:
17202             if not arg0.__class__ is space:
17203                 arg0 = space(arg0)
17204         except:
17205             raise
17206         ctx = arg0.ctx
17207         res = isl.isl_space_range_map_pw_multi_aff(isl.isl_space_copy(arg0.ptr))
17208         obj = pw_multi_aff(ctx=ctx, ptr=res)
17209         return obj
17210     def range_reverse(arg0):
17211         try:
17212             if not arg0.__class__ is space:
17213                 arg0 = space(arg0)
17214         except:
17215             raise
17216         ctx = arg0.ctx
17217         res = isl.isl_space_range_reverse(isl.isl_space_copy(arg0.ptr))
17218         obj = space(ctx=ctx, ptr=res)
17219         return obj
17220     def range_tuple_id(arg0):
17221         try:
17222             if not arg0.__class__ is space:
17223                 arg0 = space(arg0)
17224         except:
17225             raise
17226         ctx = arg0.ctx
17227         res = isl.isl_space_get_range_tuple_id(arg0.ptr)
17228         obj = id(ctx=ctx, ptr=res)
17229         return obj
17230     def get_range_tuple_id(arg0):
17231         return arg0.range_tuple_id()
17232     def reverse(arg0):
17233         try:
17234             if not arg0.__class__ is space:
17235                 arg0 = space(arg0)
17236         except:
17237             raise
17238         ctx = arg0.ctx
17239         res = isl.isl_space_reverse(isl.isl_space_copy(arg0.ptr))
17240         obj = space(ctx=ctx, ptr=res)
17241         return obj
17242     def set_domain_tuple(*args):
17243         if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
17244             args = list(args)
17245             try:
17246                 if not args[0].__class__ is space:
17247                     args[0] = space(args[0])
17248             except:
17249                 raise
17250             try:
17251                 if not args[1].__class__ is id:
17252                     args[1] = id(args[1])
17253             except:
17254                 raise
17255             ctx = args[0].ctx
17256             res = isl.isl_space_set_domain_tuple_id(isl.isl_space_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
17257             obj = space(ctx=ctx, ptr=res)
17258             return obj
17259         raise Error
17260     def set_range_tuple(*args):
17261         if len(args) == 2 and (args[1].__class__ is id or type(args[1]) == str):
17262             args = list(args)
17263             try:
17264                 if not args[0].__class__ is space:
17265                     args[0] = space(args[0])
17266             except:
17267                 raise
17268             try:
17269                 if not args[1].__class__ is id:
17270                     args[1] = id(args[1])
17271             except:
17272                 raise
17273             ctx = args[0].ctx
17274             res = isl.isl_space_set_range_tuple_id(isl.isl_space_copy(args[0].ptr), isl.isl_id_copy(args[1].ptr))
17275             obj = space(ctx=ctx, ptr=res)
17276             return obj
17277         raise Error
17278     def uncurry(arg0):
17279         try:
17280             if not arg0.__class__ is space:
17281                 arg0 = space(arg0)
17282         except:
17283             raise
17284         ctx = arg0.ctx
17285         res = isl.isl_space_uncurry(isl.isl_space_copy(arg0.ptr))
17286         obj = space(ctx=ctx, ptr=res)
17287         return obj
17288     @staticmethod
17289     def unit():
17290         ctx = Context.getDefaultInstance()
17291         res = isl.isl_space_unit(ctx)
17292         obj = space(ctx=ctx, ptr=res)
17293         return obj
17294     def universe_map(arg0):
17295         try:
17296             if not arg0.__class__ is space:
17297                 arg0 = space(arg0)
17298         except:
17299             raise
17300         ctx = arg0.ctx
17301         res = isl.isl_space_universe_map(isl.isl_space_copy(arg0.ptr))
17302         obj = map(ctx=ctx, ptr=res)
17303         return obj
17304     def universe_set(arg0):
17305         try:
17306             if not arg0.__class__ is space:
17307                 arg0 = space(arg0)
17308         except:
17309             raise
17310         ctx = arg0.ctx
17311         res = isl.isl_space_universe_set(isl.isl_space_copy(arg0.ptr))
17312         obj = set(ctx=ctx, ptr=res)
17313         return obj
17314     def unwrap(arg0):
17315         try:
17316             if not arg0.__class__ is space:
17317                 arg0 = space(arg0)
17318         except:
17319             raise
17320         ctx = arg0.ctx
17321         res = isl.isl_space_unwrap(isl.isl_space_copy(arg0.ptr))
17322         obj = space(ctx=ctx, ptr=res)
17323         return obj
17324     def wrap(arg0):
17325         try:
17326             if not arg0.__class__ is space:
17327                 arg0 = space(arg0)
17328         except:
17329             raise
17330         ctx = arg0.ctx
17331         res = isl.isl_space_wrap(isl.isl_space_copy(arg0.ptr))
17332         obj = space(ctx=ctx, ptr=res)
17333         return obj
17334     def wrapped_reverse(arg0):
17335         try:
17336             if not arg0.__class__ is space:
17337                 arg0 = space(arg0)
17338         except:
17339             raise
17340         ctx = arg0.ctx
17341         res = isl.isl_space_wrapped_reverse(isl.isl_space_copy(arg0.ptr))
17342         obj = space(ctx=ctx, ptr=res)
17343         return obj
17344     def zero_aff_on_domain(arg0):
17345         try:
17346             if not arg0.__class__ is space:
17347                 arg0 = space(arg0)
17348         except:
17349             raise
17350         ctx = arg0.ctx
17351         res = isl.isl_space_zero_aff_on_domain(isl.isl_space_copy(arg0.ptr))
17352         obj = aff(ctx=ctx, ptr=res)
17353         return obj
17354     def zero_multi_aff(arg0):
17355         try:
17356             if not arg0.__class__ is space:
17357                 arg0 = space(arg0)
17358         except:
17359             raise
17360         ctx = arg0.ctx
17361         res = isl.isl_space_zero_multi_aff(isl.isl_space_copy(arg0.ptr))
17362         obj = multi_aff(ctx=ctx, ptr=res)
17363         return obj
17364     def zero_multi_pw_aff(arg0):
17365         try:
17366             if not arg0.__class__ is space:
17367                 arg0 = space(arg0)
17368         except:
17369             raise
17370         ctx = arg0.ctx
17371         res = isl.isl_space_zero_multi_pw_aff(isl.isl_space_copy(arg0.ptr))
17372         obj = multi_pw_aff(ctx=ctx, ptr=res)
17373         return obj
17374     def zero_multi_union_pw_aff(arg0):
17375         try:
17376             if not arg0.__class__ is space:
17377                 arg0 = space(arg0)
17378         except:
17379             raise
17380         ctx = arg0.ctx
17381         res = isl.isl_space_zero_multi_union_pw_aff(isl.isl_space_copy(arg0.ptr))
17382         obj = multi_union_pw_aff(ctx=ctx, ptr=res)
17383         return obj
17384     def zero_multi_val(arg0):
17385         try:
17386             if not arg0.__class__ is space:
17387                 arg0 = space(arg0)
17388         except:
17389             raise
17390         ctx = arg0.ctx
17391         res = isl.isl_space_zero_multi_val(isl.isl_space_copy(arg0.ptr))
17392         obj = multi_val(ctx=ctx, ptr=res)
17393         return obj
17395 isl.isl_space_read_from_str.restype = c_void_p
17396 isl.isl_space_read_from_str.argtypes = [Context, c_char_p]
17397 isl.isl_space_add_named_tuple_id_ui.restype = c_void_p
17398 isl.isl_space_add_named_tuple_id_ui.argtypes = [c_void_p, c_void_p, c_int]
17399 isl.isl_space_add_param_id.restype = c_void_p
17400 isl.isl_space_add_param_id.argtypes = [c_void_p, c_void_p]
17401 isl.isl_space_add_unnamed_tuple_ui.restype = c_void_p
17402 isl.isl_space_add_unnamed_tuple_ui.argtypes = [c_void_p, c_int]
17403 isl.isl_space_curry.restype = c_void_p
17404 isl.isl_space_curry.argtypes = [c_void_p]
17405 isl.isl_space_domain.restype = c_void_p
17406 isl.isl_space_domain.argtypes = [c_void_p]
17407 isl.isl_space_domain_map_multi_aff.restype = c_void_p
17408 isl.isl_space_domain_map_multi_aff.argtypes = [c_void_p]
17409 isl.isl_space_domain_map_pw_multi_aff.restype = c_void_p
17410 isl.isl_space_domain_map_pw_multi_aff.argtypes = [c_void_p]
17411 isl.isl_space_domain_reverse.restype = c_void_p
17412 isl.isl_space_domain_reverse.argtypes = [c_void_p]
17413 isl.isl_space_get_domain_tuple_id.restype = c_void_p
17414 isl.isl_space_get_domain_tuple_id.argtypes = [c_void_p]
17415 isl.isl_space_drop_all_params.restype = c_void_p
17416 isl.isl_space_drop_all_params.argtypes = [c_void_p]
17417 isl.isl_space_flatten_domain.restype = c_void_p
17418 isl.isl_space_flatten_domain.argtypes = [c_void_p]
17419 isl.isl_space_flatten_range.restype = c_void_p
17420 isl.isl_space_flatten_range.argtypes = [c_void_p]
17421 isl.isl_space_has_domain_tuple_id.argtypes = [c_void_p]
17422 isl.isl_space_has_range_tuple_id.argtypes = [c_void_p]
17423 isl.isl_space_identity_multi_aff_on_domain.restype = c_void_p
17424 isl.isl_space_identity_multi_aff_on_domain.argtypes = [c_void_p]
17425 isl.isl_space_identity_multi_pw_aff_on_domain.restype = c_void_p
17426 isl.isl_space_identity_multi_pw_aff_on_domain.argtypes = [c_void_p]
17427 isl.isl_space_identity_pw_multi_aff_on_domain.restype = c_void_p
17428 isl.isl_space_identity_pw_multi_aff_on_domain.argtypes = [c_void_p]
17429 isl.isl_space_is_equal.argtypes = [c_void_p, c_void_p]
17430 isl.isl_space_is_wrapping.argtypes = [c_void_p]
17431 isl.isl_space_map_from_set.restype = c_void_p
17432 isl.isl_space_map_from_set.argtypes = [c_void_p]
17433 isl.isl_space_multi_aff.restype = c_void_p
17434 isl.isl_space_multi_aff.argtypes = [c_void_p, c_void_p]
17435 isl.isl_space_multi_aff_on_domain_multi_val.restype = c_void_p
17436 isl.isl_space_multi_aff_on_domain_multi_val.argtypes = [c_void_p, c_void_p]
17437 isl.isl_space_multi_id.restype = c_void_p
17438 isl.isl_space_multi_id.argtypes = [c_void_p, c_void_p]
17439 isl.isl_space_multi_pw_aff.restype = c_void_p
17440 isl.isl_space_multi_pw_aff.argtypes = [c_void_p, c_void_p]
17441 isl.isl_space_multi_union_pw_aff.restype = c_void_p
17442 isl.isl_space_multi_union_pw_aff.argtypes = [c_void_p, c_void_p]
17443 isl.isl_space_multi_val.restype = c_void_p
17444 isl.isl_space_multi_val.argtypes = [c_void_p, c_void_p]
17445 isl.isl_space_param_aff_on_domain_id.restype = c_void_p
17446 isl.isl_space_param_aff_on_domain_id.argtypes = [c_void_p, c_void_p]
17447 isl.isl_space_params.restype = c_void_p
17448 isl.isl_space_params.argtypes = [c_void_p]
17449 isl.isl_space_product.restype = c_void_p
17450 isl.isl_space_product.argtypes = [c_void_p, c_void_p]
17451 isl.isl_space_range.restype = c_void_p
17452 isl.isl_space_range.argtypes = [c_void_p]
17453 isl.isl_space_range_map_multi_aff.restype = c_void_p
17454 isl.isl_space_range_map_multi_aff.argtypes = [c_void_p]
17455 isl.isl_space_range_map_pw_multi_aff.restype = c_void_p
17456 isl.isl_space_range_map_pw_multi_aff.argtypes = [c_void_p]
17457 isl.isl_space_range_reverse.restype = c_void_p
17458 isl.isl_space_range_reverse.argtypes = [c_void_p]
17459 isl.isl_space_get_range_tuple_id.restype = c_void_p
17460 isl.isl_space_get_range_tuple_id.argtypes = [c_void_p]
17461 isl.isl_space_reverse.restype = c_void_p
17462 isl.isl_space_reverse.argtypes = [c_void_p]
17463 isl.isl_space_set_domain_tuple_id.restype = c_void_p
17464 isl.isl_space_set_domain_tuple_id.argtypes = [c_void_p, c_void_p]
17465 isl.isl_space_set_range_tuple_id.restype = c_void_p
17466 isl.isl_space_set_range_tuple_id.argtypes = [c_void_p, c_void_p]
17467 isl.isl_space_uncurry.restype = c_void_p
17468 isl.isl_space_uncurry.argtypes = [c_void_p]
17469 isl.isl_space_unit.restype = c_void_p
17470 isl.isl_space_unit.argtypes = [Context]
17471 isl.isl_space_universe_map.restype = c_void_p
17472 isl.isl_space_universe_map.argtypes = [c_void_p]
17473 isl.isl_space_universe_set.restype = c_void_p
17474 isl.isl_space_universe_set.argtypes = [c_void_p]
17475 isl.isl_space_unwrap.restype = c_void_p
17476 isl.isl_space_unwrap.argtypes = [c_void_p]
17477 isl.isl_space_wrap.restype = c_void_p
17478 isl.isl_space_wrap.argtypes = [c_void_p]
17479 isl.isl_space_wrapped_reverse.restype = c_void_p
17480 isl.isl_space_wrapped_reverse.argtypes = [c_void_p]
17481 isl.isl_space_zero_aff_on_domain.restype = c_void_p
17482 isl.isl_space_zero_aff_on_domain.argtypes = [c_void_p]
17483 isl.isl_space_zero_multi_aff.restype = c_void_p
17484 isl.isl_space_zero_multi_aff.argtypes = [c_void_p]
17485 isl.isl_space_zero_multi_pw_aff.restype = c_void_p
17486 isl.isl_space_zero_multi_pw_aff.argtypes = [c_void_p]
17487 isl.isl_space_zero_multi_union_pw_aff.restype = c_void_p
17488 isl.isl_space_zero_multi_union_pw_aff.argtypes = [c_void_p]
17489 isl.isl_space_zero_multi_val.restype = c_void_p
17490 isl.isl_space_zero_multi_val.argtypes = [c_void_p]
17491 isl.isl_space_copy.restype = c_void_p
17492 isl.isl_space_copy.argtypes = [c_void_p]
17493 isl.isl_space_free.restype = c_void_p
17494 isl.isl_space_free.argtypes = [c_void_p]
17495 isl.isl_space_to_str.restype = POINTER(c_char)
17496 isl.isl_space_to_str.argtypes = [c_void_p]
17498 class union_access_info(object):
17499     def __init__(self, *args, **keywords):
17500         if "ptr" in keywords:
17501             self.ctx = keywords["ctx"]
17502             self.ptr = keywords["ptr"]
17503             return
17504         if len(args) == 1 and args[0].__class__ is union_map:
17505             self.ctx = Context.getDefaultInstance()
17506             self.ptr = isl.isl_union_access_info_from_sink(isl.isl_union_map_copy(args[0].ptr))
17507             return
17508         raise Error
17509     def __del__(self):
17510         if hasattr(self, 'ptr'):
17511             isl.isl_union_access_info_free(self.ptr)
17512     def __str__(arg0):
17513         try:
17514             if not arg0.__class__ is union_access_info:
17515                 arg0 = union_access_info(arg0)
17516         except:
17517             raise
17518         ptr = isl.isl_union_access_info_to_str(arg0.ptr)
17519         res = cast(ptr, c_char_p).value.decode('ascii')
17520         libc.free(ptr)
17521         return res
17522     def __repr__(self):
17523         s = str(self)
17524         if '"' in s:
17525             return 'isl.union_access_info("""%s""")' % s
17526         else:
17527             return 'isl.union_access_info("%s")' % s
17528     def compute_flow(arg0):
17529         try:
17530             if not arg0.__class__ is union_access_info:
17531                 arg0 = union_access_info(arg0)
17532         except:
17533             raise
17534         ctx = arg0.ctx
17535         res = isl.isl_union_access_info_compute_flow(isl.isl_union_access_info_copy(arg0.ptr))
17536         obj = union_flow(ctx=ctx, ptr=res)
17537         return obj
17538     def set_kill(arg0, arg1):
17539         try:
17540             if not arg0.__class__ is union_access_info:
17541                 arg0 = union_access_info(arg0)
17542         except:
17543             raise
17544         try:
17545             if not arg1.__class__ is union_map:
17546                 arg1 = union_map(arg1)
17547         except:
17548             raise
17549         ctx = arg0.ctx
17550         res = isl.isl_union_access_info_set_kill(isl.isl_union_access_info_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
17551         obj = union_access_info(ctx=ctx, ptr=res)
17552         return obj
17553     def set_may_source(arg0, arg1):
17554         try:
17555             if not arg0.__class__ is union_access_info:
17556                 arg0 = union_access_info(arg0)
17557         except:
17558             raise
17559         try:
17560             if not arg1.__class__ is union_map:
17561                 arg1 = union_map(arg1)
17562         except:
17563             raise
17564         ctx = arg0.ctx
17565         res = isl.isl_union_access_info_set_may_source(isl.isl_union_access_info_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
17566         obj = union_access_info(ctx=ctx, ptr=res)
17567         return obj
17568     def set_must_source(arg0, arg1):
17569         try:
17570             if not arg0.__class__ is union_access_info:
17571                 arg0 = union_access_info(arg0)
17572         except:
17573             raise
17574         try:
17575             if not arg1.__class__ is union_map:
17576                 arg1 = union_map(arg1)
17577         except:
17578             raise
17579         ctx = arg0.ctx
17580         res = isl.isl_union_access_info_set_must_source(isl.isl_union_access_info_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
17581         obj = union_access_info(ctx=ctx, ptr=res)
17582         return obj
17583     def set_schedule(arg0, arg1):
17584         try:
17585             if not arg0.__class__ is union_access_info:
17586                 arg0 = union_access_info(arg0)
17587         except:
17588             raise
17589         try:
17590             if not arg1.__class__ is schedule:
17591                 arg1 = schedule(arg1)
17592         except:
17593             raise
17594         ctx = arg0.ctx
17595         res = isl.isl_union_access_info_set_schedule(isl.isl_union_access_info_copy(arg0.ptr), isl.isl_schedule_copy(arg1.ptr))
17596         obj = union_access_info(ctx=ctx, ptr=res)
17597         return obj
17598     def set_schedule_map(arg0, arg1):
17599         try:
17600             if not arg0.__class__ is union_access_info:
17601                 arg0 = union_access_info(arg0)
17602         except:
17603             raise
17604         try:
17605             if not arg1.__class__ is union_map:
17606                 arg1 = union_map(arg1)
17607         except:
17608             raise
17609         ctx = arg0.ctx
17610         res = isl.isl_union_access_info_set_schedule_map(isl.isl_union_access_info_copy(arg0.ptr), isl.isl_union_map_copy(arg1.ptr))
17611         obj = union_access_info(ctx=ctx, ptr=res)
17612         return obj
17614 isl.isl_union_access_info_from_sink.restype = c_void_p
17615 isl.isl_union_access_info_from_sink.argtypes = [c_void_p]
17616 isl.isl_union_access_info_compute_flow.restype = c_void_p
17617 isl.isl_union_access_info_compute_flow.argtypes = [c_void_p]
17618 isl.isl_union_access_info_set_kill.restype = c_void_p
17619 isl.isl_union_access_info_set_kill.argtypes = [c_void_p, c_void_p]
17620 isl.isl_union_access_info_set_may_source.restype = c_void_p
17621 isl.isl_union_access_info_set_may_source.argtypes = [c_void_p, c_void_p]
17622 isl.isl_union_access_info_set_must_source.restype = c_void_p
17623 isl.isl_union_access_info_set_must_source.argtypes = [c_void_p, c_void_p]
17624 isl.isl_union_access_info_set_schedule.restype = c_void_p
17625 isl.isl_union_access_info_set_schedule.argtypes = [c_void_p, c_void_p]
17626 isl.isl_union_access_info_set_schedule_map.restype = c_void_p
17627 isl.isl_union_access_info_set_schedule_map.argtypes = [c_void_p, c_void_p]
17628 isl.isl_union_access_info_copy.restype = c_void_p
17629 isl.isl_union_access_info_copy.argtypes = [c_void_p]
17630 isl.isl_union_access_info_free.restype = c_void_p
17631 isl.isl_union_access_info_free.argtypes = [c_void_p]
17632 isl.isl_union_access_info_to_str.restype = POINTER(c_char)
17633 isl.isl_union_access_info_to_str.argtypes = [c_void_p]
17635 class union_flow(object):
17636     def __init__(self, *args, **keywords):
17637         if "ptr" in keywords:
17638             self.ctx = keywords["ctx"]
17639             self.ptr = keywords["ptr"]
17640             return
17641         raise Error
17642     def __del__(self):
17643         if hasattr(self, 'ptr'):
17644             isl.isl_union_flow_free(self.ptr)
17645     def __str__(arg0):
17646         try:
17647             if not arg0.__class__ is union_flow:
17648                 arg0 = union_flow(arg0)
17649         except:
17650             raise
17651         ptr = isl.isl_union_flow_to_str(arg0.ptr)
17652         res = cast(ptr, c_char_p).value.decode('ascii')
17653         libc.free(ptr)
17654         return res
17655     def __repr__(self):
17656         s = str(self)
17657         if '"' in s:
17658             return 'isl.union_flow("""%s""")' % s
17659         else:
17660             return 'isl.union_flow("%s")' % s
17661     def full_may_dependence(arg0):
17662         try:
17663             if not arg0.__class__ is union_flow:
17664                 arg0 = union_flow(arg0)
17665         except:
17666             raise
17667         ctx = arg0.ctx
17668         res = isl.isl_union_flow_get_full_may_dependence(arg0.ptr)
17669         obj = union_map(ctx=ctx, ptr=res)
17670         return obj
17671     def get_full_may_dependence(arg0):
17672         return arg0.full_may_dependence()
17673     def full_must_dependence(arg0):
17674         try:
17675             if not arg0.__class__ is union_flow:
17676                 arg0 = union_flow(arg0)
17677         except:
17678             raise
17679         ctx = arg0.ctx
17680         res = isl.isl_union_flow_get_full_must_dependence(arg0.ptr)
17681         obj = union_map(ctx=ctx, ptr=res)
17682         return obj
17683     def get_full_must_dependence(arg0):
17684         return arg0.full_must_dependence()
17685     def may_dependence(arg0):
17686         try:
17687             if not arg0.__class__ is union_flow:
17688                 arg0 = union_flow(arg0)
17689         except:
17690             raise
17691         ctx = arg0.ctx
17692         res = isl.isl_union_flow_get_may_dependence(arg0.ptr)
17693         obj = union_map(ctx=ctx, ptr=res)
17694         return obj
17695     def get_may_dependence(arg0):
17696         return arg0.may_dependence()
17697     def may_no_source(arg0):
17698         try:
17699             if not arg0.__class__ is union_flow:
17700                 arg0 = union_flow(arg0)
17701         except:
17702             raise
17703         ctx = arg0.ctx
17704         res = isl.isl_union_flow_get_may_no_source(arg0.ptr)
17705         obj = union_map(ctx=ctx, ptr=res)
17706         return obj
17707     def get_may_no_source(arg0):
17708         return arg0.may_no_source()
17709     def must_dependence(arg0):
17710         try:
17711             if not arg0.__class__ is union_flow:
17712                 arg0 = union_flow(arg0)
17713         except:
17714             raise
17715         ctx = arg0.ctx
17716         res = isl.isl_union_flow_get_must_dependence(arg0.ptr)
17717         obj = union_map(ctx=ctx, ptr=res)
17718         return obj
17719     def get_must_dependence(arg0):
17720         return arg0.must_dependence()
17721     def must_no_source(arg0):
17722         try:
17723             if not arg0.__class__ is union_flow:
17724                 arg0 = union_flow(arg0)
17725         except:
17726             raise
17727         ctx = arg0.ctx
17728         res = isl.isl_union_flow_get_must_no_source(arg0.ptr)
17729         obj = union_map(ctx=ctx, ptr=res)
17730         return obj
17731     def get_must_no_source(arg0):
17732         return arg0.must_no_source()
17734 isl.isl_union_flow_get_full_may_dependence.restype = c_void_p
17735 isl.isl_union_flow_get_full_may_dependence.argtypes = [c_void_p]
17736 isl.isl_union_flow_get_full_must_dependence.restype = c_void_p
17737 isl.isl_union_flow_get_full_must_dependence.argtypes = [c_void_p]
17738 isl.isl_union_flow_get_may_dependence.restype = c_void_p
17739 isl.isl_union_flow_get_may_dependence.argtypes = [c_void_p]
17740 isl.isl_union_flow_get_may_no_source.restype = c_void_p
17741 isl.isl_union_flow_get_may_no_source.argtypes = [c_void_p]
17742 isl.isl_union_flow_get_must_dependence.restype = c_void_p
17743 isl.isl_union_flow_get_must_dependence.argtypes = [c_void_p]
17744 isl.isl_union_flow_get_must_no_source.restype = c_void_p
17745 isl.isl_union_flow_get_must_no_source.argtypes = [c_void_p]
17746 isl.isl_union_flow_copy.restype = c_void_p
17747 isl.isl_union_flow_copy.argtypes = [c_void_p]
17748 isl.isl_union_flow_free.restype = c_void_p
17749 isl.isl_union_flow_free.argtypes = [c_void_p]
17750 isl.isl_union_flow_to_str.restype = POINTER(c_char)
17751 isl.isl_union_flow_to_str.argtypes = [c_void_p]
17753 class union_pw_aff_list(object):
17754     def __init__(self, *args, **keywords):
17755         if "ptr" in keywords:
17756             self.ctx = keywords["ctx"]
17757             self.ptr = keywords["ptr"]
17758             return
17759         if len(args) == 1 and type(args[0]) == int:
17760             self.ctx = Context.getDefaultInstance()
17761             self.ptr = isl.isl_union_pw_aff_list_alloc(self.ctx, args[0])
17762             return
17763         if len(args) == 1 and args[0].__class__ is union_pw_aff:
17764             self.ctx = Context.getDefaultInstance()
17765             self.ptr = isl.isl_union_pw_aff_list_from_union_pw_aff(isl.isl_union_pw_aff_copy(args[0].ptr))
17766             return
17767         if len(args) == 1 and type(args[0]) == str:
17768             self.ctx = Context.getDefaultInstance()
17769             self.ptr = isl.isl_union_pw_aff_list_read_from_str(self.ctx, args[0].encode('ascii'))
17770             return
17771         raise Error
17772     def __del__(self):
17773         if hasattr(self, 'ptr'):
17774             isl.isl_union_pw_aff_list_free(self.ptr)
17775     def __str__(arg0):
17776         try:
17777             if not arg0.__class__ is union_pw_aff_list:
17778                 arg0 = union_pw_aff_list(arg0)
17779         except:
17780             raise
17781         ptr = isl.isl_union_pw_aff_list_to_str(arg0.ptr)
17782         res = cast(ptr, c_char_p).value.decode('ascii')
17783         libc.free(ptr)
17784         return res
17785     def __repr__(self):
17786         s = str(self)
17787         if '"' in s:
17788             return 'isl.union_pw_aff_list("""%s""")' % s
17789         else:
17790             return 'isl.union_pw_aff_list("%s")' % s
17791     def add(arg0, arg1):
17792         try:
17793             if not arg0.__class__ is union_pw_aff_list:
17794                 arg0 = union_pw_aff_list(arg0)
17795         except:
17796             raise
17797         try:
17798             if not arg1.__class__ is union_pw_aff:
17799                 arg1 = union_pw_aff(arg1)
17800         except:
17801             raise
17802         ctx = arg0.ctx
17803         res = isl.isl_union_pw_aff_list_add(isl.isl_union_pw_aff_list_copy(arg0.ptr), isl.isl_union_pw_aff_copy(arg1.ptr))
17804         obj = union_pw_aff_list(ctx=ctx, ptr=res)
17805         return obj
17806     def at(arg0, arg1):
17807         try:
17808             if not arg0.__class__ is union_pw_aff_list:
17809                 arg0 = union_pw_aff_list(arg0)
17810         except:
17811             raise
17812         ctx = arg0.ctx
17813         res = isl.isl_union_pw_aff_list_get_at(arg0.ptr, arg1)
17814         obj = union_pw_aff(ctx=ctx, ptr=res)
17815         return obj
17816     def get_at(arg0, arg1):
17817         return arg0.at(arg1)
17818     def clear(arg0):
17819         try:
17820             if not arg0.__class__ is union_pw_aff_list:
17821                 arg0 = union_pw_aff_list(arg0)
17822         except:
17823             raise
17824         ctx = arg0.ctx
17825         res = isl.isl_union_pw_aff_list_clear(isl.isl_union_pw_aff_list_copy(arg0.ptr))
17826         obj = union_pw_aff_list(ctx=ctx, ptr=res)
17827         return obj
17828     def concat(arg0, arg1):
17829         try:
17830             if not arg0.__class__ is union_pw_aff_list:
17831                 arg0 = union_pw_aff_list(arg0)
17832         except:
17833             raise
17834         try:
17835             if not arg1.__class__ is union_pw_aff_list:
17836                 arg1 = union_pw_aff_list(arg1)
17837         except:
17838             raise
17839         ctx = arg0.ctx
17840         res = isl.isl_union_pw_aff_list_concat(isl.isl_union_pw_aff_list_copy(arg0.ptr), isl.isl_union_pw_aff_list_copy(arg1.ptr))
17841         obj = union_pw_aff_list(ctx=ctx, ptr=res)
17842         return obj
17843     def drop(arg0, arg1, arg2):
17844         try:
17845             if not arg0.__class__ is union_pw_aff_list:
17846                 arg0 = union_pw_aff_list(arg0)
17847         except:
17848             raise
17849         ctx = arg0.ctx
17850         res = isl.isl_union_pw_aff_list_drop(isl.isl_union_pw_aff_list_copy(arg0.ptr), arg1, arg2)
17851         obj = union_pw_aff_list(ctx=ctx, ptr=res)
17852         return obj
17853     def foreach(arg0, arg1):
17854         try:
17855             if not arg0.__class__ is union_pw_aff_list:
17856                 arg0 = union_pw_aff_list(arg0)
17857         except:
17858             raise
17859         exc_info = [None]
17860         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
17861         def cb_func(cb_arg0, cb_arg1):
17862             cb_arg0 = union_pw_aff(ctx=arg0.ctx, ptr=(cb_arg0))
17863             try:
17864                 arg1(cb_arg0)
17865             except BaseException as e:
17866                 exc_info[0] = e
17867                 return -1
17868             return 0
17869         cb1 = fn(cb_func)
17870         ctx = arg0.ctx
17871         res = isl.isl_union_pw_aff_list_foreach(arg0.ptr, cb1, None)
17872         if exc_info[0] is not None:
17873             raise exc_info[0]
17874         if res < 0:
17875             raise Error
17876     def foreach_scc(arg0, arg1, arg2):
17877         try:
17878             if not arg0.__class__ is union_pw_aff_list:
17879                 arg0 = union_pw_aff_list(arg0)
17880         except:
17881             raise
17882         exc_info = [None]
17883         fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
17884         def cb_func(cb_arg0, cb_arg1, cb_arg2):
17885             cb_arg0 = union_pw_aff(ctx=arg0.ctx, ptr=isl.isl_union_pw_aff_copy(cb_arg0))
17886             cb_arg1 = union_pw_aff(ctx=arg0.ctx, ptr=isl.isl_union_pw_aff_copy(cb_arg1))
17887             try:
17888                 res = arg1(cb_arg0, cb_arg1)
17889             except BaseException as e:
17890                 exc_info[0] = e
17891                 return -1
17892             return 1 if res else 0
17893         cb1 = fn(cb_func)
17894         exc_info = [None]
17895         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
17896         def cb_func(cb_arg0, cb_arg1):
17897             cb_arg0 = union_pw_aff_list(ctx=arg0.ctx, ptr=(cb_arg0))
17898             try:
17899                 arg2(cb_arg0)
17900             except BaseException as e:
17901                 exc_info[0] = e
17902                 return -1
17903             return 0
17904         cb2 = fn(cb_func)
17905         ctx = arg0.ctx
17906         res = isl.isl_union_pw_aff_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
17907         if exc_info[0] is not None:
17908             raise exc_info[0]
17909         if res < 0:
17910             raise Error
17911     def insert(arg0, arg1, arg2):
17912         try:
17913             if not arg0.__class__ is union_pw_aff_list:
17914                 arg0 = union_pw_aff_list(arg0)
17915         except:
17916             raise
17917         try:
17918             if not arg2.__class__ is union_pw_aff:
17919                 arg2 = union_pw_aff(arg2)
17920         except:
17921             raise
17922         ctx = arg0.ctx
17923         res = isl.isl_union_pw_aff_list_insert(isl.isl_union_pw_aff_list_copy(arg0.ptr), arg1, isl.isl_union_pw_aff_copy(arg2.ptr))
17924         obj = union_pw_aff_list(ctx=ctx, ptr=res)
17925         return obj
17926     def set_at(arg0, arg1, arg2):
17927         try:
17928             if not arg0.__class__ is union_pw_aff_list:
17929                 arg0 = union_pw_aff_list(arg0)
17930         except:
17931             raise
17932         try:
17933             if not arg2.__class__ is union_pw_aff:
17934                 arg2 = union_pw_aff(arg2)
17935         except:
17936             raise
17937         ctx = arg0.ctx
17938         res = isl.isl_union_pw_aff_list_set_at(isl.isl_union_pw_aff_list_copy(arg0.ptr), arg1, isl.isl_union_pw_aff_copy(arg2.ptr))
17939         obj = union_pw_aff_list(ctx=ctx, ptr=res)
17940         return obj
17941     def size(arg0):
17942         try:
17943             if not arg0.__class__ is union_pw_aff_list:
17944                 arg0 = union_pw_aff_list(arg0)
17945         except:
17946             raise
17947         ctx = arg0.ctx
17948         res = isl.isl_union_pw_aff_list_size(arg0.ptr)
17949         if res < 0:
17950             raise Error
17951         return int(res)
17953 isl.isl_union_pw_aff_list_alloc.restype = c_void_p
17954 isl.isl_union_pw_aff_list_alloc.argtypes = [Context, c_int]
17955 isl.isl_union_pw_aff_list_from_union_pw_aff.restype = c_void_p
17956 isl.isl_union_pw_aff_list_from_union_pw_aff.argtypes = [c_void_p]
17957 isl.isl_union_pw_aff_list_read_from_str.restype = c_void_p
17958 isl.isl_union_pw_aff_list_read_from_str.argtypes = [Context, c_char_p]
17959 isl.isl_union_pw_aff_list_add.restype = c_void_p
17960 isl.isl_union_pw_aff_list_add.argtypes = [c_void_p, c_void_p]
17961 isl.isl_union_pw_aff_list_get_at.restype = c_void_p
17962 isl.isl_union_pw_aff_list_get_at.argtypes = [c_void_p, c_int]
17963 isl.isl_union_pw_aff_list_clear.restype = c_void_p
17964 isl.isl_union_pw_aff_list_clear.argtypes = [c_void_p]
17965 isl.isl_union_pw_aff_list_concat.restype = c_void_p
17966 isl.isl_union_pw_aff_list_concat.argtypes = [c_void_p, c_void_p]
17967 isl.isl_union_pw_aff_list_drop.restype = c_void_p
17968 isl.isl_union_pw_aff_list_drop.argtypes = [c_void_p, c_int, c_int]
17969 isl.isl_union_pw_aff_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
17970 isl.isl_union_pw_aff_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
17971 isl.isl_union_pw_aff_list_insert.restype = c_void_p
17972 isl.isl_union_pw_aff_list_insert.argtypes = [c_void_p, c_int, c_void_p]
17973 isl.isl_union_pw_aff_list_set_at.restype = c_void_p
17974 isl.isl_union_pw_aff_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
17975 isl.isl_union_pw_aff_list_size.argtypes = [c_void_p]
17976 isl.isl_union_pw_aff_list_copy.restype = c_void_p
17977 isl.isl_union_pw_aff_list_copy.argtypes = [c_void_p]
17978 isl.isl_union_pw_aff_list_free.restype = c_void_p
17979 isl.isl_union_pw_aff_list_free.argtypes = [c_void_p]
17980 isl.isl_union_pw_aff_list_to_str.restype = POINTER(c_char)
17981 isl.isl_union_pw_aff_list_to_str.argtypes = [c_void_p]
17983 class union_set_list(object):
17984     def __init__(self, *args, **keywords):
17985         if "ptr" in keywords:
17986             self.ctx = keywords["ctx"]
17987             self.ptr = keywords["ptr"]
17988             return
17989         if len(args) == 1 and type(args[0]) == int:
17990             self.ctx = Context.getDefaultInstance()
17991             self.ptr = isl.isl_union_set_list_alloc(self.ctx, args[0])
17992             return
17993         if len(args) == 1 and args[0].__class__ is union_set:
17994             self.ctx = Context.getDefaultInstance()
17995             self.ptr = isl.isl_union_set_list_from_union_set(isl.isl_union_set_copy(args[0].ptr))
17996             return
17997         if len(args) == 1 and type(args[0]) == str:
17998             self.ctx = Context.getDefaultInstance()
17999             self.ptr = isl.isl_union_set_list_read_from_str(self.ctx, args[0].encode('ascii'))
18000             return
18001         raise Error
18002     def __del__(self):
18003         if hasattr(self, 'ptr'):
18004             isl.isl_union_set_list_free(self.ptr)
18005     def __str__(arg0):
18006         try:
18007             if not arg0.__class__ is union_set_list:
18008                 arg0 = union_set_list(arg0)
18009         except:
18010             raise
18011         ptr = isl.isl_union_set_list_to_str(arg0.ptr)
18012         res = cast(ptr, c_char_p).value.decode('ascii')
18013         libc.free(ptr)
18014         return res
18015     def __repr__(self):
18016         s = str(self)
18017         if '"' in s:
18018             return 'isl.union_set_list("""%s""")' % s
18019         else:
18020             return 'isl.union_set_list("%s")' % s
18021     def add(arg0, arg1):
18022         try:
18023             if not arg0.__class__ is union_set_list:
18024                 arg0 = union_set_list(arg0)
18025         except:
18026             raise
18027         try:
18028             if not arg1.__class__ is union_set:
18029                 arg1 = union_set(arg1)
18030         except:
18031             raise
18032         ctx = arg0.ctx
18033         res = isl.isl_union_set_list_add(isl.isl_union_set_list_copy(arg0.ptr), isl.isl_union_set_copy(arg1.ptr))
18034         obj = union_set_list(ctx=ctx, ptr=res)
18035         return obj
18036     def at(arg0, arg1):
18037         try:
18038             if not arg0.__class__ is union_set_list:
18039                 arg0 = union_set_list(arg0)
18040         except:
18041             raise
18042         ctx = arg0.ctx
18043         res = isl.isl_union_set_list_get_at(arg0.ptr, arg1)
18044         obj = union_set(ctx=ctx, ptr=res)
18045         return obj
18046     def get_at(arg0, arg1):
18047         return arg0.at(arg1)
18048     def clear(arg0):
18049         try:
18050             if not arg0.__class__ is union_set_list:
18051                 arg0 = union_set_list(arg0)
18052         except:
18053             raise
18054         ctx = arg0.ctx
18055         res = isl.isl_union_set_list_clear(isl.isl_union_set_list_copy(arg0.ptr))
18056         obj = union_set_list(ctx=ctx, ptr=res)
18057         return obj
18058     def concat(arg0, arg1):
18059         try:
18060             if not arg0.__class__ is union_set_list:
18061                 arg0 = union_set_list(arg0)
18062         except:
18063             raise
18064         try:
18065             if not arg1.__class__ is union_set_list:
18066                 arg1 = union_set_list(arg1)
18067         except:
18068             raise
18069         ctx = arg0.ctx
18070         res = isl.isl_union_set_list_concat(isl.isl_union_set_list_copy(arg0.ptr), isl.isl_union_set_list_copy(arg1.ptr))
18071         obj = union_set_list(ctx=ctx, ptr=res)
18072         return obj
18073     def drop(arg0, arg1, arg2):
18074         try:
18075             if not arg0.__class__ is union_set_list:
18076                 arg0 = union_set_list(arg0)
18077         except:
18078             raise
18079         ctx = arg0.ctx
18080         res = isl.isl_union_set_list_drop(isl.isl_union_set_list_copy(arg0.ptr), arg1, arg2)
18081         obj = union_set_list(ctx=ctx, ptr=res)
18082         return obj
18083     def foreach(arg0, arg1):
18084         try:
18085             if not arg0.__class__ is union_set_list:
18086                 arg0 = union_set_list(arg0)
18087         except:
18088             raise
18089         exc_info = [None]
18090         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
18091         def cb_func(cb_arg0, cb_arg1):
18092             cb_arg0 = union_set(ctx=arg0.ctx, ptr=(cb_arg0))
18093             try:
18094                 arg1(cb_arg0)
18095             except BaseException as e:
18096                 exc_info[0] = e
18097                 return -1
18098             return 0
18099         cb1 = fn(cb_func)
18100         ctx = arg0.ctx
18101         res = isl.isl_union_set_list_foreach(arg0.ptr, cb1, None)
18102         if exc_info[0] is not None:
18103             raise exc_info[0]
18104         if res < 0:
18105             raise Error
18106     def foreach_scc(arg0, arg1, arg2):
18107         try:
18108             if not arg0.__class__ is union_set_list:
18109                 arg0 = union_set_list(arg0)
18110         except:
18111             raise
18112         exc_info = [None]
18113         fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
18114         def cb_func(cb_arg0, cb_arg1, cb_arg2):
18115             cb_arg0 = union_set(ctx=arg0.ctx, ptr=isl.isl_union_set_copy(cb_arg0))
18116             cb_arg1 = union_set(ctx=arg0.ctx, ptr=isl.isl_union_set_copy(cb_arg1))
18117             try:
18118                 res = arg1(cb_arg0, cb_arg1)
18119             except BaseException as e:
18120                 exc_info[0] = e
18121                 return -1
18122             return 1 if res else 0
18123         cb1 = fn(cb_func)
18124         exc_info = [None]
18125         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
18126         def cb_func(cb_arg0, cb_arg1):
18127             cb_arg0 = union_set_list(ctx=arg0.ctx, ptr=(cb_arg0))
18128             try:
18129                 arg2(cb_arg0)
18130             except BaseException as e:
18131                 exc_info[0] = e
18132                 return -1
18133             return 0
18134         cb2 = fn(cb_func)
18135         ctx = arg0.ctx
18136         res = isl.isl_union_set_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
18137         if exc_info[0] is not None:
18138             raise exc_info[0]
18139         if res < 0:
18140             raise Error
18141     def insert(arg0, arg1, arg2):
18142         try:
18143             if not arg0.__class__ is union_set_list:
18144                 arg0 = union_set_list(arg0)
18145         except:
18146             raise
18147         try:
18148             if not arg2.__class__ is union_set:
18149                 arg2 = union_set(arg2)
18150         except:
18151             raise
18152         ctx = arg0.ctx
18153         res = isl.isl_union_set_list_insert(isl.isl_union_set_list_copy(arg0.ptr), arg1, isl.isl_union_set_copy(arg2.ptr))
18154         obj = union_set_list(ctx=ctx, ptr=res)
18155         return obj
18156     def set_at(arg0, arg1, arg2):
18157         try:
18158             if not arg0.__class__ is union_set_list:
18159                 arg0 = union_set_list(arg0)
18160         except:
18161             raise
18162         try:
18163             if not arg2.__class__ is union_set:
18164                 arg2 = union_set(arg2)
18165         except:
18166             raise
18167         ctx = arg0.ctx
18168         res = isl.isl_union_set_list_set_at(isl.isl_union_set_list_copy(arg0.ptr), arg1, isl.isl_union_set_copy(arg2.ptr))
18169         obj = union_set_list(ctx=ctx, ptr=res)
18170         return obj
18171     def size(arg0):
18172         try:
18173             if not arg0.__class__ is union_set_list:
18174                 arg0 = union_set_list(arg0)
18175         except:
18176             raise
18177         ctx = arg0.ctx
18178         res = isl.isl_union_set_list_size(arg0.ptr)
18179         if res < 0:
18180             raise Error
18181         return int(res)
18183 isl.isl_union_set_list_alloc.restype = c_void_p
18184 isl.isl_union_set_list_alloc.argtypes = [Context, c_int]
18185 isl.isl_union_set_list_from_union_set.restype = c_void_p
18186 isl.isl_union_set_list_from_union_set.argtypes = [c_void_p]
18187 isl.isl_union_set_list_read_from_str.restype = c_void_p
18188 isl.isl_union_set_list_read_from_str.argtypes = [Context, c_char_p]
18189 isl.isl_union_set_list_add.restype = c_void_p
18190 isl.isl_union_set_list_add.argtypes = [c_void_p, c_void_p]
18191 isl.isl_union_set_list_get_at.restype = c_void_p
18192 isl.isl_union_set_list_get_at.argtypes = [c_void_p, c_int]
18193 isl.isl_union_set_list_clear.restype = c_void_p
18194 isl.isl_union_set_list_clear.argtypes = [c_void_p]
18195 isl.isl_union_set_list_concat.restype = c_void_p
18196 isl.isl_union_set_list_concat.argtypes = [c_void_p, c_void_p]
18197 isl.isl_union_set_list_drop.restype = c_void_p
18198 isl.isl_union_set_list_drop.argtypes = [c_void_p, c_int, c_int]
18199 isl.isl_union_set_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
18200 isl.isl_union_set_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
18201 isl.isl_union_set_list_insert.restype = c_void_p
18202 isl.isl_union_set_list_insert.argtypes = [c_void_p, c_int, c_void_p]
18203 isl.isl_union_set_list_set_at.restype = c_void_p
18204 isl.isl_union_set_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
18205 isl.isl_union_set_list_size.argtypes = [c_void_p]
18206 isl.isl_union_set_list_copy.restype = c_void_p
18207 isl.isl_union_set_list_copy.argtypes = [c_void_p]
18208 isl.isl_union_set_list_free.restype = c_void_p
18209 isl.isl_union_set_list_free.argtypes = [c_void_p]
18210 isl.isl_union_set_list_to_str.restype = POINTER(c_char)
18211 isl.isl_union_set_list_to_str.argtypes = [c_void_p]
18213 class val(object):
18214     def __init__(self, *args, **keywords):
18215         if "ptr" in keywords:
18216             self.ctx = keywords["ctx"]
18217             self.ptr = keywords["ptr"]
18218             return
18219         if len(args) == 1 and type(args[0]) == int:
18220             self.ctx = Context.getDefaultInstance()
18221             self.ptr = isl.isl_val_int_from_si(self.ctx, args[0])
18222             return
18223         if len(args) == 1 and type(args[0]) == str:
18224             self.ctx = Context.getDefaultInstance()
18225             self.ptr = isl.isl_val_read_from_str(self.ctx, args[0].encode('ascii'))
18226             return
18227         raise Error
18228     def __del__(self):
18229         if hasattr(self, 'ptr'):
18230             isl.isl_val_free(self.ptr)
18231     def __str__(arg0):
18232         try:
18233             if not arg0.__class__ is val:
18234                 arg0 = val(arg0)
18235         except:
18236             raise
18237         ptr = isl.isl_val_to_str(arg0.ptr)
18238         res = cast(ptr, c_char_p).value.decode('ascii')
18239         libc.free(ptr)
18240         return res
18241     def __repr__(self):
18242         s = str(self)
18243         if '"' in s:
18244             return 'isl.val("""%s""")' % s
18245         else:
18246             return 'isl.val("%s")' % s
18247     def abs(arg0):
18248         try:
18249             if not arg0.__class__ is val:
18250                 arg0 = val(arg0)
18251         except:
18252             raise
18253         ctx = arg0.ctx
18254         res = isl.isl_val_abs(isl.isl_val_copy(arg0.ptr))
18255         obj = val(ctx=ctx, ptr=res)
18256         return obj
18257     def abs_eq(arg0, arg1):
18258         try:
18259             if not arg0.__class__ is val:
18260                 arg0 = val(arg0)
18261         except:
18262             raise
18263         try:
18264             if not arg1.__class__ is val:
18265                 arg1 = val(arg1)
18266         except:
18267             raise
18268         ctx = arg0.ctx
18269         res = isl.isl_val_abs_eq(arg0.ptr, arg1.ptr)
18270         if res < 0:
18271             raise Error
18272         return bool(res)
18273     def add(arg0, arg1):
18274         try:
18275             if not arg0.__class__ is val:
18276                 arg0 = val(arg0)
18277         except:
18278             raise
18279         try:
18280             if not arg1.__class__ is val:
18281                 arg1 = val(arg1)
18282         except:
18283             raise
18284         ctx = arg0.ctx
18285         res = isl.isl_val_add(isl.isl_val_copy(arg0.ptr), isl.isl_val_copy(arg1.ptr))
18286         obj = val(ctx=ctx, ptr=res)
18287         return obj
18288     def ceil(arg0):
18289         try:
18290             if not arg0.__class__ is val:
18291                 arg0 = val(arg0)
18292         except:
18293             raise
18294         ctx = arg0.ctx
18295         res = isl.isl_val_ceil(isl.isl_val_copy(arg0.ptr))
18296         obj = val(ctx=ctx, ptr=res)
18297         return obj
18298     def cmp_si(arg0, arg1):
18299         try:
18300             if not arg0.__class__ is val:
18301                 arg0 = val(arg0)
18302         except:
18303             raise
18304         ctx = arg0.ctx
18305         res = isl.isl_val_cmp_si(arg0.ptr, arg1)
18306         return res
18307     def den_si(arg0):
18308         try:
18309             if not arg0.__class__ is val:
18310                 arg0 = val(arg0)
18311         except:
18312             raise
18313         ctx = arg0.ctx
18314         res = isl.isl_val_get_den_si(arg0.ptr)
18315         return res
18316     def get_den_si(arg0):
18317         return arg0.den_si()
18318     def div(arg0, arg1):
18319         try:
18320             if not arg0.__class__ is val:
18321                 arg0 = val(arg0)
18322         except:
18323             raise
18324         try:
18325             if not arg1.__class__ is val:
18326                 arg1 = val(arg1)
18327         except:
18328             raise
18329         ctx = arg0.ctx
18330         res = isl.isl_val_div(isl.isl_val_copy(arg0.ptr), isl.isl_val_copy(arg1.ptr))
18331         obj = val(ctx=ctx, ptr=res)
18332         return obj
18333     def eq(arg0, arg1):
18334         try:
18335             if not arg0.__class__ is val:
18336                 arg0 = val(arg0)
18337         except:
18338             raise
18339         try:
18340             if not arg1.__class__ is val:
18341                 arg1 = val(arg1)
18342         except:
18343             raise
18344         ctx = arg0.ctx
18345         res = isl.isl_val_eq(arg0.ptr, arg1.ptr)
18346         if res < 0:
18347             raise Error
18348         return bool(res)
18349     def floor(arg0):
18350         try:
18351             if not arg0.__class__ is val:
18352                 arg0 = val(arg0)
18353         except:
18354             raise
18355         ctx = arg0.ctx
18356         res = isl.isl_val_floor(isl.isl_val_copy(arg0.ptr))
18357         obj = val(ctx=ctx, ptr=res)
18358         return obj
18359     def gcd(arg0, arg1):
18360         try:
18361             if not arg0.__class__ is val:
18362                 arg0 = val(arg0)
18363         except:
18364             raise
18365         try:
18366             if not arg1.__class__ is val:
18367                 arg1 = val(arg1)
18368         except:
18369             raise
18370         ctx = arg0.ctx
18371         res = isl.isl_val_gcd(isl.isl_val_copy(arg0.ptr), isl.isl_val_copy(arg1.ptr))
18372         obj = val(ctx=ctx, ptr=res)
18373         return obj
18374     def ge(arg0, arg1):
18375         try:
18376             if not arg0.__class__ is val:
18377                 arg0 = val(arg0)
18378         except:
18379             raise
18380         try:
18381             if not arg1.__class__ is val:
18382                 arg1 = val(arg1)
18383         except:
18384             raise
18385         ctx = arg0.ctx
18386         res = isl.isl_val_ge(arg0.ptr, arg1.ptr)
18387         if res < 0:
18388             raise Error
18389         return bool(res)
18390     def gt(arg0, arg1):
18391         try:
18392             if not arg0.__class__ is val:
18393                 arg0 = val(arg0)
18394         except:
18395             raise
18396         try:
18397             if not arg1.__class__ is val:
18398                 arg1 = val(arg1)
18399         except:
18400             raise
18401         ctx = arg0.ctx
18402         res = isl.isl_val_gt(arg0.ptr, arg1.ptr)
18403         if res < 0:
18404             raise Error
18405         return bool(res)
18406     @staticmethod
18407     def infty():
18408         ctx = Context.getDefaultInstance()
18409         res = isl.isl_val_infty(ctx)
18410         obj = val(ctx=ctx, ptr=res)
18411         return obj
18412     def inv(arg0):
18413         try:
18414             if not arg0.__class__ is val:
18415                 arg0 = val(arg0)
18416         except:
18417             raise
18418         ctx = arg0.ctx
18419         res = isl.isl_val_inv(isl.isl_val_copy(arg0.ptr))
18420         obj = val(ctx=ctx, ptr=res)
18421         return obj
18422     def is_divisible_by(arg0, arg1):
18423         try:
18424             if not arg0.__class__ is val:
18425                 arg0 = val(arg0)
18426         except:
18427             raise
18428         try:
18429             if not arg1.__class__ is val:
18430                 arg1 = val(arg1)
18431         except:
18432             raise
18433         ctx = arg0.ctx
18434         res = isl.isl_val_is_divisible_by(arg0.ptr, arg1.ptr)
18435         if res < 0:
18436             raise Error
18437         return bool(res)
18438     def is_infty(arg0):
18439         try:
18440             if not arg0.__class__ is val:
18441                 arg0 = val(arg0)
18442         except:
18443             raise
18444         ctx = arg0.ctx
18445         res = isl.isl_val_is_infty(arg0.ptr)
18446         if res < 0:
18447             raise Error
18448         return bool(res)
18449     def is_int(arg0):
18450         try:
18451             if not arg0.__class__ is val:
18452                 arg0 = val(arg0)
18453         except:
18454             raise
18455         ctx = arg0.ctx
18456         res = isl.isl_val_is_int(arg0.ptr)
18457         if res < 0:
18458             raise Error
18459         return bool(res)
18460     def is_nan(arg0):
18461         try:
18462             if not arg0.__class__ is val:
18463                 arg0 = val(arg0)
18464         except:
18465             raise
18466         ctx = arg0.ctx
18467         res = isl.isl_val_is_nan(arg0.ptr)
18468         if res < 0:
18469             raise Error
18470         return bool(res)
18471     def is_neg(arg0):
18472         try:
18473             if not arg0.__class__ is val:
18474                 arg0 = val(arg0)
18475         except:
18476             raise
18477         ctx = arg0.ctx
18478         res = isl.isl_val_is_neg(arg0.ptr)
18479         if res < 0:
18480             raise Error
18481         return bool(res)
18482     def is_neginfty(arg0):
18483         try:
18484             if not arg0.__class__ is val:
18485                 arg0 = val(arg0)
18486         except:
18487             raise
18488         ctx = arg0.ctx
18489         res = isl.isl_val_is_neginfty(arg0.ptr)
18490         if res < 0:
18491             raise Error
18492         return bool(res)
18493     def is_negone(arg0):
18494         try:
18495             if not arg0.__class__ is val:
18496                 arg0 = val(arg0)
18497         except:
18498             raise
18499         ctx = arg0.ctx
18500         res = isl.isl_val_is_negone(arg0.ptr)
18501         if res < 0:
18502             raise Error
18503         return bool(res)
18504     def is_nonneg(arg0):
18505         try:
18506             if not arg0.__class__ is val:
18507                 arg0 = val(arg0)
18508         except:
18509             raise
18510         ctx = arg0.ctx
18511         res = isl.isl_val_is_nonneg(arg0.ptr)
18512         if res < 0:
18513             raise Error
18514         return bool(res)
18515     def is_nonpos(arg0):
18516         try:
18517             if not arg0.__class__ is val:
18518                 arg0 = val(arg0)
18519         except:
18520             raise
18521         ctx = arg0.ctx
18522         res = isl.isl_val_is_nonpos(arg0.ptr)
18523         if res < 0:
18524             raise Error
18525         return bool(res)
18526     def is_one(arg0):
18527         try:
18528             if not arg0.__class__ is val:
18529                 arg0 = val(arg0)
18530         except:
18531             raise
18532         ctx = arg0.ctx
18533         res = isl.isl_val_is_one(arg0.ptr)
18534         if res < 0:
18535             raise Error
18536         return bool(res)
18537     def is_pos(arg0):
18538         try:
18539             if not arg0.__class__ is val:
18540                 arg0 = val(arg0)
18541         except:
18542             raise
18543         ctx = arg0.ctx
18544         res = isl.isl_val_is_pos(arg0.ptr)
18545         if res < 0:
18546             raise Error
18547         return bool(res)
18548     def is_rat(arg0):
18549         try:
18550             if not arg0.__class__ is val:
18551                 arg0 = val(arg0)
18552         except:
18553             raise
18554         ctx = arg0.ctx
18555         res = isl.isl_val_is_rat(arg0.ptr)
18556         if res < 0:
18557             raise Error
18558         return bool(res)
18559     def is_zero(arg0):
18560         try:
18561             if not arg0.__class__ is val:
18562                 arg0 = val(arg0)
18563         except:
18564             raise
18565         ctx = arg0.ctx
18566         res = isl.isl_val_is_zero(arg0.ptr)
18567         if res < 0:
18568             raise Error
18569         return bool(res)
18570     def le(arg0, arg1):
18571         try:
18572             if not arg0.__class__ is val:
18573                 arg0 = val(arg0)
18574         except:
18575             raise
18576         try:
18577             if not arg1.__class__ is val:
18578                 arg1 = val(arg1)
18579         except:
18580             raise
18581         ctx = arg0.ctx
18582         res = isl.isl_val_le(arg0.ptr, arg1.ptr)
18583         if res < 0:
18584             raise Error
18585         return bool(res)
18586     def lt(arg0, arg1):
18587         try:
18588             if not arg0.__class__ is val:
18589                 arg0 = val(arg0)
18590         except:
18591             raise
18592         try:
18593             if not arg1.__class__ is val:
18594                 arg1 = val(arg1)
18595         except:
18596             raise
18597         ctx = arg0.ctx
18598         res = isl.isl_val_lt(arg0.ptr, arg1.ptr)
18599         if res < 0:
18600             raise Error
18601         return bool(res)
18602     def max(arg0, arg1):
18603         try:
18604             if not arg0.__class__ is val:
18605                 arg0 = val(arg0)
18606         except:
18607             raise
18608         try:
18609             if not arg1.__class__ is val:
18610                 arg1 = val(arg1)
18611         except:
18612             raise
18613         ctx = arg0.ctx
18614         res = isl.isl_val_max(isl.isl_val_copy(arg0.ptr), isl.isl_val_copy(arg1.ptr))
18615         obj = val(ctx=ctx, ptr=res)
18616         return obj
18617     def min(arg0, arg1):
18618         try:
18619             if not arg0.__class__ is val:
18620                 arg0 = val(arg0)
18621         except:
18622             raise
18623         try:
18624             if not arg1.__class__ is val:
18625                 arg1 = val(arg1)
18626         except:
18627             raise
18628         ctx = arg0.ctx
18629         res = isl.isl_val_min(isl.isl_val_copy(arg0.ptr), isl.isl_val_copy(arg1.ptr))
18630         obj = val(ctx=ctx, ptr=res)
18631         return obj
18632     def mod(arg0, arg1):
18633         try:
18634             if not arg0.__class__ is val:
18635                 arg0 = val(arg0)
18636         except:
18637             raise
18638         try:
18639             if not arg1.__class__ is val:
18640                 arg1 = val(arg1)
18641         except:
18642             raise
18643         ctx = arg0.ctx
18644         res = isl.isl_val_mod(isl.isl_val_copy(arg0.ptr), isl.isl_val_copy(arg1.ptr))
18645         obj = val(ctx=ctx, ptr=res)
18646         return obj
18647     def mul(arg0, arg1):
18648         try:
18649             if not arg0.__class__ is val:
18650                 arg0 = val(arg0)
18651         except:
18652             raise
18653         try:
18654             if not arg1.__class__ is val:
18655                 arg1 = val(arg1)
18656         except:
18657             raise
18658         ctx = arg0.ctx
18659         res = isl.isl_val_mul(isl.isl_val_copy(arg0.ptr), isl.isl_val_copy(arg1.ptr))
18660         obj = val(ctx=ctx, ptr=res)
18661         return obj
18662     @staticmethod
18663     def nan():
18664         ctx = Context.getDefaultInstance()
18665         res = isl.isl_val_nan(ctx)
18666         obj = val(ctx=ctx, ptr=res)
18667         return obj
18668     def ne(arg0, arg1):
18669         try:
18670             if not arg0.__class__ is val:
18671                 arg0 = val(arg0)
18672         except:
18673             raise
18674         try:
18675             if not arg1.__class__ is val:
18676                 arg1 = val(arg1)
18677         except:
18678             raise
18679         ctx = arg0.ctx
18680         res = isl.isl_val_ne(arg0.ptr, arg1.ptr)
18681         if res < 0:
18682             raise Error
18683         return bool(res)
18684     def neg(arg0):
18685         try:
18686             if not arg0.__class__ is val:
18687                 arg0 = val(arg0)
18688         except:
18689             raise
18690         ctx = arg0.ctx
18691         res = isl.isl_val_neg(isl.isl_val_copy(arg0.ptr))
18692         obj = val(ctx=ctx, ptr=res)
18693         return obj
18694     @staticmethod
18695     def neginfty():
18696         ctx = Context.getDefaultInstance()
18697         res = isl.isl_val_neginfty(ctx)
18698         obj = val(ctx=ctx, ptr=res)
18699         return obj
18700     @staticmethod
18701     def negone():
18702         ctx = Context.getDefaultInstance()
18703         res = isl.isl_val_negone(ctx)
18704         obj = val(ctx=ctx, ptr=res)
18705         return obj
18706     def num_si(arg0):
18707         try:
18708             if not arg0.__class__ is val:
18709                 arg0 = val(arg0)
18710         except:
18711             raise
18712         ctx = arg0.ctx
18713         res = isl.isl_val_get_num_si(arg0.ptr)
18714         return res
18715     def get_num_si(arg0):
18716         return arg0.num_si()
18717     @staticmethod
18718     def one():
18719         ctx = Context.getDefaultInstance()
18720         res = isl.isl_val_one(ctx)
18721         obj = val(ctx=ctx, ptr=res)
18722         return obj
18723     def pow2(arg0):
18724         try:
18725             if not arg0.__class__ is val:
18726                 arg0 = val(arg0)
18727         except:
18728             raise
18729         ctx = arg0.ctx
18730         res = isl.isl_val_pow2(isl.isl_val_copy(arg0.ptr))
18731         obj = val(ctx=ctx, ptr=res)
18732         return obj
18733     def sgn(arg0):
18734         try:
18735             if not arg0.__class__ is val:
18736                 arg0 = val(arg0)
18737         except:
18738             raise
18739         ctx = arg0.ctx
18740         res = isl.isl_val_sgn(arg0.ptr)
18741         return res
18742     def sub(arg0, arg1):
18743         try:
18744             if not arg0.__class__ is val:
18745                 arg0 = val(arg0)
18746         except:
18747             raise
18748         try:
18749             if not arg1.__class__ is val:
18750                 arg1 = val(arg1)
18751         except:
18752             raise
18753         ctx = arg0.ctx
18754         res = isl.isl_val_sub(isl.isl_val_copy(arg0.ptr), isl.isl_val_copy(arg1.ptr))
18755         obj = val(ctx=ctx, ptr=res)
18756         return obj
18757     def to_list(arg0):
18758         try:
18759             if not arg0.__class__ is val:
18760                 arg0 = val(arg0)
18761         except:
18762             raise
18763         ctx = arg0.ctx
18764         res = isl.isl_val_to_list(isl.isl_val_copy(arg0.ptr))
18765         obj = val_list(ctx=ctx, ptr=res)
18766         return obj
18767     def trunc(arg0):
18768         try:
18769             if not arg0.__class__ is val:
18770                 arg0 = val(arg0)
18771         except:
18772             raise
18773         ctx = arg0.ctx
18774         res = isl.isl_val_trunc(isl.isl_val_copy(arg0.ptr))
18775         obj = val(ctx=ctx, ptr=res)
18776         return obj
18777     @staticmethod
18778     def zero():
18779         ctx = Context.getDefaultInstance()
18780         res = isl.isl_val_zero(ctx)
18781         obj = val(ctx=ctx, ptr=res)
18782         return obj
18784 isl.isl_val_int_from_si.restype = c_void_p
18785 isl.isl_val_int_from_si.argtypes = [Context, c_long]
18786 isl.isl_val_read_from_str.restype = c_void_p
18787 isl.isl_val_read_from_str.argtypes = [Context, c_char_p]
18788 isl.isl_val_abs.restype = c_void_p
18789 isl.isl_val_abs.argtypes = [c_void_p]
18790 isl.isl_val_abs_eq.argtypes = [c_void_p, c_void_p]
18791 isl.isl_val_add.restype = c_void_p
18792 isl.isl_val_add.argtypes = [c_void_p, c_void_p]
18793 isl.isl_val_ceil.restype = c_void_p
18794 isl.isl_val_ceil.argtypes = [c_void_p]
18795 isl.isl_val_cmp_si.argtypes = [c_void_p, c_long]
18796 isl.isl_val_get_den_si.argtypes = [c_void_p]
18797 isl.isl_val_div.restype = c_void_p
18798 isl.isl_val_div.argtypes = [c_void_p, c_void_p]
18799 isl.isl_val_eq.argtypes = [c_void_p, c_void_p]
18800 isl.isl_val_floor.restype = c_void_p
18801 isl.isl_val_floor.argtypes = [c_void_p]
18802 isl.isl_val_gcd.restype = c_void_p
18803 isl.isl_val_gcd.argtypes = [c_void_p, c_void_p]
18804 isl.isl_val_ge.argtypes = [c_void_p, c_void_p]
18805 isl.isl_val_gt.argtypes = [c_void_p, c_void_p]
18806 isl.isl_val_infty.restype = c_void_p
18807 isl.isl_val_infty.argtypes = [Context]
18808 isl.isl_val_inv.restype = c_void_p
18809 isl.isl_val_inv.argtypes = [c_void_p]
18810 isl.isl_val_is_divisible_by.argtypes = [c_void_p, c_void_p]
18811 isl.isl_val_is_infty.argtypes = [c_void_p]
18812 isl.isl_val_is_int.argtypes = [c_void_p]
18813 isl.isl_val_is_nan.argtypes = [c_void_p]
18814 isl.isl_val_is_neg.argtypes = [c_void_p]
18815 isl.isl_val_is_neginfty.argtypes = [c_void_p]
18816 isl.isl_val_is_negone.argtypes = [c_void_p]
18817 isl.isl_val_is_nonneg.argtypes = [c_void_p]
18818 isl.isl_val_is_nonpos.argtypes = [c_void_p]
18819 isl.isl_val_is_one.argtypes = [c_void_p]
18820 isl.isl_val_is_pos.argtypes = [c_void_p]
18821 isl.isl_val_is_rat.argtypes = [c_void_p]
18822 isl.isl_val_is_zero.argtypes = [c_void_p]
18823 isl.isl_val_le.argtypes = [c_void_p, c_void_p]
18824 isl.isl_val_lt.argtypes = [c_void_p, c_void_p]
18825 isl.isl_val_max.restype = c_void_p
18826 isl.isl_val_max.argtypes = [c_void_p, c_void_p]
18827 isl.isl_val_min.restype = c_void_p
18828 isl.isl_val_min.argtypes = [c_void_p, c_void_p]
18829 isl.isl_val_mod.restype = c_void_p
18830 isl.isl_val_mod.argtypes = [c_void_p, c_void_p]
18831 isl.isl_val_mul.restype = c_void_p
18832 isl.isl_val_mul.argtypes = [c_void_p, c_void_p]
18833 isl.isl_val_nan.restype = c_void_p
18834 isl.isl_val_nan.argtypes = [Context]
18835 isl.isl_val_ne.argtypes = [c_void_p, c_void_p]
18836 isl.isl_val_neg.restype = c_void_p
18837 isl.isl_val_neg.argtypes = [c_void_p]
18838 isl.isl_val_neginfty.restype = c_void_p
18839 isl.isl_val_neginfty.argtypes = [Context]
18840 isl.isl_val_negone.restype = c_void_p
18841 isl.isl_val_negone.argtypes = [Context]
18842 isl.isl_val_get_num_si.argtypes = [c_void_p]
18843 isl.isl_val_one.restype = c_void_p
18844 isl.isl_val_one.argtypes = [Context]
18845 isl.isl_val_pow2.restype = c_void_p
18846 isl.isl_val_pow2.argtypes = [c_void_p]
18847 isl.isl_val_sgn.argtypes = [c_void_p]
18848 isl.isl_val_sub.restype = c_void_p
18849 isl.isl_val_sub.argtypes = [c_void_p, c_void_p]
18850 isl.isl_val_to_list.restype = c_void_p
18851 isl.isl_val_to_list.argtypes = [c_void_p]
18852 isl.isl_val_trunc.restype = c_void_p
18853 isl.isl_val_trunc.argtypes = [c_void_p]
18854 isl.isl_val_zero.restype = c_void_p
18855 isl.isl_val_zero.argtypes = [Context]
18856 isl.isl_val_copy.restype = c_void_p
18857 isl.isl_val_copy.argtypes = [c_void_p]
18858 isl.isl_val_free.restype = c_void_p
18859 isl.isl_val_free.argtypes = [c_void_p]
18860 isl.isl_val_to_str.restype = POINTER(c_char)
18861 isl.isl_val_to_str.argtypes = [c_void_p]
18863 class val_list(object):
18864     def __init__(self, *args, **keywords):
18865         if "ptr" in keywords:
18866             self.ctx = keywords["ctx"]
18867             self.ptr = keywords["ptr"]
18868             return
18869         if len(args) == 1 and type(args[0]) == int:
18870             self.ctx = Context.getDefaultInstance()
18871             self.ptr = isl.isl_val_list_alloc(self.ctx, args[0])
18872             return
18873         if len(args) == 1 and (args[0].__class__ is val or type(args[0]) == int):
18874             args = list(args)
18875             try:
18876                 if not args[0].__class__ is val:
18877                     args[0] = val(args[0])
18878             except:
18879                 raise
18880             self.ctx = Context.getDefaultInstance()
18881             self.ptr = isl.isl_val_list_from_val(isl.isl_val_copy(args[0].ptr))
18882             return
18883         if len(args) == 1 and type(args[0]) == str:
18884             self.ctx = Context.getDefaultInstance()
18885             self.ptr = isl.isl_val_list_read_from_str(self.ctx, args[0].encode('ascii'))
18886             return
18887         raise Error
18888     def __del__(self):
18889         if hasattr(self, 'ptr'):
18890             isl.isl_val_list_free(self.ptr)
18891     def __str__(arg0):
18892         try:
18893             if not arg0.__class__ is val_list:
18894                 arg0 = val_list(arg0)
18895         except:
18896             raise
18897         ptr = isl.isl_val_list_to_str(arg0.ptr)
18898         res = cast(ptr, c_char_p).value.decode('ascii')
18899         libc.free(ptr)
18900         return res
18901     def __repr__(self):
18902         s = str(self)
18903         if '"' in s:
18904             return 'isl.val_list("""%s""")' % s
18905         else:
18906             return 'isl.val_list("%s")' % s
18907     def add(arg0, arg1):
18908         try:
18909             if not arg0.__class__ is val_list:
18910                 arg0 = val_list(arg0)
18911         except:
18912             raise
18913         try:
18914             if not arg1.__class__ is val:
18915                 arg1 = val(arg1)
18916         except:
18917             raise
18918         ctx = arg0.ctx
18919         res = isl.isl_val_list_add(isl.isl_val_list_copy(arg0.ptr), isl.isl_val_copy(arg1.ptr))
18920         obj = val_list(ctx=ctx, ptr=res)
18921         return obj
18922     def at(arg0, arg1):
18923         try:
18924             if not arg0.__class__ is val_list:
18925                 arg0 = val_list(arg0)
18926         except:
18927             raise
18928         ctx = arg0.ctx
18929         res = isl.isl_val_list_get_at(arg0.ptr, arg1)
18930         obj = val(ctx=ctx, ptr=res)
18931         return obj
18932     def get_at(arg0, arg1):
18933         return arg0.at(arg1)
18934     def clear(arg0):
18935         try:
18936             if not arg0.__class__ is val_list:
18937                 arg0 = val_list(arg0)
18938         except:
18939             raise
18940         ctx = arg0.ctx
18941         res = isl.isl_val_list_clear(isl.isl_val_list_copy(arg0.ptr))
18942         obj = val_list(ctx=ctx, ptr=res)
18943         return obj
18944     def concat(arg0, arg1):
18945         try:
18946             if not arg0.__class__ is val_list:
18947                 arg0 = val_list(arg0)
18948         except:
18949             raise
18950         try:
18951             if not arg1.__class__ is val_list:
18952                 arg1 = val_list(arg1)
18953         except:
18954             raise
18955         ctx = arg0.ctx
18956         res = isl.isl_val_list_concat(isl.isl_val_list_copy(arg0.ptr), isl.isl_val_list_copy(arg1.ptr))
18957         obj = val_list(ctx=ctx, ptr=res)
18958         return obj
18959     def drop(arg0, arg1, arg2):
18960         try:
18961             if not arg0.__class__ is val_list:
18962                 arg0 = val_list(arg0)
18963         except:
18964             raise
18965         ctx = arg0.ctx
18966         res = isl.isl_val_list_drop(isl.isl_val_list_copy(arg0.ptr), arg1, arg2)
18967         obj = val_list(ctx=ctx, ptr=res)
18968         return obj
18969     def foreach(arg0, arg1):
18970         try:
18971             if not arg0.__class__ is val_list:
18972                 arg0 = val_list(arg0)
18973         except:
18974             raise
18975         exc_info = [None]
18976         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
18977         def cb_func(cb_arg0, cb_arg1):
18978             cb_arg0 = val(ctx=arg0.ctx, ptr=(cb_arg0))
18979             try:
18980                 arg1(cb_arg0)
18981             except BaseException as e:
18982                 exc_info[0] = e
18983                 return -1
18984             return 0
18985         cb1 = fn(cb_func)
18986         ctx = arg0.ctx
18987         res = isl.isl_val_list_foreach(arg0.ptr, cb1, None)
18988         if exc_info[0] is not None:
18989             raise exc_info[0]
18990         if res < 0:
18991             raise Error
18992     def foreach_scc(arg0, arg1, arg2):
18993         try:
18994             if not arg0.__class__ is val_list:
18995                 arg0 = val_list(arg0)
18996         except:
18997             raise
18998         exc_info = [None]
18999         fn = CFUNCTYPE(c_int, c_void_p, c_void_p, c_void_p)
19000         def cb_func(cb_arg0, cb_arg1, cb_arg2):
19001             cb_arg0 = val(ctx=arg0.ctx, ptr=isl.isl_val_copy(cb_arg0))
19002             cb_arg1 = val(ctx=arg0.ctx, ptr=isl.isl_val_copy(cb_arg1))
19003             try:
19004                 res = arg1(cb_arg0, cb_arg1)
19005             except BaseException as e:
19006                 exc_info[0] = e
19007                 return -1
19008             return 1 if res else 0
19009         cb1 = fn(cb_func)
19010         exc_info = [None]
19011         fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
19012         def cb_func(cb_arg0, cb_arg1):
19013             cb_arg0 = val_list(ctx=arg0.ctx, ptr=(cb_arg0))
19014             try:
19015                 arg2(cb_arg0)
19016             except BaseException as e:
19017                 exc_info[0] = e
19018                 return -1
19019             return 0
19020         cb2 = fn(cb_func)
19021         ctx = arg0.ctx
19022         res = isl.isl_val_list_foreach_scc(arg0.ptr, cb1, None, cb2, None)
19023         if exc_info[0] is not None:
19024             raise exc_info[0]
19025         if res < 0:
19026             raise Error
19027     def insert(arg0, arg1, arg2):
19028         try:
19029             if not arg0.__class__ is val_list:
19030                 arg0 = val_list(arg0)
19031         except:
19032             raise
19033         try:
19034             if not arg2.__class__ is val:
19035                 arg2 = val(arg2)
19036         except:
19037             raise
19038         ctx = arg0.ctx
19039         res = isl.isl_val_list_insert(isl.isl_val_list_copy(arg0.ptr), arg1, isl.isl_val_copy(arg2.ptr))
19040         obj = val_list(ctx=ctx, ptr=res)
19041         return obj
19042     def set_at(arg0, arg1, arg2):
19043         try:
19044             if not arg0.__class__ is val_list:
19045                 arg0 = val_list(arg0)
19046         except:
19047             raise
19048         try:
19049             if not arg2.__class__ is val:
19050                 arg2 = val(arg2)
19051         except:
19052             raise
19053         ctx = arg0.ctx
19054         res = isl.isl_val_list_set_at(isl.isl_val_list_copy(arg0.ptr), arg1, isl.isl_val_copy(arg2.ptr))
19055         obj = val_list(ctx=ctx, ptr=res)
19056         return obj
19057     def size(arg0):
19058         try:
19059             if not arg0.__class__ is val_list:
19060                 arg0 = val_list(arg0)
19061         except:
19062             raise
19063         ctx = arg0.ctx
19064         res = isl.isl_val_list_size(arg0.ptr)
19065         if res < 0:
19066             raise Error
19067         return int(res)
19069 isl.isl_val_list_alloc.restype = c_void_p
19070 isl.isl_val_list_alloc.argtypes = [Context, c_int]
19071 isl.isl_val_list_from_val.restype = c_void_p
19072 isl.isl_val_list_from_val.argtypes = [c_void_p]
19073 isl.isl_val_list_read_from_str.restype = c_void_p
19074 isl.isl_val_list_read_from_str.argtypes = [Context, c_char_p]
19075 isl.isl_val_list_add.restype = c_void_p
19076 isl.isl_val_list_add.argtypes = [c_void_p, c_void_p]
19077 isl.isl_val_list_get_at.restype = c_void_p
19078 isl.isl_val_list_get_at.argtypes = [c_void_p, c_int]
19079 isl.isl_val_list_clear.restype = c_void_p
19080 isl.isl_val_list_clear.argtypes = [c_void_p]
19081 isl.isl_val_list_concat.restype = c_void_p
19082 isl.isl_val_list_concat.argtypes = [c_void_p, c_void_p]
19083 isl.isl_val_list_drop.restype = c_void_p
19084 isl.isl_val_list_drop.argtypes = [c_void_p, c_int, c_int]
19085 isl.isl_val_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
19086 isl.isl_val_list_foreach_scc.argtypes = [c_void_p, c_void_p, c_void_p, c_void_p, c_void_p]
19087 isl.isl_val_list_insert.restype = c_void_p
19088 isl.isl_val_list_insert.argtypes = [c_void_p, c_int, c_void_p]
19089 isl.isl_val_list_set_at.restype = c_void_p
19090 isl.isl_val_list_set_at.argtypes = [c_void_p, c_int, c_void_p]
19091 isl.isl_val_list_size.argtypes = [c_void_p]
19092 isl.isl_val_list_copy.restype = c_void_p
19093 isl.isl_val_list_copy.argtypes = [c_void_p]
19094 isl.isl_val_list_free.restype = c_void_p
19095 isl.isl_val_list_free.argtypes = [c_void_p]
19096 isl.isl_val_list_to_str.restype = POINTER(c_char)
19097 isl.isl_val_list_to_str.argtypes = [c_void_p]