| |
- pybind11_builtins.pybind11_object(builtins.object)
-
- CRandomGenerator
- Generator_MT19937
class CRandomGenerator(pybind11_builtins.pybind11_object) |
|
A thred-safe pseudo random number generator, based on an internal MT19937
randomness generator.
The base algorithm for randomness is platform-independent. See
http://en.wikipedia.org/wiki/Mersenne_twister
For real thread-safety, each thread must create and use its own instance of
this class.
Single-thread programs can use the static object
mrpt::random::randomGenerator |
|
- Method resolution order:
- CRandomGenerator
- pybind11_builtins.pybind11_object
- builtins.object
Methods defined here:
- __init__(...)
- __init__(*args, **kwargs)
Overloaded function.
1. __init__(self: mrpt.pymrpt.mrpt.random.CRandomGenerator) -> None
2. __init__(self: mrpt.pymrpt.mrpt.random.CRandomGenerator, seed: int) -> None
- drawGaussian1D(...)
- drawGaussian1D(self: mrpt.pymrpt.mrpt.random.CRandomGenerator, mean: float, std: float) -> float
C++: mrpt::random::CRandomGenerator::drawGaussian1D(const double, const double) --> double
- drawGaussian1D_normalized(...)
- drawGaussian1D_normalized(self: mrpt.pymrpt.mrpt.random.CRandomGenerator) -> float
Generate a normalized (mean=0, std=1) normally distributed sample.
If desired, pass a pointer to a double which will
receive the likelihood of the given sample to have been obtained, that
is, the value of the normal pdf at the sample value.
C++: mrpt::random::CRandomGenerator::drawGaussian1D_normalized() --> double
- drawUniform(...)
- drawUniform(self: mrpt.pymrpt.mrpt.random.CRandomGenerator, Min: float, Max: float) -> float
C++: mrpt::random::CRandomGenerator::drawUniform(const double, const double) --> double
- drawUniform32bit(...)
- drawUniform32bit(self: mrpt.pymrpt.mrpt.random.CRandomGenerator) -> int
Generate a uniformly distributed pseudo-random number using the MT19937
algorithm, in the whole range of 32-bit integers.
See: http://en.wikipedia.org/wiki/Mersenne_twister
C++: mrpt::random::CRandomGenerator::drawUniform32bit() --> uint32_t
- drawUniform64bit(...)
- drawUniform64bit(self: mrpt.pymrpt.mrpt.random.CRandomGenerator) -> int
Returns a uniformly distributed pseudo-random number by joining two
32bit numbers from
C++: mrpt::random::CRandomGenerator::drawUniform64bit() --> uint64_t
- randomize(...)
- randomize(*args, **kwargs)
Overloaded function.
1. randomize(self: mrpt.pymrpt.mrpt.random.CRandomGenerator, seed: int) -> None
Initialize the PRNG from the given random seed
C++: mrpt::random::CRandomGenerator::randomize(const unsigned int) --> void
2. randomize(self: mrpt.pymrpt.mrpt.random.CRandomGenerator) -> None
Randomize the generators, based on std::random_device
C++: mrpt::random::CRandomGenerator::randomize() --> void
Static methods inherited from pybind11_builtins.pybind11_object:
- __new__(*args, **kwargs) from pybind11_builtins.pybind11_type
- Create and return a new object. See help(type) for accurate signature.
|
|