QuantLib_MersenneTwisterUniformRng man page

MersenneTwisterUniformRng — Uniform random number generator.  


#include <ql/math/randomnumbers/mt19937uniformrng.hpp>

Public Types

typedef Sample< Real > sample_type

Public Member Functions

MersenneTwisterUniformRng (unsigned long seed=0)
MersenneTwisterUniformRng (const std::vector< unsigned long > &seeds)
sample_type next () const
Real nextReal () const
return a random number in the (0.0, 1.0)-interval
unsigned long nextInt32 () const
return a random integer in the [0,0xffffffff]-interval

Detailed Description

Uniform random number generator.

Mersenne Twister random number generator of period 2**19937-1

For more details see http://www.math.keio.ac.jp/matumoto/emt.html


the correctness of the returned values is tested by checking them against known good results.

Constructor & Destructor Documentation

MersenneTwisterUniformRng (unsigned long seed = 0) [explicit]

if the given seed is 0, a random seed will be chosen based on clock()

Member Function Documentation

sample_type next () const

returns a sample with weight 1.0 containing a random number in the (0.0, 1.0) interval


Generated automatically by Doxygen for QuantLib from the source code.

Referenced By

The man pages MersenneTwisterUniformRng(3) and nextInt32(3) are aliases of QuantLib_MersenneTwisterUniformRng(3).

Mon Apr 30 2018 Version 1.12.1 QuantLib