UniformRandomSimple Class Reference

Inheritance diagram for UniformRandomSimple:

RealRandom MTRand List of all members.

Detailed Description

Basic uniform random number generator.

This class generates real-valued random numbers uniformly distributed between [0.0, 1.0). This is a replacement for the random number function drand48() from stdlib.h.

Author:
Bill Smart
Date:
November 2001
Version:
1.0

Definition at line 235 of file Random.H.

Public Member Functions

 UniformRandomSimple (const unsigned long seed=1UL)
Generate samples
double number ()
 Generate a sample from the random variable.
Moments of the random variable
double mean () const
double variance () const
double stdDev () const


Constructor & Destructor Documentation

UniformRandomSimple ( const unsigned long  seed = 1UL  )  [inline]

Alocates an instance of the class and sets the random number seed.

Parameters:
seed Random number seed. Do not set this to zero.

Definition at line 240 of file Random.H.


Member Function Documentation

double number (  )  [inline, virtual]

Generate a sample from the random variable.

This function generates a sample from the random variable represented by the class instance.

Returns:
A sample from the random variable.

Implements RealRandom.

Definition at line 244 of file Random.H.

References MTRand::rand().

double mean (  )  const [inline, virtual]

Returns:
The mean of the random variable.

Implements RealRandom.

Definition at line 249 of file Random.H.

double variance (  )  const [inline, virtual]

Returns:
The variance of the random variable.

Implements RealRandom.

Definition at line 250 of file Random.H.

double stdDev (  )  const [inline, virtual]

Returns:
The standard deviation of the random variable.

Implements RealRandom.

Definition at line 251 of file Random.H.


The documentation for this class was generated from the following file:
Generated on Thu Feb 1 15:31:55 2007 for WURDE by  doxygen 1.5.1