In file mydocsrc/iml_rand.h:

class matsumoto_MT19937B : public unit_uniform_rv

This class encapsulates Makoto Matsumoto's MERSENNE TWISTER random number generator

Inheritance:

matsumoto_MT19937B < unit_uniform_rv


Public Methods

matsumoto_MT19937B (void)
The only constructor
virtual double sample (void)
Correctly overload the sample() function
virtual void seed (long Seed)
Provide the seed() function

Inherited from unit_uniform_rv:


Documentation

This class encapsulates Makoto Matsumoto's MERSENNE TWISTER random number generator. The user need not know anything about how it works. I found this on a neat web site that is all about random numbers.

Official Blurb:

Creating a generator with period 2**800 was not enough for Makoto Matsumoto. The Mersenne Twister, a new variant of TGFSR by Matsumoto and Nishimura, sets new standards for the period, quality and speed of random number generators. The incredible period is 2**19937 - 1, a number with about 6000 decimal digits; the 32-bit random numbers exhibit best possible equidistribution properties in dimensions up to 623; and it's fast, very fast. But even on a DEC Alpha Station, the period is so huge that producing all the numbers would require about 10**5983 millenia. The integer version and the floating point version are available in C. A paper on the Mersenne Twister is submitted to ACM TOMACS.

virtual double sample(void)
Correctly overload the sample() function. The function must return a value in the range 0 to 1.


This class has no child classes.

alphabetic index hierarchy of classes


generated by doc++