From: Michael Orlitzky Date: Fri, 8 Jan 2016 05:55:08 +0000 (-0500) Subject: Use max_ambient_dim=4 for the pi/Z stuff, things get too slow at n=5. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=7aa874524efb611352abf6dea55f62cde4baed5d;p=sage.d.git Use max_ambient_dim=4 for the pi/Z stuff, things get too slow at n=5. --- diff --git a/mjo/cone/cone.py b/mjo/cone/cone.py index 8790c30..d0b5b6f 100644 --- a/mjo/cone/cone.py +++ b/mjo/cone/cone.py @@ -246,7 +246,7 @@ def positive_operator_gens(K): cone into the cone:: sage: set_random_seed() - sage: K = random_cone(max_ambient_dim=5) + sage: K = random_cone(max_ambient_dim=4) sage: pi_of_K = positive_operator_gens(K) sage: all([ K.contains(P*x) for P in pi_of_K for x in K ]) True @@ -255,7 +255,7 @@ def positive_operator_gens(K): cone into the cone:: sage: set_random_seed() - sage: K = random_cone(max_ambient_dim=5) + sage: K = random_cone(max_ambient_dim=4) sage: pi_of_K = positive_operator_gens(K) sage: all([ K.contains(P*K.random_element(QQ)) for P in pi_of_K ]) True @@ -264,7 +264,7 @@ def positive_operator_gens(K): generators of the cone into the cone:: sage: set_random_seed() - sage: K = random_cone(max_ambient_dim=5) + sage: K = random_cone(max_ambient_dim=4) sage: pi_of_K = positive_operator_gens(K) sage: L = ToricLattice(K.lattice_dim()**2) sage: pi_cone = Cone([ g.list() for g in pi_of_K ], lattice=L) @@ -276,7 +276,7 @@ def positive_operator_gens(K): element of the cone into the cone:: sage: set_random_seed() - sage: K = random_cone(max_ambient_dim=5) + sage: K = random_cone(max_ambient_dim=4) sage: pi_of_K = positive_operator_gens(K) sage: L = ToricLattice(K.lattice_dim()**2) sage: pi_cone = Cone([ g.list() for g in pi_of_K ], lattice=L) @@ -288,7 +288,7 @@ def positive_operator_gens(K): can be computed from the lineality spaces of the cone and its dual:: sage: set_random_seed() - sage: K = random_cone(max_ambient_dim=5) + sage: K = random_cone(max_ambient_dim=4) sage: pi_of_K = positive_operator_gens(K) sage: L = ToricLattice(K.lattice_dim()**2) sage: pi_cone = Cone([ g.list() for g in pi_of_K ], lattice=L) @@ -307,7 +307,7 @@ def positive_operator_gens(K): is known from its lineality space:: sage: set_random_seed() - sage: K = random_cone(max_ambient_dim=5) + sage: K = random_cone(max_ambient_dim=4) sage: n = K.lattice_dim() sage: m = K.dim() sage: l = K.lineality() @@ -323,7 +323,7 @@ def positive_operator_gens(K): corollary in my paper:: sage: set_random_seed() - sage: K = random_cone(max_ambient_dim=5) + sage: K = random_cone(max_ambient_dim=4) sage: n = K.lattice_dim() sage: m = K.dim() sage: l = K.lineality() @@ -363,7 +363,7 @@ def positive_operator_gens(K): description of its generators:: sage: set_random_seed() - sage: K = random_cone(max_ambient_dim=5) + sage: K = random_cone(max_ambient_dim=4) sage: n = K.lattice_dim() sage: pi_of_K = positive_operator_gens(K) sage: L = ToricLattice(n**2) @@ -401,7 +401,7 @@ def positive_operator_gens(K): is proper:: sage: set_random_seed() - sage: K = random_cone(max_ambient_dim=5) + sage: K = random_cone(max_ambient_dim=4) sage: pi_of_K = positive_operator_gens(K) sage: L = ToricLattice(K.lattice_dim()**2) sage: pi_cone = Cone([p.list() for p in pi_of_K], lattice=L) @@ -485,7 +485,7 @@ def Z_transformation_gens(K): The Z-property is possessed by every Z-transformation:: sage: set_random_seed() - sage: K = random_cone(max_ambient_dim=6) + sage: K = random_cone(max_ambient_dim=4) sage: Z_of_K = Z_transformation_gens(K) sage: dcs = K.discrete_complementarity_set() sage: all([(z*x).inner_product(s) <= 0 for z in Z_of_K @@ -495,7 +495,7 @@ def Z_transformation_gens(K): The lineality space of Z is LL:: sage: set_random_seed() - sage: K = random_cone(min_ambient_dim=1, max_ambient_dim=6) + sage: K = random_cone(min_ambient_dim=1, max_ambient_dim=4) sage: lls = span([ vector(l.list()) for l in K.lyapunov_like_basis() ]) sage: z_cone = Cone([ z.list() for z in Z_transformation_gens(K) ]) sage: z_cone.linear_subspace() == lls @@ -504,7 +504,7 @@ def Z_transformation_gens(K): And thus, the lineality of Z is the Lyapunov rank:: sage: set_random_seed() - sage: K = random_cone(max_ambient_dim=6) + sage: K = random_cone(max_ambient_dim=4) sage: Z_of_K = Z_transformation_gens(K) sage: L = ToricLattice(K.lattice_dim()**2) sage: z_cone = Cone([ z.list() for z in Z_of_K ], lattice=L) @@ -514,7 +514,7 @@ def Z_transformation_gens(K): The lineality spaces of pi-star and Z-star are equal: sage: set_random_seed() - sage: K = random_cone(max_ambient_dim=5) + sage: K = random_cone(max_ambient_dim=4) sage: pi_of_K = positive_operator_gens(K) sage: Z_of_K = Z_transformation_gens(K) sage: L = ToricLattice(K.lattice_dim()**2)