#include <CRandom.h>
List of all members.
Member Enumeration Documentation
Constructor & Destructor Documentation
CRandom::CRandom |
( |
| ) |
[protected] |
Default/Named constructor. Seeds the random number generator with the given seed.
CRandom::~CRandom |
( |
| ) |
[virtual] |
Member Function Documentation
CRandom * CRandom::createGenerator |
( |
CRandom::Type |
type = CRandom::mt19937 , |
|
|
unsigned C_INT32 |
seed = 0 |
|
) |
| [static] |
Create a Generator. Note: the returned object has to be released after use with delete
- Parameters:
-
CRandom::Type | type (default Mersenne Twister) |
const | C_INT32 & seed (default system generated seed) |
- Returns:
- CRandom * randomGenerator
const unsigned C_INT32 & CRandom::getModulus |
( |
| ) |
const |
Retreive the method dependend modulus
- Returns:
- const unsigned C_INT32 & modulus
C_FLOAT64 CRandom::getRandomCC |
( |
| ) |
[virtual] |
Produces a uniformly distributed random number in 0 <= x <= 1.
- Returns:
- C_FLOAT64 random
Reimplemented in Cmt19937HR, Cmt19937, and Cr250.
C_FLOAT64 CRandom::getRandomCO |
( |
| ) |
[virtual] |
Produces a uniformly distributed random number in 0 <= x < 1. Note: 0 < x <= 1 may be achieved by 1.0 - getRandomCO().
- Returns:
- C_FLOAT64 random
Reimplemented in Cmt19937HR, Cmt19937, and Cr250.
C_FLOAT64 CRandom::getRandomExp |
( |
| ) |
[virtual] |
C_FLOAT64 CRandom::getRandomNormal |
( |
const C_FLOAT64 & |
mean, |
|
|
const C_FLOAT64 & |
sd |
|
) |
| [virtual] |
Produces a Normally distributed random number with Mean=mean and SD=sd
- Parameters:
-
const | C_FLOAT64 & mean |
const | C_FLOAT64 & sd |
- Returns:
- C_FLOAT64 random
C_FLOAT64 CRandom::getRandomNormal01 |
( |
| ) |
[virtual] |
Produces a Normally distributed random number with mean=0 and SD=1
- Returns:
- C_FLOAT64 random
C_FLOAT64 CRandom::getRandomNormalLog |
( |
const C_FLOAT64 & |
mean, |
|
|
const C_FLOAT64 & |
sd |
|
) |
| [virtual] |
Produces a Normally distributed random number with Mean=mean and SD=sd in Logarithmic scale
- Returns:
- C_FLOAT64 random
C_FLOAT64 CRandom::getRandomNormalPositive |
( |
const C_FLOAT64 & |
mean, |
|
|
const C_FLOAT64 & |
sd |
|
) |
| [virtual] |
Produces a Strictly Positive Normally distributed random number with Mean=mean and SD=sd
- Parameters:
-
const | C_FLOAT64 & mean |
const | C_FLOAT64 & sd |
- Returns:
- C_FLOAT64 random
C_FLOAT64 CRandom::getRandomOO |
( |
| ) |
[virtual] |
Produces a uniformly distributed random number in 0 < x < 1.
- Returns:
- C_FLOAT64 random
Reimplemented in Cmt19937HR, Cmt19937, and Cr250.
C_FLOAT64 CRandom::getRandomPoisson |
( |
const C_FLOAT64 & |
mean | ) |
[virtual] |
Produces a Poisson distributed random number with Mean=mean
- Parameters:
-
- Returns:
- C_FLOAT64 random
C_INT32 CRandom::getRandomS |
( |
| ) |
[virtual] |
Get a random number in 0 <= n <= (Modulus & 0x7ffffff)
- Returns:
- C_INT32 random
Reimplemented in Cmt19937, and Cr250.
C_INT32 CRandom::getRandomS |
( |
const C_INT32 & |
max | ) |
[virtual] |
Get a random number in 0 <= n <= max Note: max must be smaller than Modulus (no check for performance)
- Parameters:
-
- Returns:
- C_INT32 random
unsigned C_INT32 CRandom::getRandomU |
( |
| ) |
[virtual] |
Get a random number in 0 <= n <= Modulus
- Returns:
- unsigned C_INT32 random
Reimplemented in Cmt19937, and Cr250.
unsigned C_INT32 CRandom::getRandomU |
( |
const unsigned C_INT32 & |
max | ) |
[virtual] |
Get a random number in 0 <= n <= max Note: max must be smaller than Modulus (no check for performance)
- Parameters:
-
const | unsigned C_INT32 & max |
- Returns:
- unsigned C_INT32 random
unsigned C_INT32 CRandom::getSystemSeed |
( |
| ) |
[static] |
get a system dependend seed (hopefully random)
Retreive the type of the generator
- Returns:
- const CRandom::Type & type
virtual void CRandom::initialize |
( |
unsigned C_INT32 |
seed = CRandom::getSystemSeed() | ) |
[virtual] |
Initialize or reinitialize the random number generator with the given seed.
- Parameters:
-
unsigned | C_INT32 seed (default system seed) |
Reimplemented in Cmt19937, and Cr250.
void CRandom::setModulus |
( |
const unsigned C_INT32 & |
modulus | ) |
[protected] |
Set the Modulus
- Parameters:
-
Member Data Documentation
A 64-bit floating point random number.
A singned 32-bit integer random number.
A unsigned 32-bit integer random number.
The type of the generator
Initial value:
{
"r250",
"Mersenne Twister",
"Mersenne Twister (HR)",
""
}
String literals for the GUI to display type names of random number generators known to COPASI.
Initial value:
{
"r250",
"MersenneTwister",
"MersenneTwisterHR",
NULL
}
XML type names of random number generators known to COPASI.
The documentation for this class was generated from the following files: