]> gitweb.michael.orlitzky.com - dunshire.git/blobdiff - test/randomgen.py
Set MAX_COND to 100 in the randomgen module to facilitate random testing.
[dunshire.git] / test / randomgen.py
index 9510c04767150b967283f62f72d7e7a88f112186..9fee2f749cbcf8037f2c64d41fe42e17731381a4 100644 (file)
@@ -9,7 +9,7 @@ from dunshire.cones import NonnegativeOrthant, IceCream
 from dunshire.games import SymmetricLinearGame
 from dunshire.matrices import (append_col, append_row, identity)
 
-MAX_COND = 250
+MAX_COND = 100
 """
 The maximum condition number of a randomly-generated game.
 """
@@ -323,8 +323,8 @@ def random_orthant_game():
     """
     ambient_dim = random_natural() + 1
     K = NonnegativeOrthant(ambient_dim)
-    e1 = [random_nn_scalar() for _ in range(K.dimension())]
-    e2 = [random_nn_scalar() for _ in range(K.dimension())]
+    e1 = [0.1 + random_nn_scalar() for _ in range(K.dimension())]
+    e2 = [0.1 + random_nn_scalar() for _ in range(K.dimension())]
     L = random_matrix(K.dimension())
     G = SymmetricLinearGame(L, K, e1, e2)