+
+ # The dual game's value should always equal the primal's.
+ dualsoln = game.dual().solution()
+ self.assert_within_tol(dualsoln.game_value(), soln.game_value())
+
+
+ def test_lyapunov_orthant(self):
+ """
+ Test that a Lyapunov game on the nonnegative orthant works.
+ """
+ (L, K, e1, e2) = _random_orthant_params()
+
+ # Ignore that L, we need a diagonal (Lyapunov-like) one.
+ # (And we don't need to transpose those.)
+ L = _random_diagonal_matrix(K.dimension())
+
+ self.assert_lyapunov_works(L, K, e1, e2)
+
+
+ def test_lyapunov_icecream(self):
+ """
+ Test that a Lyapunov game on the ice-cream cone works.
+ """
+ (L, K, e1, e2) = _random_icecream_params()
+
+ # Ignore that L, we need a diagonal (Lyapunov-like) one.
+ # (And we don't need to transpose those.)
+ L = _random_lyapunov_like_icecream(K.dimension())
+
+ self.assert_lyapunov_works(L, K, e1, e2)