From: Michael Orlitzky Date: Tue, 11 Aug 2015 04:41:51 +0000 (-0400) Subject: Slightly simplify LL() code. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=35b57bd6de2e1db25309b7cf20b39a5675bdb44f;p=sage.d.git Slightly simplify LL() code. --- diff --git a/mjo/cone/cone.py b/mjo/cone/cone.py index 02d5258..821b959 100644 --- a/mjo/cone/cone.py +++ b/mjo/cone/cone.py @@ -673,8 +673,8 @@ def lyapunov_rank(K): # K is not solid, restrict to its span. K = _rho(K) - # Lemma 2 - beta += m*(n - m) + (n - m)**2 + # Non-solid reduction lemma. + beta += (n - m)*n if l > 0: # K is not pointed, restrict to the span of its dual. Uses a @@ -682,8 +682,8 @@ def lyapunov_rank(K): # _rho(K.dual()).dual(). K = _rho(K, K.dual()) - # Lemma 3 - beta += m * l + # Non-pointed reduction lemma. + beta += l * m beta += len(LL(K)) return beta