Add method Domain.isbounded()
authorVivien Maisonneuve <v.maisonneuve@gmail.com>
Thu, 26 Jun 2014 09:18:16 +0000 (11:18 +0200)
committerVivien Maisonneuve <v.maisonneuve@gmail.com>
Thu, 26 Jun 2014 09:18:16 +0000 (11:18 +0200)
pypol/domains.py

index fd588b7..a34b75b 100644 (file)
@@ -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)