Add method Domain.isbounded()
[linpy.git] / pypol / domains.py
index fd588b7..a34b75b 100644 (file)
@@ -81,6 +81,12 @@ class Domain:
         libisl.isl_set_free(islset)
         return universe
 
         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)
     def __eq__(self, other):
         symbols = self._xsymbols([self, other])
         islset1 = self._toislset(self.polyhedra, symbols)