]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
Replace _rho with _restrict_to_space in cone/tests.py.
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 20 Aug 2015 20:15:44 +0000 (16:15 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 20 Aug 2015 20:15:44 +0000 (16:15 -0400)
mjo/cone/tests.py

index b9dc2e064d771de1eb9bb02184a5d4d1df8ea319..e059d94528c749f3d366b1ed2b00b9c610d775cc 100644 (file)
@@ -15,24 +15,24 @@ from sage.all import *
 
 # The double-import is needed to get the underscore methods.
 from mjo.cone.cone import *
-from mjo.cone.cone import _basically_the_same, _rho
+from mjo.cone.cone import _basically_the_same, _restrict_to_space
 
 #
-# Tests for _rho.
+# Tests for _restrict_to_space.
 #
 """
-Apply _rho according to our paper (to obtain our main result). Test all
-four parameter combinations::
+Apply _restrict_to_space according to our paper (to obtain our main
+result). Test all four parameter combinations::
 
     sage: set_random_seed()
     sage: K = random_cone(max_ambient_dim = 8,
     ....:                 strictly_convex=False,
     ....:                 solid=False)
-    sage: K_S = _rho(K)
-    sage: K_SP = _rho(K_S.dual()).dual()
+    sage: K_S = _restrict_to_space(K, K.span())
+    sage: K_SP = _restrict_to_space(K_S.dual(), K_S.dual().span()).dual()
     sage: K_SP.is_proper()
     True
-    sage: K_SP = _rho(K_S, K_S.dual())
+    sage: K_SP = _restrict_to_space(K_S, K_S.dual().span())
     sage: K_SP.is_proper()
     True
 
@@ -42,11 +42,11 @@ four parameter combinations::
     sage: K = random_cone(max_ambient_dim = 8,
     ....:                 strictly_convex=True,
     ....:                 solid=False)
-    sage: K_S = _rho(K)
-    sage: K_SP = _rho(K_S.dual()).dual()
+    sage: K_S = _restrict_to_space(K, K.span())
+    sage: K_SP = _restrict_to_space(K_S.dual(), K_S.dual().span()).dual()
     sage: K_SP.is_proper()
     True
-    sage: K_SP = _rho(K_S, K_S.dual())
+    sage: K_SP = _restrict_to_space(K_S, K_S.dual().span())
     sage: K_SP.is_proper()
     True
 
@@ -56,11 +56,11 @@ four parameter combinations::
     sage: K = random_cone(max_ambient_dim = 8,
     ....:                 strictly_convex=False,
     ....:                 solid=True)
-    sage: K_S = _rho(K)
-    sage: K_SP = _rho(K_S.dual()).dual()
+    sage: K_S = _restrict_to_space(K, K.span())
+    sage: K_SP = _restrict_to_space(K_S.dual(), K_S.dual().span()).dual()
     sage: K_SP.is_proper()
     True
-    sage: K_SP = _rho(K_S, K_S.dual())
+    sage: K_SP = _restrict_to_space(K_S, K_S.dual().span())
     sage: K_SP.is_proper()
     True
 
@@ -70,11 +70,11 @@ four parameter combinations::
     sage: K = random_cone(max_ambient_dim = 8,
     ....:                 strictly_convex=True,
     ....:                 solid=True)
-    sage: K_S = _rho(K)
-    sage: K_SP = _rho(K_S.dual()).dual()
+    sage: K_S = _restrict_to_space(K, K.span())
+    sage: K_SP = _restrict_to_space(K_S.dual(), K_S.dual().span()).dual()
     sage: K_SP.is_proper()
     True
-    sage: K_SP = _rho(K_S, K_S.dual())
+    sage: K_SP = _restrict_to_space(K_S, K_S.dual().span())
     sage: K_SP.is_proper()
     True
 
@@ -89,8 +89,8 @@ all parameter combinations::
     ....:                 solid=False,
     ....:                 strictly_convex=False)
     sage: K = Cone(random_sublist(J.rays(), 0.5), lattice=J.lattice())
-    sage: K_W_star = _rho(K, J).dual()
-    sage: K_star_W = _rho(K.dual(), J)
+    sage: K_W_star = _restrict_to_space(K, J.span()).dual()
+    sage: K_star_W = _restrict_to_space(K.dual(), J.span())
     sage: _basically_the_same(K_W_star, K_star_W)
     True
 
@@ -101,8 +101,8 @@ all parameter combinations::
     ....:                 solid=True,
     ....:                 strictly_convex=False)
     sage: K = Cone(random_sublist(J.rays(), 0.5), lattice=J.lattice())
-    sage: K_W_star = _rho(K, J).dual()
-    sage: K_star_W = _rho(K.dual(), J)
+    sage: K_W_star = _restrict_to_space(K, J.span()).dual()
+    sage: K_star_W = _restrict_to_space(K.dual(), J.span())
     sage: _basically_the_same(K_W_star, K_star_W)
     True
 
@@ -113,8 +113,8 @@ all parameter combinations::
     ....:                 solid=False,
     ....:                 strictly_convex=True)
     sage: K = Cone(random_sublist(J.rays(), 0.5), lattice=J.lattice())
-    sage: K_W_star = _rho(K, J).dual()
-    sage: K_star_W = _rho(K.dual(), J)
+    sage: K_W_star = _restrict_to_space(K, J.span()).dual()
+    sage: K_star_W = _restrict_to_space(K.dual(), J.span())
     sage: _basically_the_same(K_W_star, K_star_W)
     True
 
@@ -125,8 +125,8 @@ all parameter combinations::
     ....:                 solid=True,
     ....:                 strictly_convex=True)
     sage: K = Cone(random_sublist(J.rays(), 0.5), lattice=J.lattice())
-    sage: K_W_star = _rho(K, J).dual()
-    sage: K_star_W = _rho(K.dual(), J)
+    sage: K_W_star = _restrict_to_space(K, J.span()).dual()
+    sage: K_star_W = _restrict_to_space(K.dual(), J.span())
     sage: _basically_the_same(K_W_star, K_star_W)
     True