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

UniformRandom Class Reference

#include <RandomNumbers.h>

List of all members.

Public Methods

 UniformRandom (int seed=TimeSeed())
void reseed (int seed)
float rand ()
int rand (int lower, int upper)

Private Attributes

long ix1
long ix2
long ix3
float r [98]

Static Private Attributes

const int M1 = 259200
const int IA1 = 7141
const int IC1 = 54773
const float RM1 = (1.0/M1)
const int M2 = 134456
const int IA2 = 8121
const int IC2 = 28411
const float RM2 = (1.0/M2)
const int M3 = 243000
const int IA3 = 4561
const int IC3 = 51349

Friends

ostream& operator< (ostream &ostr, const UniformRandom &unRand)
istream& operator> (istream &istr, UniformRandom &unRand)


Constructor & Destructor Documentation

UniformRandom::UniformRandom ( int seed = TimeSeed() ) [inline]
 

Definition at line 49 of file RandomNumbers.h.


Member Function Documentation

void UniformRandom::reseed ( int seed )
 

Referenced by UniformRandom(), and NormalRandom::reseed().

float UniformRandom::rand ( )
 

Referenced by WhiteheadExperiment::run().

int UniformRandom::rand ( int lower,
int upper )
 


Friends And Related Function Documentation

ostream & operator< ( ostream & ostr,
const UniformRandom & unRand ) [friend]
 

Definition at line 68 of file RandomNumbers.h.

istream & operator> ( istream & istr,
UniformRandom & unRand ) [friend]
 

Definition at line 75 of file RandomNumbers.h.


Member Data Documentation

const int UniformRandom::M1 = 259200 [static, private]
 

Definition at line 84 of file RandomNumbers.h.

const int UniformRandom::IA1 = 7141 [static, private]
 

Definition at line 85 of file RandomNumbers.h.

const int UniformRandom::IC1 = 54773 [static, private]
 

Definition at line 86 of file RandomNumbers.h.

const float UniformRandom::RM1 = (1.0/M1) [static, private]
 

Definition at line 87 of file RandomNumbers.h.

const int UniformRandom::M2 = 134456 [static, private]
 

Definition at line 88 of file RandomNumbers.h.

const int UniformRandom::IA2 = 8121 [static, private]
 

Definition at line 89 of file RandomNumbers.h.

const int UniformRandom::IC2 = 28411 [static, private]
 

Definition at line 90 of file RandomNumbers.h.

const float UniformRandom::RM2 = (1.0/M2) [static, private]
 

Definition at line 91 of file RandomNumbers.h.

const int UniformRandom::M3 = 243000 [static, private]
 

Definition at line 92 of file RandomNumbers.h.

const int UniformRandom::IA3 = 4561 [static, private]
 

Definition at line 93 of file RandomNumbers.h.

const int UniformRandom::IC3 = 51349 [static, private]
 

Definition at line 94 of file RandomNumbers.h.

long UniformRandom::ix1 [private]
 

Definition at line 96 of file RandomNumbers.h.

long UniformRandom::ix2 [private]
 

Definition at line 96 of file RandomNumbers.h.

long UniformRandom::ix3 [private]
 

Definition at line 96 of file RandomNumbers.h.

float UniformRandom::r[98] [private]
 

Definition at line 97 of file RandomNumbers.h.


The documentation for this class was generated from the following file:
Generated at Tue Jun 19 09:50:10 2001 for Magnus Classes by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001