PartMC 2.1.0
|
Modules | |
module | pmc_rand |
Random number generators. | |
Functions/Subroutines | |
subroutine | pmc_rand::pmc_srand (seed, offset) |
Initializes the random number generator to the state defined by the given seed plus offset. If the seed is 0 then a seed is auto-generated from the current time plus offset. | |
subroutine | pmc_rand::pmc_rand_finalize () |
Cleanup the random number generator. | |
real(kind=dp) | pmc_rand::pmc_random () |
Returns a random number between 0 and 1. | |
integer | pmc_rand::pmc_rand_int (n) |
Returns a random integer between 1 and n. | |
integer | pmc_rand::prob_round (val) |
Round val to floor(val) or ceiling(val) with probability proportional to the relative distance from val . That is, Prob(prob_round(val) == floor(val)) = ceil(val) - val. | |
integer | pmc_rand::rand_poisson (mean) |
Generate a Poisson-distributed random number with the given mean. | |
integer | pmc_rand::rand_binomial (n, p) |
Generate a Binomial-distributed random number with the given parameters. | |
real(kind=dp) | pmc_rand::rand_normal (mean, stddev) |
Generates a normally distributed random number with the given mean and standard deviation. | |
integer | pmc_rand::sample_cts_pdf (pdf) |
Sample the given continuous probability density function. | |
integer | pmc_rand::sample_disc_pdf (pdf) |
Sample the given discrete probability density function. | |
subroutine | pmc_rand::sample_vec_cts_to_disc (vec_cts, n_samp, vec_disc) |
Convert a real-valued vector into an integer-valued vector by sampling. | |
character | pmc_rand::rand_hex_char () |
Generate a random hexadecimal character. | |
subroutine | pmc_rand::uuid4_str (uuid) |
Generate a version 4 UUID as a string. | |
Variables | |
integer, parameter | pmc_rand::PMC_UUID_LEN = 36 |
Length of a UUID string. | |
integer, parameter | pmc_rand::PMC_RAND_GSL_SUCCESS = 0 |
Result code indicating successful completion. | |
integer, parameter | pmc_rand::PMC_RAND_GSL_INIT_FAIL = 1 |
Result code indicating initialization failure. | |
integer, parameter | pmc_rand::PMC_RAND_GSL_NOT_INIT = 2 |
Result code indicating the generator was not initialized when it should have been. | |
integer, parameter | pmc_rand::PMC_RAND_GSL_ALREADY_INIT = 3 |
Result code indicating the generator was already initialized when an initialization was attempted. |
The pmc_rand module.