Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

rd::Gauss Class Reference

Gaussian random number distribution. More...

#include <Random.h>

List of all members.

Public Methods

std::string getName () const
 Get the name of this distribution.

 Gauss (double mean=0.0, double sigma=0.0)
 Construct a new distribution.

void setDistribution (double mean, double sigma)
 Set the mean value and standard deviation of the distribution.

double getMean () const
 Get the mean value of the distribution.

double getSigma () const
 Get the standard deviation of the distribution.

double sample ()
 Sample the distribution.

void setSeed (unsigned long int seed)
 Reseed the underlying random number generator.

void getState (State &) const
 Save the current state of the distribution.

void setState (State const &)
 Restore the underlying generator to a specific state saved with getState().


Detailed Description

Gaussian random number distribution.


Constructor & Destructor Documentation

rd::Gauss::Gauss double    mean = 0.0,
double    sigma = 0.0
[inline]
 

Construct a new distribution.

Parameters:
mean  the mean value of the distribution (default=0)
sigma  the standard deviation of the distribution (default=0)


Member Function Documentation

double rd::Gauss::getMean   const [inline]
 

Get the mean value of the distribution.

std::string rd::Gauss::getName   const [inline]
 

Get the name of this distribution.

double rd::Gauss::getSigma   const [inline]
 

Get the standard deviation of the distribution.

void rd::Gauss::getState State   const
 

Save the current state of the distribution.

The state can be restored at any time with setState(). Both the state of the underlying random number generator and the distribution parameters (mean, sigma) are saved.

double rd::Gauss::sample  
 

Sample the distribution.

void rd::Gauss::setDistribution double    mean,
double    sigma
[inline]
 

Set the mean value and standard deviation of the distribution.

Parameters:
mean  the mean value of the distribution
sigma  the standard deviation of the distribution

void rd::Gauss::setSeed unsigned long int    seed [inline]
 

Reseed the underlying random number generator.

Parameters:
seed  the new seed.

void rd::Gauss::setState State const &   
 

Restore the underlying generator to a specific state saved with getState().

The subsequent samples of the distribution will be identical to the sequence following the corresponding getState() call.


The documentation for this class was generated from the following files:
SimData version pre-0.4.0. For more information on SimData, visit the SimData Homepage.

Generated on Tue Oct 14 12:06:43 2003, using Doxygen 1.2.18.

[SF.net]