isl_pw_qpolynomial_bound_range: fix removal of dims after compression
[platform/upstream/isl.git] / isl_morph.h
1 /*
2  * Copyright 2010      INRIA Saclay
3  *
4  * Use of this software is governed by the GNU LGPLv2.1 license
5  *
6  * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France,
7  * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod,
8  * 91893 Orsay, France 
9  */
10
11 #ifndef ISL_MORHP_H
12 #define ISL_MORHP_H
13
14 #include <stdio.h>
15 #include <isl_dim.h>
16 #include <isl_mat.h>
17 #include <isl_set.h>
18
19 #if defined(__cplusplus)
20 extern "C" {
21 #endif
22
23 /* An isl_morph is a "morphism" on (basic) sets.
24  * "map" is an affine mapping from "dom" to "ran"
25  * and "inv" is the inverse mapping.
26  */
27 struct isl_morph {
28         int ref;
29
30         isl_basic_set *dom;
31         isl_basic_set *ran;
32
33         isl_mat *map;
34         isl_mat *inv;
35 };
36 typedef struct isl_morph isl_morph;
37
38 __isl_give isl_morph *isl_morph_copy(__isl_keep isl_morph *morph);
39 void isl_morph_free(__isl_take isl_morph *morph);
40
41 __isl_give isl_dim *isl_morph_get_ran_dim(__isl_keep isl_morph *morph);
42
43 __isl_give isl_morph *isl_morph_remove_dom_dims(__isl_take isl_morph *morph,
44         enum isl_dim_type type, unsigned first, unsigned n);
45 __isl_give isl_morph *isl_morph_remove_ran_dims(__isl_take isl_morph *morph,
46         enum isl_dim_type type, unsigned first, unsigned n);
47
48 __isl_give isl_morph *isl_morph_compose(__isl_take isl_morph *morph1,
49         __isl_take isl_morph *morph2);
50 __isl_give isl_morph *isl_morph_inverse(__isl_take isl_morph *morph);
51
52 void isl_morph_dump(__isl_take isl_morph *morph, FILE *out);
53
54 __isl_give isl_morph *isl_basic_set_variable_compression(
55         __isl_keep isl_basic_set *bset, enum isl_dim_type type);
56 __isl_give isl_morph *isl_basic_set_parameter_compression(
57         __isl_keep isl_basic_set *bset);
58
59 __isl_give isl_basic_set *isl_morph_basic_set(__isl_take isl_morph *morph,
60         __isl_take isl_basic_set *bset);
61 __isl_give isl_set *isl_morph_set(__isl_take isl_morph *morph,
62         __isl_take isl_set *set);
63
64 #if defined(__cplusplus)
65 }
66 #endif
67
68 #endif