Mersenne Twister sampler for random variables. More...
#include "maze/Random_MT.h"
Static Public Member Functions | |
| static std::mt19937_64 & | mt_eng () |
| Initialize MT sampler engine based on std::mt19937_64. More... | |
| static double | next_cauchy (double m, double s) |
| Returns a random double from the Cauchy distribution. More... | |
| static double | next_double (double f, double e) |
| Returns a random double from the uniform distribution from a [f, e) range. More... | |
| static double | next_double (double e) |
| static double | next_double () |
| static std::vector< double > | next_double (double f, double e, std::size_t n) |
| Returns a random vector<double> from the uniform distribution from a [f, e) range of length n. More... | |
| static int | next_int (int f, int e) |
| Returns a random int from the uniform distribution from a [f, e) range. More... | |
| static int | next_int (int e) |
| static Vector | next_plmd_vector () |
| Returns a random PLMD::Vector of length r. More... | |
| static Vector | next_plmd_vector (double r) |
| static std::vector< double > | next_std_vector () |
| Returns a random std::vector of length r. More... | |
| static std::vector< double > | next_std_vector (double r) |
| static void | randomize () |
| Feed a random seed. More... | |
Mersenne Twister sampler for random variables.
Supports generating integers, doubles, and std::vectors and PLMD::Vectors within a given range.
|
inlinestatic |
Initialize MT sampler engine based on std::mt19937_64.
|
inlinestatic |
Returns a random double from the Cauchy distribution.
| m | mean |
| s | spread |
|
inlinestatic |
Returns a random double from the uniform distribution from a [f, e) range.
|
inlinestatic |
|
inlinestatic |
|
static |
Returns a random vector<double> from the uniform distribution from a [f, e) range of length n.
|
inlinestatic |
Returns a random int from the uniform distribution from a [f, e) range.
| f | begin |
| e | end |
|
inlinestatic |
|
inlinestatic |
Returns a random PLMD::Vector of length r.
|
inlinestatic |
|
inlinestatic |
Returns a random std::vector of length r.
|
inlinestatic |
|
inlinestatic |
Feed a random seed.
Hosted by GitHub
|
1.8.14
|