]> gitweb.michael.orlitzky.com - dunshire.git/commitdiff
Remove the condition number from the game string representation.
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 13 Nov 2016 20:26:09 +0000 (15:26 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Sun, 13 Nov 2016 20:26:09 +0000 (15:26 -0500)
dunshire/errors.py
dunshire/games.py

index 424f3e62352848c7f673375e401da18c25cdbb98..b5eb6291f221c9bcfb0e79ac4ec87ebfd3fe4096 100644 (file)
@@ -90,8 +90,7 @@ class GameUnsolvableException(Exception):
          e1 = [1.0000000]
               [0.1000000],
          e2 = [3.0000000]
-              [0.1000000],
-         Condition((L, K, e1, e2)) = 4.155...
+              [0.1000000]
        CVXOPT returned:
          dual infeasibility: None
          dual objective: 1.0
@@ -191,8 +190,7 @@ class PoorScalingException(Exception):
          e1 = [1.0000000]
               [0.1000000],
          e2 = [3.0000000]
-              [0.1000000],
-         Condition((L, K, e1, e2)) = 4.155...
+              [0.1000000]
        <BLANKLINE>
     """
     def __init__(self, game):
index a0c52279869510090f9d051a92b479bfefa3fbdd..951c7f4bc16088e4b82cc91cb90eb41c9e90db5f 100644 (file)
@@ -220,8 +220,7 @@ class SymmetricLinearGame:
                [ 1],
           e2 = [ 1]
                [ 2]
-               [ 3],
-          Condition((L, K, e1, e2)) = 31.834...
+               [ 3]
 
     Lists can (and probably should) be used for every argument::
 
@@ -239,8 +238,7 @@ class SymmetricLinearGame:
           e1 = [ 1]
                [ 1],
           e2 = [ 1]
-               [ 1],
-          Condition((L, K, e1, e2)) = 1.707...
+               [ 1]
 
     The points ``e1`` and ``e2`` can also be passed as some other
     enumerable type (of the correct length) without much harm, since
@@ -262,8 +260,7 @@ class SymmetricLinearGame:
           e1 = [ 1]
                [ 1],
           e2 = [ 1]
-               [ 1],
-          Condition((L, K, e1, e2)) = 1.707...
+               [ 1]
 
     However, ``L`` will always be intepreted as a list of rows, even
     if it is passed as a :class:`cvxopt.base.matrix` which is
@@ -284,8 +281,7 @@ class SymmetricLinearGame:
           e1 = [ 1]
                [ 1],
           e2 = [ 1]
-               [ 1],
-          Condition((L, K, e1, e2)) = 6.073...
+               [ 1]
         >>> L = cvxopt.matrix(L)
         >>> print(L)
         [ 1  3]
@@ -300,8 +296,7 @@ class SymmetricLinearGame:
           e1 = [ 1]
                [ 1],
           e2 = [ 1]
-               [ 1],
-          Condition((L, K, e1, e2)) = 6.073...
+               [ 1]
 
     """
     def __init__(self, L, K, e1, e2):
@@ -335,8 +330,7 @@ class SymmetricLinearGame:
               '  L = {:s},\n' \
               '  K = {!s},\n' \
               '  e1 = {:s},\n' \
-              '  e2 = {:s},\n' \
-              '  Condition((L, K, e1, e2)) = {:f}.'
+              '  e2 = {:s}'
         indented_L = '\n      '.join(str(self.L()).splitlines())
         indented_e1 = '\n       '.join(str(self.e1()).splitlines())
         indented_e2 = '\n       '.join(str(self.e2()).splitlines())
@@ -344,8 +338,7 @@ class SymmetricLinearGame:
         return tpl.format(indented_L,
                           str(self.K()),
                           indented_e1,
-                          indented_e2,
-                          self.condition())
+                          indented_e2)
 
 
     def L(self):
@@ -1225,8 +1218,7 @@ class SymmetricLinearGame:
                    [ 3],
               e2 = [ 1]
                    [ 1]
-                   [ 1],
-              Condition((L, K, e1, e2)) = 44.476...
+                   [ 1]
 
         """
         # We pass ``self.L()`` right back into the constructor, because