From: Vivien Maisonneuve <v.maisonneuve@gmail.com>
Date: Thu, 26 Jun 2014 09:18:16 +0000 (+0200)
Subject: Add method Domain.isbounded()
X-Git-Tag: 1.0~196
X-Git-Url: https://svn.cri.ensmp.fr/git/linpy.git/commitdiff_plain/5fa0e7932a1621bee505991475291e43225a4b49?ds=inline;hp=bb5bf66e65ca05ea05fd6a646ab2d57871571789

Add method Domain.isbounded()
---

diff --git a/pypol/domains.py b/pypol/domains.py
index fd588b7..a34b75b 100644
--- a/pypol/domains.py
+++ b/pypol/domains.py
@@ -81,6 +81,12 @@ class Domain:
         libisl.isl_set_free(islset)
         return universe
 
+    def isbounded(self):
+        islset = self._toislset(self.polyhedra, self.symbols)
+        bounded = bool(libisl.isl_set_is_bounded(islset))
+        libisl.isl_set_free(islset)
+        return bounded
+
     def __eq__(self, other):
         symbols = self._xsymbols([self, other])
         islset1 = self._toislset(self.polyhedra, symbols)