ADMB Documentation
-a65f1c97
|
Functions | |
random_number_generator::random_number_generator (const int seed) | |
Constructor for random_number_generator class. More... | |
double | random_number_generator::better_rand () |
Random number generator. More... | |
void | dvector::fill_randpoisson (double lambda, const random_number_generator &rng) |
Fill vector with Poisson pseudorandom numbers. More... | |
double | randn (const random_number_generator &rng) |
Normal number generator. More... | |
double | randu (const random_number_generator &rng) |
Uniform random number generator. More... | |
void | random_number_generator::reinitialize (const int seed) |
Reinitialize random number seed. More... | |
random_number_generator::random_number_generator | ( | const int | seed | ) |
Constructor for random_number_generator class.
Based on the C-program for MT19937, originally coded by Takuji Nishimura and Makoto Matsumoto.
seed | Integer used to initialize the random number generator. Using different values of seed will generat different series of random numbers. |
double random_number_generator::better_rand | ( | ) |
Random number generator.
Based on the Mersenne twister alorithm, MT19937, originally coded by Takuji Nishimura and Makoto Matsumoto.
See Nishimura, T. and M. Matusomoto (1998) Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator. ACM Transactions on Modeling and Computer Simulation (TOMACS) 8(1):3-30.
Definition at line 134 of file rngen.cpp.
Referenced by bounded_multivariate_normal(), bounded_multivariate_uniform(), bounded_robust_multivariate_normal(), expdev(), gasdev(), function_minimizer::mcmc_routine(), new_probing_bounded_multivariate_normal(), new_probing_bounded_multivariate_normal_mcmc(), probing_bounded_multivariate_normal(), random_number_generator::random_number_generator(), random_number_generator::reinitialize(), function_minimizer::rwm_mcmc_routine(), and sgamma().
void dvector::fill_randpoisson | ( | double | lambda, |
const random_number_generator & | rng | ||
) |
Fill vector with Poisson pseudorandom numbers.
lambda | Expected value of Poission distribution. |
rng | Instance of class random_number_generator. |
Definition at line 85 of file dranpois.cpp.
double randn | ( | const random_number_generator & | rng | ) |
Normal number generator.
Definition at line 183 of file rngen.cpp.
Referenced by dvar_matrix::colfill_randn(), dmatrix::colfill_randn(), dvar_matrix::colfill_randn_ni(), dmatrix::colfill_randn_ni(), dvector::fill_randn(), dvar_vector::fill_randn(), dvector::fill_randn_ni(), dvar_vector::fill_randn_ni(), function_minimizer::hybrid_mcmc_routine(), rgamma(), rlnorm(), rnorm(), dvar_matrix::rowfill_randn(), dmatrix::rowfill_randn(), dvar_matrix::rowfill_randn_ni(), and dmatrix::rowfill_randn_ni().
double randu | ( | const random_number_generator & | rng | ) |
Uniform random number generator.
Definition at line 198 of file rngen.cpp.
Referenced by function_minimizer::build_tree(), function_minimizer::hybrid_mcmc_routine(), function_minimizer::nuts_mcmc_routine(), rgamma(), qfclib::rgamma(), runif(), sample(), and function_minimizer::shmc_mcmc_routine().
void random_number_generator::reinitialize | ( | const int | seed | ) |
Reinitialize random number seed.
Based on the C-program for MT19937, originally coded by Takuji Nshimura and Makoto Matsumoto.
seed | Integer used to initialize the random number generator. Using different values of seed will generat different series of random numbers. |
Generated on Wed Sep 7 2022 00:01:32 for ADMB Documentation by 1.8.5 |