X-Git-Url: https://svn.cri.ensmp.fr/git/linpy.git/blobdiff_plain/cd2197879049a836b02a331adf0a00c0b87fe043..17f12d8f63d696f09dbb44be3dc24b9aba7b88d3:/pypol/polyhedra.py?ds=inline diff --git a/pypol/polyhedra.py b/pypol/polyhedra.py index a6adeda..63ecb64 100644 --- a/pypol/polyhedra.py +++ b/pypol/polyhedra.py @@ -85,6 +85,13 @@ class Polyhedron(Domain): def aspolyhedron(self): return self + def subs(self, symbol, expression=None): + equalities = [equality.subs(symbol, expression) + for equality in self.equalities] + inequalities = [inequality.subs(symbol, expression) + for inequality in self.inequalities] + return Polyhedron(equalities, inequalities) + @classmethod def _fromislbasicset(cls, islbset, symbols): islconstraints = islhelper.isl_basic_set_constraints(islbset)