From 10142e85f34c47fa35df002f519d1d58a79a74f4 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 4 Jun 2015 14:11:29 -0400 Subject: [PATCH] Update existing tests to use the codim() function. --- mjo/cone/cone.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mjo/cone/cone.py b/mjo/cone/cone.py index 55d9a06..ff7d195 100644 --- a/mjo/cone/cone.py +++ b/mjo/cone/cone.py @@ -503,7 +503,7 @@ def lyapunov_rank(K): sage: K = Cone([e1, neg_e1, e2, neg_e2, zero, zero, zero]) sage: lyapunov_rank(K) 19 - sage: K.lattice_dim()**2 - K.dim()*(K.lattice_dim() - K.dim()) + sage: K.lattice_dim()**2 - K.dim()*codim(K) 19 The Lyapunov rank should be additive on a product of proper cones @@ -579,8 +579,8 @@ def lyapunov_rank(K): sage: K_S = project_span(K) sage: P = project_span(K_S.dual()).dual() sage: l = lineality(K) - sage: codim = K.lattice_dim() - K.dim() - sage: expected = lyapunov_rank(P) + K.dim()*(l + codim) + codim**2 + sage: c = codim(K) + sage: expected = lyapunov_rank(P) + K.dim()*(l + c) + c**2 sage: actual == expected True -- 2.44.2