14.8.3. steps.API_1.rng

Namespace for random number generator classes.

../_images/steps.rng.jpg

Class diagram for steps.API_1.rng namespace.

create(rng_name, bufsize)

_py_rng_create(str rng_name, uint bufsize)

Creates and returns a reference to a steps.rng.RNG random number generator object, which is specified by type and pre-allocates a buffer list with size of buffer_size.

Syntax:

create(type, buffer_size)

Arguments: string type int buffer_size

Return: steps.rng.RNG

create_mt19937(bufsize)

_py_rng_create_mt19937(uint bufsize)

Creates and returns a reference to a steps.rng.RNG random number generator object, which is specified by type and pre-allocates a buffer list with size of buffer_size.

Syntax:

create_mt19937(buffer_size)

Arguments: int buffer_size

Return: steps.rng.RNG

class RNG[source]

Base class for all random number generators in STEPS.

Initialize self. See help(type(self)) for accurate signature.

initialize(seed)

Initialize the random number generator with given seed value.

Syntax:

initialize(seed)

Arguments: int seed

Return: None