From: Michael Orlitzky Date: Sun, 13 Nov 2016 20:26:09 +0000 (-0500) Subject: Remove the condition number from the game string representation. X-Git-Tag: 0.1.0~25 X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dunshire.git;a=commitdiff_plain;h=37d44f04834d61eb3c089b52e4ca7cdd75253520 Remove the condition number from the game string representation. --- diff --git a/dunshire/errors.py b/dunshire/errors.py index 424f3e6..b5eb629 100644 --- a/dunshire/errors.py +++ b/dunshire/errors.py @@ -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] """ def __init__(self, game): diff --git a/dunshire/games.py b/dunshire/games.py index a0c5227..951c7f4 100644 --- a/dunshire/games.py +++ b/dunshire/games.py @@ -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