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

cps::UGrandomGenerator Class Reference

The random number generator for a single 2^4 hypercube in the lattice. More...

#include <random.h>

Inherits cps::UniformRandomGenerator, and cps::GaussianRandomGenerator.

List of all members.

Public Member Functions

 UGrandomGenerator ()
IFloat Grand (int noexit=0)
 Get a gaussian random number.
IFloat Urand ()
 Get a uniform random number.
IFloat Urand (Float high, Float low)
void SetInterval (IFloat high, IFloat low)
 Sets the interval over which the uniform distribution is defined.
void SetSigma (IFloat s2)
 Sets the variance of the distribution.
int RNGints () const
 Number of Integers in RNG, that should be stored to record status.
void StoreSeeds (unsigned int *to) const
 Stores the RNG state.


Detailed Description

The random number generator for a single 2^4 hypercube in the lattice.

For each 2^4 hypercube there is a uniform RNG and a gaussian RNG. They should be accessed through the LatRanGen class rather than directly.

Definition at line 225 of file random.h.


Constructor & Destructor Documentation

cps::UGrandomGenerator::UGrandomGenerator  )  [inline]
 

Definition at line 229 of file random.h.


Member Function Documentation

IFloat cps::UGrandomGenerator::Grand int  noexit = 0  )  [inline]
 

Get a gaussian random number.

Definition at line 234 of file random.h.

References cps::IFloat.

Referenced by cps::LatRanGen::Grand(), cps::SerialIO::load(), cps::ParallelIO::load(), cps::SerialIO::store(), and cps::ParallelIO::store().

int cps::UGrandomGenerator::RNGints  )  const [inline, virtual]
 

Number of Integers in RNG, that should be stored to record status.

Reimplemented from cps::GaussianRandomGenerator.

Definition at line 258 of file random.h.

Referenced by cps::LatRngRead::read(), and cps::LatRngWrite::write().

void cps::UGrandomGenerator::SetInterval IFloat  high,
IFloat  low
[inline]
 

Sets the interval over which the uniform distribution is defined.

The default range is (-0.5, 0.5).

Parameters:
high the upper bound of the distribution range
lower the lower bound of the distribution range

Reimplemented from cps::UniformRandomGenerator.

Definition at line 247 of file random.h.

void cps::UGrandomGenerator::SetSigma IFloat  s2  )  [inline]
 

Sets the variance of the distribution.

The default variance is 1.0 (and the mean is zero).

Parameters:
s2 the variance of the gaussian distribution.

Reimplemented from cps::GaussianRandomGenerator.

Definition at line 255 of file random.h.

void cps::UGrandomGenerator::StoreSeeds unsigned int *  to  )  const
 

Stores the RNG state.

Reimplemented from cps::RandomGenerator.

Definition at line 111 of file random.C.

Referenced by cps::LatRanGen::GetState(), and cps::LatRanGen::GetStates().

IFloat cps::UGrandomGenerator::Urand Float  high,
Float  low
[inline]
 

Definition at line 238 of file random.h.

References cps::IFloat.

IFloat cps::UGrandomGenerator::Urand  )  [inline]
 

Get a uniform random number.

Definition at line 237 of file random.h.

References cps::IFloat.

Referenced by cps::LatRanGen::Lrand(), and cps::LatRanGen::Urand().


The documentation for this class was generated from the following files:
Generated on Sat Oct 10 14:12:14 2009 for Columbia Physics System by  doxygen 1.3.9.1