Skip to content

Commit

Permalink
Mention statistical independence of members of set of generators
Browse files Browse the repository at this point in the history
Also refer to examples/ folder for example of Parallel Monte-Carlo
simulation.
  • Loading branch information
oleksandr-pavlyk committed Feb 21, 2024
1 parent b7c5b5b commit d4e9d98
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
13 changes: 10 additions & 3 deletions docs/source/reference/mt2203.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
MT2203 brng
===========

Each generator from the set of 6024 Mersenne Twister pseudorandom number generators can be
initialized with either an integral seed, a list of integral seeds, or automatically.
Each generator from the set of `6024 Mersenne Twister pseudorandom number generators <philoxrng_>`_ can be
initialized with either an integral seed, a list of integral seeds, or automatically.

An individual member of the set can be addressed by using a tuple to specify the generator
:code:`brng=("MT2203", set_id)` where :math:`0 \leq \text{set_id} \le 6024`.
: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
Expand Down Expand Up @@ -44,3 +44,10 @@ When seed is not specified, the generator is initialized using system clock, e.g
# Use random state instance to generate 1000 random numbers
# from discrete uniform distribution [1, 6]
isample = rs_def.randint(1, 6 + 1, size=1000)
Different members of the set of generators initialized with the same seed are designed to generate
statistically independent streams of randomness. This property makes MT2203 generator suitable for
parallelizing stochastic algorithms. Please refer to "examples/" folder in the `GitHub repo
<https://github.com/IntelPython/mkl_random>`_.
.. _philoxrng: https://spec.oneapi.io/versions/1.0-rev-2/elements/oneMKL/source/domains/rng/mkl-rng-philox4x32x10.html
11 changes: 9 additions & 2 deletions docs/source/reference/wichmann_hill.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ Wichmann-Hill brng
==================

Each generator from the set of 273 Wichmann-Hill’s combined multiplicative congruential
generators can be initialized with either an integral seed, a list of integral seeds,
`generators <whrng_>`_ can be initialized with either an integral seed, a list of integral seeds,
or automatically.

An individual member of the set can be addressed by using a tuple to specify the generator as
:code:`brng=("WH", set_id)` where :math:`0 \leq \text{set_id} \le 273`.
: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
Expand Down Expand Up @@ -45,3 +45,10 @@ When seed is not specified, the generator is initialized using system clock, e.g
# Use random state instance to generate 1000 random numbers
# from discrete uniform distribution [1, 6]
isample = rs_def.randint(1, 6 + 1, size=1000)
Different members of the set of generators initialized with the same seed are designed to generate
statistically independent streams of randomness. This property makes MT2203 generator suitable for
parallelizing stochastic algorithms. Please refer to "examples/" folder in the `GitHub repo
<https://github.com/IntelPython/mkl_random>`_.
.. _whrng: https://spec.oneapi.io/versions/1.0-rev-2/elements/oneMKL/source/domains/rng/mkl-rng-wichmann_hill.html

0 comments on commit d4e9d98

Please sign in to comment.