- QuantLib
- KnuthUniformRng
Uniform random number generator. More...
#include <ql/math/randomnumbers/knuthuniformrng.hpp>
Public Types | |
typedef Sample< Real > | sample_type |
Public Member Functions | |
KnuthUniformRng (long seed=0) | |
sample_type | next () const |
Uniform random number generator.
Random number generator by Knuth. For more details see Knuth, Seminumerical Algorithms, 3rd edition, Section 3.6.
KnuthUniformRng | ( | long | seed = 0 | ) | [explicit] |
if the given seed is 0, a random seed will be chosen based on clock()
KnuthUniformRng::sample_type next | ( | ) | const |
returns a sample with weight 1.0 containing a random number uniformly chosen from (0.0,1.0)