Rename Domain.polyhedral_hull() into Domain.aspolyhedron()
authorVivien Maisonneuve <v.maisonneuve@gmail.com>
Fri, 4 Jul 2014 19:28:55 +0000 (21:28 +0200)
committerVivien Maisonneuve <v.maisonneuve@gmail.com>
Fri, 4 Jul 2014 19:28:55 +0000 (21:28 +0200)
examples/squares.py
pypol/domains.py
pypol/polyhedra.py
pypol/tests/test_domains.py

index e622c27..4389d87 100755 (executable)
@@ -55,7 +55,7 @@ print()
 print('lexographic min of sq2:', sq2.lexmin()) #test lexmax()
 print('lexographic max of sq2:', sq2.lexmax()) #test lexmax()
 print()
 print('lexographic min of sq2:', sq2.lexmin()) #test lexmax()
 print('lexographic max of sq2:', sq2.lexmax()) #test lexmax()
 print()
-print('Polyhedral hull of sq1 + sq2 is:', q.polyhedral_hull()) #test polyhedral hull
+print('Polyhedral hull of sq1 + sq2 is:', q.aspolyhedron()) #test polyhedral hull
 print()
 print('is sq1 bounded?', sq1.isbounded()) #unbounded should return True
 print('is sq5 bounded?', sq5.isbounded()) #unbounded should return False
 print()
 print('is sq1 bounded?', sq1.isbounded()) #unbounded should return True
 print('is sq5 bounded?', sq5.isbounded()) #unbounded should return False
index dd39220..632335b 100644 (file)
@@ -144,7 +144,7 @@ class Domain:
         islset = libisl.isl_set_remove_redundancies(islset)
         return self._fromislset(islset, self.symbols)
 
         islset = libisl.isl_set_remove_redundancies(islset)
         return self._fromislset(islset, self.symbols)
 
-    def polyhedral_hull(self):
+    def aspolyhedron(self):
         # several types of hull are available
         # polyhedral seems to be the more appropriate, to be checked
         from .polyhedra import Polyhedron
         # several types of hull are available
         # polyhedral seems to be the more appropriate, to be checked
         from .polyhedra import Polyhedron
index f93f31e..a6adeda 100644 (file)
@@ -37,7 +37,7 @@ class Polyhedron(Domain):
         elif isinstance(equalities, Domain):
             if inequalities is not None:
                 raise TypeError('too many arguments')
         elif isinstance(equalities, Domain):
             if inequalities is not None:
                 raise TypeError('too many arguments')
-            return equalities.polyhedral_hull()
+            return equalities.aspolyhedron()
         if equalities is None:
             equalities = []
         else:
         if equalities is None:
             equalities = []
         else:
@@ -82,7 +82,7 @@ class Polyhedron(Domain):
         libisl.isl_basic_set_free(islbset)
         return universe
 
         libisl.isl_basic_set_free(islbset)
         return universe
 
-    def polyhedral_hull(self):
+    def aspolyhedron(self):
         return self
 
     @classmethod
         return self
 
     @classmethod
index a6f643c..820d556 100644 (file)
@@ -88,10 +88,10 @@ class TestDomain(unittest.TestCase):
         self.assertEqual(~self.universe, Empty)
         self.assertEqual(~self.empty, self.universe)
 
         self.assertEqual(~self.universe, Empty)
         self.assertEqual(~self.empty, self.universe)
 
-    def test_polyhedral_hull(self):
-        self.assertEqual(self.square1.polyhedral_hull(), self.hull)
-        self.assertEqual(self.universe.polyhedral_hull(), self.universe)
-        self.assertEqual(self.empty.polyhedral_hull(), self.empty)
+    def test_aspolyhedron(self):
+        self.assertEqual(self.square1.aspolyhedron(), self.hull)
+        self.assertEqual(self.universe.aspolyhedron(), self.universe)
+        self.assertEqual(self.empty.aspolyhedron(), self.empty)
 
     def test_project(self):
         self.assertEqual(self.square1.project(symbols('x')), self.dropped)
 
     def test_project(self):
         self.assertEqual(self.square1.project(symbols('x')), self.dropped)