X-Git-Url: https://gitweb.michael.orlitzky.com/?p=dunshire.git;a=blobdiff_plain;f=test%2Frandomgen.py;h=bfc70f3cf320031f6c8b7047ebdf9746288c0882;hp=8c3c86331c47d6e116517c9545bd69ca7b96f874;hb=0274de467062ab29d2a41d2a91ec0b28fcd95c8d;hpb=8e261aea0119c04752bbb5925b4f4513f928271b diff --git a/test/randomgen.py b/test/randomgen.py index 8c3c863..bfc70f3 100644 --- a/test/randomgen.py +++ b/test/randomgen.py @@ -33,8 +33,8 @@ def random_scalar(): ------- float - A random real number between ``-RANDOM_MAX`` and ``RANDOM_MAX``, - inclusive. + A random real number between negative and positive + :const:`RANDOM_MAX`, inclusive. Examples -------- @@ -54,8 +54,8 @@ def random_nn_scalar(): ------- float - A random nonnegative real number between zero and ``RANDOM_MAX``, - inclusive. + A random nonnegative real number between zero and + :const:`RANDOM_MAX`, inclusive. Examples -------- @@ -75,7 +75,8 @@ def random_natural(): ------- int - A random natural number between ``1`` and ``RANDOM_MAX`` inclusive. + A random natural number between ``1`` and :const:`RANDOM_MAX`, + inclusive. Examples -------- @@ -105,8 +106,8 @@ def random_matrix(row_count, column_count=None): ------- matrix - A new matrix whose entries are random floats chosen uniformly from - the interval ``[-RANDOM_MAX, RANDOM_MAX]``. + A new matrix whose entries are random floats chosen uniformly + between negative and positive :const:`RANDOM_MAX`. Examples -------- @@ -188,7 +189,7 @@ def random_diagonal_matrix(dims): matrix A new matrix whose diagonal entries are random floats chosen - using func:`random_scalar` and whose off-diagonal entries are + using :func:`random_scalar` and whose off-diagonal entries are zero. Examples @@ -271,7 +272,7 @@ def random_lyapunov_like_icecream(dims): matrix A new matrix, Lyapunov-like on the ice-cream cone in ``dims`` dimensions, whose free entries are random floats chosen uniformly - from the interval ``[-RANDOM_MAX, RANDOM_MAX]``. + between negative and positive :const:`RANDOM_MAX`. References ---------- @@ -310,7 +311,7 @@ def random_orthant_game(): We generate each of ``L``, ``K``, ``e1``, and ``e2`` randomly within the constraints of the nonnegative orthant, and then construct a game from them. The process is repeated until we generate a game with - a condition number under ``MAX_COND``. + a condition number under :const:`MAX_COND`. Returns ------- @@ -345,7 +346,7 @@ def random_icecream_game(): We generate each of ``L``, ``K``, ``e1``, and ``e2`` randomly within the constraints of the ice-cream cone, and then construct a game from them. The process is repeated until we generate a game with a - condition number under ``MAX_COND``. + condition number under :const:`MAX_COND`. Returns ------- @@ -394,14 +395,17 @@ def random_ll_orthant_game(): to have a :func:`random_diagonal_matrix` as its operator. Such things are Lyapunov-like on the nonnegative orthant. That process is repeated until the condition number of the resulting game is within - ``MAX_COND``. + :const:`MAX_COND`. Returns ------- SymmetricLinearGame - A random game over some nonnegative orthant whose ``payoff`` method - is based on a Lyapunov-like ``L`` operator. + + A random game over some nonnegative orthant whose + :meth:`dunshire.games.SymmetricLinearGame.payoff` method is + based on a Lyapunov-like + :meth:`dunshire.games.SymmetricLinearGame.L` operator. Examples -------- @@ -432,14 +436,16 @@ def random_ll_icecream_game(): We first construct a :func:`random_icecream_game` and then modify it to have a :func:`random_lyapunov_like_icecream` operator. That process is repeated until the condition number of the resulting game - is within ``MAX_COND``. + is within :const:`MAX_COND`. Returns ------- SymmetricLinearGame - A random game over some ice-cream cone whose ``payoff`` method - is based on a Lyapunov-like ``L`` operator. + A random game over some ice-cream cone whose + :meth:`dunshire.games.SymmetricLinearGame.payoff` method + is based on a Lyapunov-like + :meth:`dunshire.games.SymmetricLinearGame.L` operator. Examples -------- @@ -471,14 +477,16 @@ def random_positive_orthant_game(): We first construct a :func:`random_orthant_game` and then modify it to have a :func:`random_nonnegative_matrix` as its operator. That process is repeated until the condition number of the resulting game - is within ``MAX_COND``. + is within :const:`MAX_COND`. Returns ------- SymmetricLinearGame - A random game over some nonnegative orthant whose ``payoff`` method - is based on a positive ``L`` operator. + A random game over some nonnegative orthant whose + :meth:`dunshire.games.SymmetricLinearGame.payoff` method + is based on a positive + :meth:`dunshire.games.SymmetricLinearGame.L` operator. Examples --------