egttools.Random¶
- class Random¶
Bases:
pybind11_object
Random seed generator.
Methods
Generates a random seed.
Overloaded function.
This static methods changes the seed of
egttools.Random
.- __init__(*args, **kwargs)¶
- __new__(**kwargs)¶
- static generate() int ¶
Generates a random seed.
The generated seed can be used to seed other pseudo-random generators, so that the initial state of the simulation can always be tracked and the simulation can be reproduced. This is very important both for debugging purposes as well as for scientific research. However, this approach should NOT be used in any cryptographic applications, it is NOT safe.
- Returns
A random seed which can be used to seed new random generators.
- Return type
- static init(*args, **kwargs)¶
Overloaded function.
init() -> egttools.numerical.numerical.Random
This static method initializes the random seed.
This static method initializes the random seed generator from random_device and returns an instance of egttools.Random which is used to seed the random generators used across egttools.
- egttools.Random
An instance of the random seed generator.
init(seed: int) -> egttools.numerical.numerical.Random
This static method initializes the random seed generator from seed.
This static method initializes the random seed generator from seed and returns an instance of
egttools.Random
which is used to seed the random generators used acrossegttools
.- seedint
Integer value used to seed the random generator.
- egttools.Random
An instance of the random seed generator.
- static seed(seed: int) None ¶
This static methods changes the seed of
egttools.Random
.- Parameters
int – The new seed for the
egttools.Random
module which is used to seed every other pseudo-random generation in theegttools
package.