Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members  

TRNG::ParkMiller Class Reference

linear congruential generator. More...

#include <trng.h>

Inheritance diagram for TRNG::ParkMiller:

TRNG::RNG< ParkMiller > List of all members.

Public Methods

 ParkMiller (long a_=16807l, long modulus_=2147483647l, long seed_=0l)
 constructor. More...


Detailed Description

This class implements a simple linear congruential pseudo random number generator with a prime modulus in the form

is the actual pseudo random number. The modulus has to be a prime smaller than and a generating element of the multiplicative group modulo to generate a maxmal length period.

Author:
Heiko Bauke

Definition at line 1065 of file trng.h.


Constructor & Destructor Documentation

TRNG::ParkMiller::ParkMiller long    a_ = 16807l,
long    modulus_ = 2147483647l,
long    seed_ = 0l
 

The constructor's default values implement a modified random number generator proposed by Park and Miller. This generator has a period of .

Parameters:
a_  multiplier
modulus_  prime modulus
seed_  default seed


The documentation for this class was generated from the following file:
Generated on Tue Dec 10 13:31:38 2002 for Tina's Random Number Generators by doxygen1.2.15