| |
libFAUDES
Sections
Index
|
Random Variables |
Functions | |
void | faudes::ran_plant_seeds (long x) |
Use this function to set the state of all the random number generator streams by "planting" a sequence of states (seeds), one per stream, with all states dictated by the state of the default stream. | |
void | faudes::ran_select_stream (int index) |
Use this function to set the current random number generator stream -- that stream from which the next random number will come. | |
void | faudes::ran_put_seed (long seed) |
Put a seed. | |
void | faudes::ran_init (long seed) |
Initialize random generator. | |
double | faudes::ran (void) |
Run random generator Random Number Generator (for more details see "Random Number Generators: Good Ones Are Hard To Find" Steve Park and Keith Miller Communications of the ACM, October 1988). | |
double | faudes::ran_uniform (double a, double b) |
Sample a random variable uniformly on interval [a;b) Distribution: f(t) dt= {1/(b-a)} dt for t, a <=t< b, else 0. | |
long | faudes::ran_uniform_int (long a, long b) |
Sample a discrete random variable uniformly on interval [a;b) Distribution: p(n) = 1/(b-a-1). | |
double | faudes::ran_exponential (double mu) |
Sample a random variable exponentially Distribution: f(t) dt = 1/mu exp(-t/mu) dt for t>=0. | |
double | faudes::ran_exponential (double mu, tpTime::Type tossLB, tpTime::Type tossUB) |
Sample a random variable exponentially on a restricted interval Distribution: f(t) dt = 1/mu exp(-t/mu) dt for t>=0. | |
double | faudes::ran_gauss (double mu, double sigma, tpTime::Type tossLB, tpTime::Type tossUB) |
Sample a random variable gaussian distributed on a restricted interval Distribution: f(t) = 1 / sqrt(2 pi sigma^2) * exp( -1/2 ((t-mu)/sigma)^2) for t>=0. | |
double | faudes::ran_gaussian_cdf_P (double x) |
Help function: calculate gaussian CDF using an approximation from Abromowitz and Stegun: Handbook of Mathematical Functions. |
double faudes::ran | ( | void | ) |
Run random generator Random Number Generator (for more details see "Random Number Generators: Good Ones Are Hard To Find" Steve Park and Keith Miller Communications of the ACM, October 1988).
double faudes::ran_exponential | ( | double | mu, | |
tpTime::Type | tossLB, | |||
tpTime::Type | tossUB | |||
) |
Sample a random variable exponentially on a restricted interval Distribution: f(t) dt = 1/mu exp(-t/mu) dt for t>=0.
mu | mu | |
tossLB | Lower interval bound | |
tossUB | Upper interval bound |
double faudes::ran_exponential | ( | double | mu | ) |
Sample a random variable exponentially Distribution: f(t) dt = 1/mu exp(-t/mu) dt for t>=0.
mu | mu |
double faudes::ran_gauss | ( | double | mu, | |
double | sigma, | |||
tpTime::Type | tossLB, | |||
tpTime::Type | tossUB | |||
) |
Sample a random variable gaussian distributed on a restricted interval Distribution: f(t) = 1 / sqrt(2 pi sigma^2) * exp( -1/2 ((t-mu)/sigma)^2) for t>=0.
mu | mu | |
sigma | sigma | |
tossLB | Lower interval bound | |
tossUB | Upper interval bound |
double faudes::ran_gaussian_cdf_P | ( | double | x | ) |
Help function: calculate gaussian CDF using an approximation from Abromowitz and Stegun: Handbook of Mathematical Functions.
x |
void faudes::ran_init | ( | long | seed | ) |
Initialize random generator.
seed | Random generator seed |
void faudes::ran_plant_seeds | ( | long | x | ) |
Use this function to set the state of all the random number generator streams by "planting" a sequence of states (seeds), one per stream, with all states dictated by the state of the default stream.
The sequence of planted states is separated one from the next by 8,367,782 calls to ran().
void faudes::ran_put_seed | ( | long | seed | ) |
Put a seed.
seed | Random generator seed |
void faudes::ran_select_stream | ( | int | index | ) |
Use this function to set the current random number generator stream -- that stream from which the next random number will come.
double faudes::ran_uniform | ( | double | a, | |
double | b | |||
) |
Sample a random variable uniformly on interval [a;b) Distribution: f(t) dt= {1/(b-a)} dt for t, a <=t< b, else 0.
a | Lower bound | |
b | Upper bound |
long faudes::ran_uniform_int | ( | long | a, | |
long | b | |||
) |
Sample a discrete random variable uniformly on interval [a;b) Distribution: p(n) = 1/(b-a-1).
a | Lower bound | |
b | Upper bound |
libFAUDES 2.13a c++ source docu by doxygen 1.5.6