IBSimu  1.0.4
Public Member Functions | Protected Member Functions | Protected Attributes
Random Class Reference

Random number generator for N dimensions. More...

#include <qrandom.hpp>

Inheritance diagram for Random:
MTRandom QRandom

List of all members.

Public Member Functions

virtual ~Random ()
 Destructor.
virtual void get_gaussian (double *x)=0
 Get gaussian random numbers.
virtual void get_part_gaussian (bool *gaussian, double *x)=0
 Get uniform and gaussian random numbers.
virtual void get (double *x)=0
 Get uniform random numbers.

Protected Member Functions

 Random (int n)
 Constructor.
 Random (const Random &rng)
 Prevent copying.
double transform_gaussian (double R)
 Returns number from gaussian distribution, transformed from uniformly distributed R, where 0 <= R <= 1.

Protected Attributes

int _N
 Number of dimensions for RNG.

Detailed Description

Random number generator for N dimensions.

This RNG can produce random numbers in N independent dimensions. RNG includes functions to return uniformly distributed numbers between 0 and 1 and numbers from a gaussian distribution.


Constructor & Destructor Documentation

Random::Random ( int  n) [protected]

Constructor.

Random::Random ( const Random rng) [inline, protected]

Prevent copying.

virtual Random::~Random ( ) [virtual]

Destructor.


Member Function Documentation

virtual void Random::get ( double *  x) [pure virtual]

Get uniform random numbers.

Get next sampling from quasi random number generator to x. Array x must have space for N numbers.

Implemented in MTRandom, and QRandom.

virtual void Random::get_gaussian ( double *  x) [pure virtual]

Get gaussian random numbers.

Get next sampling from gaussian quasi random number generator to x with standard deviation of 1. Array x must have space for N numbers.

Implemented in MTRandom, and QRandom.

virtual void Random::get_part_gaussian ( bool *  gaussian,
double *  x 
) [pure virtual]

Get uniform and gaussian random numbers.

Get next sampling from quasi random number generator to x with dimensions marked (to true) in list gaussian mapped to gaussian distribution with standard deviation of 1. Rest of the dimensions are linear. Array x must have space for N numbers.

Implemented in MTRandom, and QRandom.

double Random::transform_gaussian ( double  R) [protected]

Returns number from gaussian distribution, transformed from uniformly distributed R, where 0 <= R <= 1.


Member Data Documentation

int Random::_N [protected]

Number of dimensions for RNG.


The documentation for this class was generated from the following file: