]> CRI, Mines Paris - PSL - linpy.git/commitdiff
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 e622c27398372620010a0e7c4c727812f1b44ce2..4389d87ae8e593be20051c0a50a0285620145e01 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('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
index dd39220eace7a8738a4da4dcf5ef1d5ee9316e15..632335b733c28da18a232523b8638465ec466e26 100644 (file)
@@ -144,7 +144,7 @@ class Domain:
         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
index f93f31eebe2aff88ddea830512878e7665966abb..a6adeda72cca311444022f944d3ddb7d0f0ad0b0 100644 (file)
@@ -37,7 +37,7 @@ class Polyhedron(Domain):
         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:
@@ -82,7 +82,7 @@ class Polyhedron(Domain):
         libisl.isl_basic_set_free(islbset)
         return universe
 
-    def polyhedral_hull(self):
+    def aspolyhedron(self):
         return self
 
     @classmethod
index a6f643ccbf4205db660c658e1042107f3249d68d..820d556fc04bcab34c46986121bfcc3000466e80 100644 (file)
@@ -88,10 +88,10 @@ class TestDomain(unittest.TestCase):
         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)