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

TRNG::LCG32 Class Reference

Linear congruential generator. More...

#include <trng.h>

Inheritance diagram for TRNG::LCG32:

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

Public Methods

 LCG32 (LCG32_param param=LCG32_param_sets::VAX, long seed_=0l)
 constructor. More...


Detailed Description

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

is the actual pseudo random number. To get a full period of and have to be choosen that and is odd. If the maximal period is . A generator with has a full period if .

Author:
Heiko Bauke

Definition at line 1227 of file trng.h.


Constructor & Destructor Documentation

TRNG::LCG32::LCG32 LCG32_param    param = LCG32_param_sets::VAX,
long    seed_ = 0l
 

The constructor's default values implement a pseudo random number generator used on VAX. This generator has a period of . This generator is just a toy. Its period is too short. See also LCG32_param_sets.

Parameters:
param  parameter set
seed_  default seed


The documentation for this class was generated from the following file:
Generated on Mon Apr 21 16:27:52 2003 for Tina's Random Number Generators by doxygen1.2.15