Copyright © 2012-2016 Kenji Rikitake, Mutsuo Saito, Makoto Matsumoto, Kyoto University, Hiroshima University, The University of Tokyo
Authors: Kenji Rikitake (kenji.rikitake@acm.org), Mutsuo Saito, Makoto Matsumoto.
abstract datatype: intstate32()
Internal state data type for TinyMT.
Internally represented as the record #intstate32{}
,
including the 127bit seed and 96bit polynomial data.
abstract datatype: uint32()
32bit unsigned integer type.
init/2 | Initialize default polynomial for TinyMT and returns the internal state. |
init_by_list32/2 | Generate a TinyMT internal state from a list of 32-bit integers. |
next_state/1 | Advance TinyMT state for one step. |
seed/0 | Set the default seed value to TinyMT state in the process directory (Compatible with random:seed/1). |
seed/1 | Set the seed value to TinyMT state in the process directory. |
seed/3 | Set the seed value to TinyMT state in the process directory with the given three unsigned 32-bit integer arguments (Compatible with random:seed/3). |
seed0/0 | Set the default seed value to TinyMT state in the process directory (Compatible with random:seed0/0). |
setgenparams/1 | Set the generation parameter values to TinyMT polynomials in the process directory, with the given three-element tuple of unsigned 32-bit integers. |
setgenparams/3 | Set the generation parameter values to TinyMT polynomials in the process directory, with the given three unsigned 32-bit integer arguments. |
temper/1 | Generate 32bit unsigned integer from the TinyMT internal state. |
temper_float/1 | Generate 32bit-resolution float from the TinyMT internal state. |
uniform/0 | Generate 32bit-resolution float from the TinyMT internal state in the process dictionary. |
uniform/1 | Generate given range of integers from the given TinyMT internal state in the process dictionary. |
uniform_s/1 | Generate 32bit-resolution float from the given TinyMT internal state. |
uniform_s/2 | Generate given range of integers from the given TinyMT internal state. |
init(R::intstate32(), S::uint32()) -> intstate32()
Initialize default polynomial for TinyMT and returns the internal state.
init_by_list32(R::intstate32(), K::[uint32()]) -> intstate32()
Generate a TinyMT internal state from a list of 32-bit integers.
next_state(Intstate32::intstate32()) -> intstate32()
Advance TinyMT state for one step. Note: running temper function is required to obtain the actual random number.
seed() -> intstate32()
Set the default seed value to TinyMT state in the process directory (Compatible with random:seed/1).
seed(X1::{integer(), integer(), integer()}) -> undefined | intstate32()
Set the seed value to TinyMT state in the process directory. with the given three-element tuple of unsigned 32-bit integers (Compatible with random:seed/1).
seed(A1::integer(), A2::integer(), A3::integer()) -> undefined | intstate32()
Set the seed value to TinyMT state in the process directory with the given three unsigned 32-bit integer arguments (Compatible with random:seed/3).
seed0() -> intstate32()
Set the default seed value to TinyMT state in the process directory (Compatible with random:seed0/0).
setgenparams(X1::{integer(), integer(), integer()}) -> undefined | intstate32()
Set the generation parameter values to TinyMT polynomials in the process directory, with the given three-element tuple of unsigned 32-bit integers. Note well that the parameter values must be guaranteed by the TinyMT Dynamic Creator. This function will not validate the parameters. If seed is not set in the process dictionary, this function will call seed0/0 first, then set the generation parameter values.
setgenparams(MAT1::integer(), MAT2::integer(), TMAT::integer()) -> undefined | intstate32()
Set the generation parameter values to TinyMT polynomials in the process directory, with the given three unsigned 32-bit integer arguments. Note well that the parameter values must be guaranteed by the TinyMT Dynamic Creator. This function will not validate the parameters. If seed is not set in the process dictionary, this function will call seed0/0 first, then set the generation parameter values.
temper(Intstate32::intstate32()) -> uint32()
Generate 32bit unsigned integer from the TinyMT internal state.
temper_float(R::intstate32()) -> float()
Generate 32bit-resolution float from the TinyMT internal state. (Note: 0.0 < result < 1.0)
uniform() -> float()
Generate 32bit-resolution float from the TinyMT internal state in the process dictionary. (Note: 0.0 < result < 1.0) (Compatible with random:uniform/0)
uniform(N::pos_integer()) -> pos_integer()
Generate given range of integers from the given TinyMT internal state in the process dictionary. (Note: 1 =< result =< N (given positive integer)) (Compatible with random:uniform/1, though the algorithm is different; see uniform_s/2 for the details)
uniform_s(R0::intstate32()) -> {float(), intstate32()}
Generate 32bit-resolution float from the given TinyMT internal state. (Note: 0.0 < result < 1.0) (Compatible with random:uniform_s/1)
uniform_s(Max::pos_integer(), R::intstate32()) -> {pos_integer(), intstate32()}
Generate given range of integers from the given TinyMT internal state. (Note: 1 =< result =< MAX (given positive integer)) (Compatible with random:uniform_s/2, though the algorithm is different; retry if the temper/1 does not give a result which guarantee the equally-probabilistic results between the given range of integers)
Generated by EDoc