Boost.Random provides quite a few thread-safe random generators, and they work with C++98.
How to use MT (or similar) RNG algorithm in CPP implementation?
-
17-07-2023 - |
Question
I want to implement MT alg in CPP (I just can't use C++11 sadly) I've found a lot of algorithms like SFMT, dSFMT, some versions of Tiny MT etc; but as I saw the documentation of those algs, I think they works for range like <0,2) (from doxygen documentation)
Need any ideas how to replace basic RNG algorithm
SRAND(TIME(NULL))
With something better
Solution
OTHER TIPS
If you dont want Boost dependency there are multiple standalone MT implementations
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow