COPASI API
4.40.278
|
#include <Cr250.h>
Private Member Functions | |
Cr250 (unsigned C_INT32 seed) | |
C_FLOAT64 | dr250 (void) |
unsigned C_INT16 | myrand () |
unsigned C_INT32 | r250 (void) |
unsigned C_INT32 | r250n (const unsigned C_INT16 &max) |
Private Attributes | |
unsigned C_INT16 | mBuffer [250] |
C_INT32 | mIndex |
unsigned C_INT32 | mSeed |
Friends | |
CRandom * | CRandom::createGenerator (CRandom::Type type, unsigned C_INT32 seed) |
Additional Inherited Members | |
Public Types inherited from CRandom | |
enum | Type { r250 = 0 , mt19937 , mt19937HR , unkown } |
Static Public Member Functions inherited from CRandom | |
static CRandom * | createGenerator (CRandom::Type type=CRandom::mt19937, unsigned C_INT32 seed=0) |
static unsigned C_INT32 | getSystemSeed () |
Static Public Attributes inherited from CRandom | |
static const std::string | TypeName [] |
static const char * | XMLType [] |
Protected Member Functions inherited from CRandom | |
CRandom () | |
void | setModulus (const unsigned C_INT32 &modulus) |
Protected Attributes inherited from CRandom | |
C_FLOAT64 | mFloat |
unsigned C_INT32 | mModulus |
C_FLOAT64 | mModulusInv |
C_FLOAT64 | mModulusInv1 |
C_INT32 | mNumberS |
unsigned C_INT32 | mNumberU |
CRandom::Type | mType |
Cr250 class implementing the R250 random number generator, by W. L. Maier
Created for Copasi by Stefan Hoops (C) Stefan Hoops 2002
|
private |
Default/Named constructor. Seeds the random number generator with the given seed.
C_INT32 | seed |
References initialize(), and CRandom::setModulus().
Cr250::~Cr250 | ( | ) |
The destructor.
|
private |
Number returned by dr250() is in range [0,1)
References CRandom::mNumberU, and r250().
Referenced by getRandomCO().
|
virtual |
Produces a uniformly distributed random number in 0 <= x <= 1.
Reimplemented from CRandom.
References CRandom::mModulusInv, and r250().
|
virtual |
Produces a uniformly distributed random number in 0 <= x < 1. Note: 0 < x <= 1 may be achieved by 1.0 - getRandomCO().
Reimplemented from CRandom.
References dr250().
|
virtual |
Produces a uniformly distributed random number in 0 < x < 1.
Reimplemented from CRandom.
References CRandom::mModulusInv1, and r250().
|
virtual |
|
virtual |
|
virtual |
Initialize or reinitialize the random number generator with the given seed. Note: seed = 12345 gives the default initilization as in W. L. Maier code
unsigned | C_INT32 seed (default system seed) |
Reimplemented from CRandom.
References mBuffer, mIndex, mSeed, and myrand().
Referenced by Cr250().
|
private |
Linear congruent pseudorandom number generator for initialization. Return a pseudorandom number in the interval 0 <= n <= 32767.
References mSeed.
Referenced by initialize().
|
private |
Number returned by r250() is in the interval 0 <= k <= 65535.
References C_INT16, mBuffer, mIndex, and CRandom::mNumberU.
Referenced by dr250(), getRandomCC(), getRandomOO(), getRandomS(), getRandomU(), and r250n().
Number returned by r250() is in the interval 0 <= k < max.
unsigned | C_INT16 max |
References C_INT16, max, CRandom::mNumberU, and r250().
|
friend |
|
private |
Referenced by initialize(), and r250().
|
private |
Referenced by initialize(), and r250().
|
private |
Referenced by initialize(), and myrand().