![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
High-quality pseudo-random number generator based on xoshiro256**. More...
#include <MathUtils_Random.hxx>
Public Member Functions | |
| RandomGenerator (const uint64_t theSeed=1) | |
| Initialize with a seed value. Uses SplitMix64 to expand a single seed into the full 256-bit state, ensuring good initialization even from poor seeds. | |
| void | SetSeed (const uint64_t theSeed) |
| Re-seed the generator. | |
| uint64_t | NextInt () |
| Generate next 64-bit unsigned integer. | |
| double | NextReal () |
| Generate next double in [0, 1). Uses 53 bits of randomness for full double precision. | |
High-quality pseudo-random number generator based on xoshiro256**.
xoshiro256** is a general-purpose PRNG designed by David Blackman and Sebastiano Vigna. It has:
Suitable for Monte Carlo methods, stochastic optimization, and any application requiring high-quality randomness.
|
inlineexplicit |
Initialize with a seed value. Uses SplitMix64 to expand a single seed into the full 256-bit state, ensuring good initialization even from poor seeds.
| theSeed | seed value (default 1) |
|
inline |
Generate next 64-bit unsigned integer.
|
inline |
Generate next double in [0, 1). Uses 53 bits of randomness for full double precision.
Re-seed the generator.
| theSeed | seed value |