How can I just get a simple uniform random generator?

How can I just get a simple uniform random generator?

I don't know many about the random generator, and I just want to get a uniform random generator within 0 to 1, just like the button 'Rnd' on some calculators. I haven't tested some subroutines provided by MKL, but unfortunately, it didn't work yet, mostly caused by the fact that I didn't know what's seed or stream. Could andbody help me? Just telling me the name of the subroutine and usage will be apprciated enough.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

The MKL random number generators create vectors of random numbers. The idea behind them is that creating 1000 random numbers can be done more efficiently than creating 1 random number at a time 1000 times.

There are a number of uniform random number generators with different characteristics in various data formats - bit, integer, single and double precision.

The seed is simply a starting point. If you use the same seed you will get the same sequence of numbers.

A stream is in fact a descriptor which can be used numerous times. Once a stream has been created you can create a vector of random numbers. There is a quite clear description how to do this in the VSLNotes. Essentially the process is to create a stream and then call the random number generator.

Bruce

Login to leave a comment.