diff --git a/docs/source/how_to.rst b/docs/source/how_to.rst index 4499a65..4148763 100644 --- a/docs/source/how_to.rst +++ b/docs/source/how_to.rst @@ -4,11 +4,11 @@ How-to Guides How to save and resume long computation --------------------------------------- -:class:`RandomState` is pickleable, and pickling allows to save and restore -the internal state of the quasi-random number generators. +:class:`RandomState` is pickleable. Pickling allows to save and restore +the internal state of the pseudorandom number generators. .. code-block:: python - :caption: Saving state of quasi-random basic random number generators + :caption: Saving state of pseudorandom basic random number generators import numpy as np import mkl_random diff --git a/docs/source/index.rst b/docs/source/index.rst index 33149a8..8571df3 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -3,7 +3,7 @@ Random sampling powered by Intel(R) Math Kernel Library :mod:`mkl_random` is Python package exposing pseudo-random and non-deterministic random number generators with continuous and discrete distribution available in -Intel(R) Math Kernel Library (MKL). +Intel(R) oneAPI Math Kernel Library (`oneMKL `_). .. grid:: 2 :gutter: 3 diff --git a/docs/source/reference/ars5.rst b/docs/source/reference/ars5.rst index 92f6ff4..e9b6f77 100644 --- a/docs/source/reference/ars5.rst +++ b/docs/source/reference/ars5.rst @@ -3,11 +3,11 @@ ARS5 brng ========= -The ARS5 counter-based pseudorandom number generator based on AES encryption algorithm can be +The ARS5 counter-based pseudo-random number generator based on AES encryption algorithm can be initialized with either an integral seed, a list of integral seeds, or automatically. .. code-block:: python - :caption: Construction for ARS5 basic random number generator with scalar seed + :caption: Construction for ARS5 basic pseudo-random number generator with scalar seed import mkl_random rs = mkl_random.RandomState(1234, brng="ars5") @@ -17,7 +17,7 @@ initialized with either an integral seed, a list of integral seeds, or automatic esample = rs.uniform(0, 1, size=1000) .. code-block:: python - :caption: Construction for ARS5 basic random number generator with vector seed + :caption: Construction for ARS5 basic pseudo-random number generator with vector seed import mkl_random rs_vec = mkl_random.RandomState([1234, 567, 89, 0], brng="ars5") @@ -29,7 +29,7 @@ initialized with either an integral seed, a list of integral seeds, or automatic When seed is not specified, the generator is initialized using system clock, e.g.: .. code-block:: python - :caption: Construction for ARS5 basic random number generator automatic seed + :caption: Construction for ARS5 basic pseudo-random number generator with automatic seed import mkl_random rs_def = mkl_random.RandomState(brng="ars5") diff --git a/docs/source/reference/index.rst b/docs/source/reference/index.rst index c66d54b..fffc0c1 100644 --- a/docs/source/reference/index.rst +++ b/docs/source/reference/index.rst @@ -8,17 +8,17 @@ The basic random number generator is chosen by specifying :code:`brng` keyword a The list of supported basic random number generators is as follows (also see `oneMKL Engines `_): -* :code:`'MT19937'` - the Mersenne Twister pseudo-random number generator (default), :doc:`example ` -* :code:`'SFMT19937'` - the SIMD-oriented Mersenne Twister pseudo-random number generator, :doc:`example ` -* :code:`'MT2203'` - the set of 6024 Mersenne Twister pseudorandom number generators, :doc:`example ` -* :code:`'R250'` - the 32-bit generalized feedback shift register pseudorandom number generator GFSR(250,103), :doc:`example ` -* :code:`'WH'` - the set of 273 Wichmann-Hill’s combined multiplicative congruential generators, :doc:`example ` -* :code:`'MCG31'` - the 31-bit multiplicative congruential pseudorandom number generator, :doc:`example ` -* :code:`'MCG59'` - the 59-bit multiplicative congruential pseudorandom number generator, :doc:`example ` -* :code:`'MRG32K3A'` - the combined multiple recursive pseudorandom number generator MRG32k3a, :doc:`example ` -* :code:`'PHILOX4X32X10'` - the Philox4x32x10 counter-based pseudorandom number generator, :doc:`example ` -* :code:`'NONDETERM'` - the generator with non-deterministic source of randomness (for example, a hardware device), :doc:`example ` -* :code:`'ARS5'` - the ARS5 counter-based pseudorandom number generator based on AES encryption algorithm, :doc:`example ` +* :ref:`'MT19937' ` - the Mersenne Twister pseudo-random number generator (default) +* :ref:`'SFMT19937' ` - the SIMD-oriented Mersenne Twister pseudo-random number generator +* :ref:`'MT2203' ` - the set of 6024 Mersenne Twister pseudo-random number generators +* :ref:`'R250' ` - the 32-bit generalized feedback shift register pseudo-random number generator GFSR(250,103) +* :ref:`'WH' ` - the set of 273 Wichmann-Hill’s combined multiplicative congruential pseudo-random number generators +* :ref:`'MCG31' ` - the 31-bit multiplicative congruential pseudo-random number generator +* :ref:`'MCG59' ` - the 59-bit multiplicative congruential pseudo-random number generator +* :ref:`'MRG32K3A' ` - the combined multiple recursive pseudo-random number generator MRG32k3a +* :ref:`'PHILOX4X32X10' ` - the Philox4x32x10 counter-based pseudo-random number generator +* :ref:`'NONDETERM' ` - the generator with non-deterministic source of randomness (for example, a hardware device) +* :ref:`'ARS5' ` - the ARS5 counter-based pseudo-random number generator based on AES encryption algorithm .. _oneMKLBRNG: https://spec.oneapi.io/versions/1.0-rev-2/elements/oneMKL/source/domains/rng/engines-basic-random-number-generators.html diff --git a/docs/source/reference/mcg31.rst b/docs/source/reference/mcg31.rst index 1076644..2e86778 100644 --- a/docs/source/reference/mcg31.rst +++ b/docs/source/reference/mcg31.rst @@ -3,11 +3,11 @@ MCG31 brng ========== -The 31-bit multiplicative congruential pseudorandom number generator MCG(1132489760, 2**31 -1) can be +The 31-bit multiplicative congruential pseudo-random number generator :math:`mcg(1132489760, 2^{31} -1)` can be initialized with either an integral seed, a list of integral seeds, or automatically. .. code-block:: python - :caption: Construction for MCG31 basic random number generator with scalar seed + :caption: Construction for MCG31 basic random pseudo-number generator with scalar seed import mkl_random rs = mkl_random.RandomState(1234, brng="MCG31") @@ -17,7 +17,7 @@ initialized with either an integral seed, a list of integral seeds, or automati esample = rs.uniform(0, 1, size=1000) .. code-block:: python - :caption: Construction for MCG31 basic random number generator with vector seed + :caption: Construction for MCG31 basic pseudo-random number generator with vector seed import mkl_random rs_vec = mkl_random.RandomState([1234, 567, 89, 0], brng="MCG31") @@ -29,7 +29,7 @@ initialized with either an integral seed, a list of integral seeds, or automati When seed is not specified, the generator is initialized using system clock, e.g.: .. code-block:: python - :caption: Construction for MCG31 basic random number generator automatic seed + :caption: Construction for MCG31 basic pseudo-random number generator with automatic seed import mkl_random rs_def = mkl_random.RandomState(brng="MCG31") diff --git a/docs/source/reference/mcg59.rst b/docs/source/reference/mcg59.rst index e187ba6..944a7b6 100644 --- a/docs/source/reference/mcg59.rst +++ b/docs/source/reference/mcg59.rst @@ -3,11 +3,11 @@ MCG59 brng ========== -The 59-bit multiplicative congruential pseudorandom number generator can be +The 59-bit multiplicative congruential pseudo-random number generator can be initialized with either an integral seed, a list of integral seeds, or automatically. .. code-block:: python - :caption: Construction for MCG31 basic random number generator with scalar seed + :caption: Construction for MCG31 basic pseudo-random number generator with scalar seed import mkl_random rs = mkl_random.RandomState(1234, brng="MCG59") @@ -17,7 +17,7 @@ initialized with either an integral seed, a list of integral seeds, or automati esample = rs.uniform(0, 1, size=1000) .. code-block:: python - :caption: Construction for MCG31 basic random number generator with vector seed + :caption: Construction for MCG31 basic pseudo-random number generator with vector seed import mkl_random rs_vec = mkl_random.RandomState([1234, 567, 89, 0], brng="MCG59") @@ -29,7 +29,7 @@ initialized with either an integral seed, a list of integral seeds, or automati When seed is not specified, the generator is initialized using system clock, e.g.: .. code-block:: python - :caption: Construction for MCG31 basic random number generator automatic seed + :caption: Construction for MCG31 basic pseudo-random number generator with automatic seed import mkl_random rs_def = mkl_random.RandomState(brng="MCG59") diff --git a/docs/source/reference/mrg32k3a.rst b/docs/source/reference/mrg32k3a.rst index 24465f6..ae4577a 100644 --- a/docs/source/reference/mrg32k3a.rst +++ b/docs/source/reference/mrg32k3a.rst @@ -3,11 +3,11 @@ MRG32k3a brng ============= -The combined multiple recursive pseudorandom number generator MRG32k3a can be +The combined multiple recursive pseudo-random number generator MRG32k3a can be initialized with either an integral seed, a list of integral seeds, or automatically. .. code-block:: python - :caption: Construction for MRG32k3a basic random number generator with scalar seed + :caption: Construction for MRG32k3a basic pseudo-random number generator with scalar seed import mkl_random rs = mkl_random.RandomState(1234, brng="MRG32k3a") @@ -17,7 +17,7 @@ initialized with either an integral seed, a list of integral seeds, or automati esample = rs.uniform(0, 1, size=1000) .. code-block:: python - :caption: Construction for MRG32k3a basic random number generator with vector seed + :caption: Construction for MRG32k3a basic pseudo-random number generator with vector seed import mkl_random rs_vec = mkl_random.RandomState([1234, 567, 89, 0], brng="MRG32k3a") @@ -29,7 +29,7 @@ initialized with either an integral seed, a list of integral seeds, or automati When seed is not specified, the generator is initialized using system clock, e.g.: .. code-block:: python - :caption: Construction for MRG32k3a basic random number generator automatic seed + :caption: Construction for MRG32k3a basic psuedo-random number generator with automatic seed import mkl_random rs_def = mkl_random.RandomState(brng="MRG32k3a") diff --git a/docs/source/reference/mt19937.rst b/docs/source/reference/mt19937.rst index 729ee16..4d47096 100644 --- a/docs/source/reference/mt19937.rst +++ b/docs/source/reference/mt19937.rst @@ -3,11 +3,11 @@ MT19937 brng ============ -The Mersenne Twister random number generator can be initialized with either an integral seed, +The Mersenne Twister pseudo-random number generator can be initialized with either an integral seed, a list of integral seeds, or automatically. .. code-block:: python - :caption: Construction for MT19937 basic random number generator with scalar seed + :caption: Construction for MT19937 basic pseudo-random number generator with scalar seed import mkl_random rs = mkl_random.RandomState(1234, brng="MT19937") @@ -16,7 +16,7 @@ a list of integral seeds, or automatically. usample = rs.uniform(0, 1, size=1000) .. code-block:: python - :caption: Construction for MT19937 basic random number generator with vector seed + :caption: Construction for MT19937 basic pseudo-random number generator with vector seed import mkl_random rs_vec = mkl_random.RandomState([1234, 567, 89, 0], brng="MT19937") @@ -27,7 +27,7 @@ a list of integral seeds, or automatically. When seed is not specified, the generator is initialized using system clock, e.g.: .. code-block:: python - :caption: Construction for MT19937 basic random number generator automatic seed + :caption: Construction for MT19937 basic pseudo-random number generator with automatic seed import mkl_random rs_def = mkl_random.RandomState(brng="MT19937") diff --git a/docs/source/reference/mt2203.rst b/docs/source/reference/mt2203.rst index db815ae..e916fea 100644 --- a/docs/source/reference/mt2203.rst +++ b/docs/source/reference/mt2203.rst @@ -10,7 +10,7 @@ An individual member of the set can be addressed by using a tuple to specify the :code:`brng=("MT2203", set_id)` where :math:`0 \leq \text{set_id} < 6024`. .. code-block:: python - :caption: Construction for MT2203 basic random number generator with scalar seed + :caption: Construction for MT2203 basic psuedo-random number generator with scalar seed import mkl_random seed = 777 @@ -26,7 +26,7 @@ An individual member of the set can be addressed by using a tuple to specify the sample = rs5.uniform(0, 1, size=1_000_000) .. code-block:: python - :caption: Construction for MT2203 basic random number generator with vector seed + :caption: Construction for MT2203 basic psuedo-random number generator with vector seed import mkl_random rs = mkl_random.RandomState([1234, 567, 89, 0], brng=("MT2203", 6023)) @@ -38,7 +38,7 @@ An individual member of the set can be addressed by using a tuple to specify the When seed is not specified, the generator is initialized using system clock, e.g.: .. code-block:: python - :caption: Construction for MT2203 basic random number generator automatic seed + :caption: Construction for MT2203 basic psuedo-random number generator with automatic seed import mkl_random rs_def = mkl_random.RandomState(brng="MT2203") diff --git a/docs/source/reference/nondeterministic.rst b/docs/source/reference/nondeterministic.rst index 68a5435..3b3b752 100644 --- a/docs/source/reference/nondeterministic.rst +++ b/docs/source/reference/nondeterministic.rst @@ -4,7 +4,9 @@ Nondeterm brng ============== The generator with non-deterministic source of randomness, such as a hardware device, requires no seeding. -This basic random number generator should not be used if reproducibility of stochastic simulation is required. + +.. note:: + This basic random number generator should not be used if reproducibility of stochastic simulation is required. .. code-block:: python :caption: Construction for non-deterministic basic random number generator diff --git a/docs/source/reference/philox4x32x10.rst b/docs/source/reference/philox4x32x10.rst index 05a0d33..c538c40 100644 --- a/docs/source/reference/philox4x32x10.rst +++ b/docs/source/reference/philox4x32x10.rst @@ -3,11 +3,11 @@ Philox4x32x10 brng ================== -The Philox 4x32x10 counter-based pseudorandom number generator can be +The Philox 4x32x10 counter-based pseudo-random number generator can be initialized with either an integral seed, a list of integral seeds, or automatically. .. code-block:: python - :caption: Construction for Philox4x32x10 basic random number generator with scalar seed + :caption: Construction for Philox4x32x10 basic pseudo-random number generator with scalar seed import mkl_random rs = mkl_random.RandomState(1234, brng="philox4x32x10") @@ -17,7 +17,7 @@ initialized with either an integral seed, a list of integral seeds, or automati esample = rs.uniform(0, 1, size=1000) .. code-block:: python - :caption: Construction for Philox4x32x10 basic random number generator with vector seed + :caption: Construction for Philox4x32x10 basic pseudo-random number generator with vector seed import mkl_random rs_vec = mkl_random.RandomState([1234, 567, 89, 0], brng="philox4x32x10") @@ -29,7 +29,7 @@ initialized with either an integral seed, a list of integral seeds, or automati When seed is not specified, the generator is initialized using system clock, e.g.: .. code-block:: python - :caption: Construction for Philox4x32x10 basic random number generator automatic seed + :caption: Construction for Philox4x32x10 basic pseudo random number generator with automatic seed import mkl_random rs_def = mkl_random.RandomState(brng="philox4x32x10") diff --git a/docs/source/reference/r250.rst b/docs/source/reference/r250.rst index 75b1acd..b5e8e44 100644 --- a/docs/source/reference/r250.rst +++ b/docs/source/reference/r250.rst @@ -3,11 +3,11 @@ R250 brng ========= -The 32-bit generalized feedback shift register pseudorandom number generator GFSR(250,103) can be +The 32-bit generalized feedback shift register pseudo-random number generator GFSR(250,103) can be initialized with either an integral seed, a list of integral seeds, or automatically. .. code-block:: python - :caption: Construction for R250 basic random number generator with scalar seed + :caption: Construction for R250 basic pseudo-random number generator with scalar seed import mkl_random rs = mkl_random.RandomState(1234, brng="R250") @@ -17,7 +17,7 @@ initialized with either an integral seed, a list of integral seeds, or automati esample = rs.uniform(0, 1, size=1000) .. code-block:: python - :caption: Construction for R250 basic random number generator with vector seed + :caption: Construction for R250 basic pseudo-random number generator with vector seed import mkl_random rs_vec = mkl_random.RandomState([1234, 567, 89, 0], brng="R250") @@ -29,7 +29,7 @@ initialized with either an integral seed, a list of integral seeds, or automati When seed is not specified, the generator is initialized using system clock, e.g.: .. code-block:: python - :caption: Construction for R250 basic random number generator automatic seed + :caption: Construction for R250 basic pseudo-random number generator with automatic seed import mkl_random rs_def = mkl_random.RandomState(brng="R250") diff --git a/docs/source/reference/sfmt19937.rst b/docs/source/reference/sfmt19937.rst index f9e84d9..125792a 100644 --- a/docs/source/reference/sfmt19937.rst +++ b/docs/source/reference/sfmt19937.rst @@ -3,11 +3,11 @@ SFMT19937 brng ============== -The SIMD-oriented Mersenne Twister random number generator can be initialized with +The SIMD-oriented Mersenne Twister pseudo-random number generator can be initialized with either an integral seed, a list of integral seeds, or automatically. .. code-block:: python - :caption: Construction for SFMT19937 basic random number generator with scalar seed + :caption: Construction for SFMT19937 basic pseudo-random number generator with scalar seed import mkl_random rs = mkl_random.RandomState(1234, brng="SFMT19937") @@ -17,7 +17,7 @@ either an integral seed, a list of integral seeds, or automatically. esample = rs.exponential(2.3, size=1000) .. code-block:: python - :caption: Construction for SFMT19937 basic random number generator with vector seed + :caption: Construction for SFMT19937 basic pseudo-random number generator with vector seed import mkl_random rs_vec = mkl_random.RandomState([1234, 567, 89, 0], brng="SFMT19937") @@ -29,7 +29,7 @@ either an integral seed, a list of integral seeds, or automatically. When seed is not specified, the generator is initialized using system clock, e.g.: .. code-block:: python - :caption: Construction for SFMT19937 basic random number generator automatic seed + :caption: Construction for SFMT19937 basic pseudo-random number generator with automatic seed import mkl_random rs_def = mkl_random.RandomState(brng="SFMT19937") diff --git a/docs/source/reference/wichmann_hill.rst b/docs/source/reference/wichmann_hill.rst index a463945..4aeb1fe 100644 --- a/docs/source/reference/wichmann_hill.rst +++ b/docs/source/reference/wichmann_hill.rst @@ -11,7 +11,7 @@ An individual member of the set can be addressed by using a tuple to specify the :code:`brng=("WH", set_id)` where :math:`0 \leq \text{set_id} < 273`. .. code-block:: python - :caption: Construction for WH basic random number generator with scalar seed + :caption: Construction for WH basic psuedo-random number generator with scalar seed import mkl_random seed = 777 @@ -27,7 +27,7 @@ An individual member of the set can be addressed by using a tuple to specify the sample = rs5.uniform(0, 1, size=1_000_000) .. code-block:: python - :caption: Construction for WH basic random number generator with vector seed + :caption: Construction for WH basic pseudo-random number generator with vector seed import mkl_random rs = mkl_random.RandomState([1234, 567, 89, 0], brng=("WH", 200)) @@ -39,7 +39,7 @@ An individual member of the set can be addressed by using a tuple to specify the When seed is not specified, the generator is initialized using system clock, e.g.: .. code-block:: python - :caption: Construction for WH basic random number generator automatic seed + :caption: Construction for WH basic pseudo-random number generator with automatic seed import mkl_random rs_def = mkl_random.RandomState(brng="WH")