Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs tweaks #39

Merged
merged 2 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/source/how_to.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html>`_).

.. grid:: 2
:gutter: 3
Expand Down
8 changes: 4 additions & 4 deletions docs/source/reference/ars5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand Down
22 changes: 11 additions & 11 deletions docs/source/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <oneMKLBRNG_>`_):

* :code:`'MT19937'` - the Mersenne Twister pseudo-random number generator (default), :doc:`example <mt19937>`
* :code:`'SFMT19937'` - the SIMD-oriented Mersenne Twister pseudo-random number generator, :doc:`example <sfmt19937>`
* :code:`'MT2203'` - the set of 6024 Mersenne Twister pseudorandom number generators, :doc:`example <mt2203>`
* :code:`'R250'` - the 32-bit generalized feedback shift register pseudorandom number generator GFSR(250,103), :doc:`example <r250>`
* :code:`'WH'` - the set of 273 Wichmann-Hill’s combined multiplicative congruential generators, :doc:`example <wichmann_hill>`
* :code:`'MCG31'` - the 31-bit multiplicative congruential pseudorandom number generator, :doc:`example <mcg31>`
* :code:`'MCG59'` - the 59-bit multiplicative congruential pseudorandom number generator, :doc:`example <mcg59>`
* :code:`'MRG32K3A'` - the combined multiple recursive pseudorandom number generator MRG32k3a, :doc:`example <mrg32k3a>`
* :code:`'PHILOX4X32X10'` - the Philox4x32x10 counter-based pseudorandom number generator, :doc:`example <philox4x32x10>`
* :code:`'NONDETERM'` - the generator with non-deterministic source of randomness (for example, a hardware device), :doc:`example <nondeterministic>`
* :code:`'ARS5'` - the ARS5 counter-based pseudorandom number generator based on AES encryption algorithm, :doc:`example <ars5>`
* :ref:`'MT19937' <mt19937_brng>` - the Mersenne Twister pseudo-random number generator (default)
* :ref:`'SFMT19937' <sfmt19937_brng>` - the SIMD-oriented Mersenne Twister pseudo-random number generator
* :ref:`'MT2203' <mt2203_brng>` - the set of 6024 Mersenne Twister pseudo-random number generators
* :ref:`'R250' <r250_brng>` - the 32-bit generalized feedback shift register pseudo-random number generator GFSR(250,103)
* :ref:`'WH' <wh_brng>` - the set of 273 Wichmann-Hill’s combined multiplicative congruential pseudo-random number generators
* :ref:`'MCG31' <mcg31m1_brng>` - the 31-bit multiplicative congruential pseudo-random number generator
* :ref:`'MCG59' <mcg59_brng>` - the 59-bit multiplicative congruential pseudo-random number generator
* :ref:`'MRG32K3A' <mrg32k3a_brng>` - the combined multiple recursive pseudo-random number generator MRG32k3a
* :ref:`'PHILOX4X32X10' <philox4x32x10_brng>` - the Philox4x32x10 counter-based pseudo-random number generator
* :ref:`'NONDETERM' <nondeterm_brng>` - the generator with non-deterministic source of randomness (for example, a hardware device)
* :ref:`'ARS5' <ars5_brng>` - 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

Expand Down
8 changes: 4 additions & 4 deletions docs/source/reference/mcg31.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand Down
8 changes: 4 additions & 4 deletions docs/source/reference/mcg59.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand Down
8 changes: 4 additions & 4 deletions docs/source/reference/mrg32k3a.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand Down
8 changes: 4 additions & 4 deletions docs/source/reference/mt19937.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand Down
6 changes: 3 additions & 3 deletions docs/source/reference/mt2203.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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))
Expand All @@ -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")
Expand Down
4 changes: 3 additions & 1 deletion docs/source/reference/nondeterministic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions docs/source/reference/philox4x32x10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand Down
8 changes: 4 additions & 4 deletions docs/source/reference/r250.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand Down
8 changes: 4 additions & 4 deletions docs/source/reference/sfmt19937.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand Down
6 changes: 3 additions & 3 deletions docs/source/reference/wichmann_hill.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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))
Expand All @@ -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")
Expand Down
Loading