Mersenne Twister pseudorandom number generator under Ubuntu
Hello all!
I need to generate Mersenne Twister pseudorandom number generator and I can't understand how to use /dev/random or /dev/urandom.I guess that is much better than srand(time(NULL)) Thanx! |
I think you're correct /dev/random much better than srand.
---------- Post added 07-02-15 at 12:42 PM ---------- Just look here, I guess that it's what you're looking for. |
|
What are you going to be using it for ? As it is pseudorandom non-cryptographic, you can just use the system time.
|
2metaschima
I'm not sure that seed generated by this way can be use for generation any random distribution function...Besides, I guess that use native linux feature it's more right approach.
|
The output data is definitely going to be randomly distributed, as long as the seed is not the same every time. Using the time or /dev/urandom means that the seed won't be the same every time you run it.
|
All times are GMT -5. The time now is 02:51 AM. |