Mersenne Twister sampler for random variables.
More...
#include "maze/Random_MT.h"
|
static std::mt19937_64 & | mt_eng () |
| Initialize MT sampler engine based on std::mt19937_64.
|
|
static double | next_cauchy (double m, double s) |
| Returns a random double from the Cauchy distribution.
|
|
static double | next_double () |
|
static double | next_double (double e) |
|
static double | next_double (double f, double e) |
| Returns a random double from the uniform distribution from a [f, e) range.
|
|
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.
|
|
static int | next_int (int e) |
|
static int | next_int (int f, int e) |
| Returns a random int from the uniform distribution from a [f, e) range.
|
|
static Vector | next_plmd_vector () |
| Returns a random PLMD::Vector of length r.
|
|
static Vector | next_plmd_vector (double r) |
|
static std::vector< double > | next_std_vector () |
| Returns a random std::vector of length r.
|
|
static std::vector< double > | next_std_vector (double r) |
|
static void | randomize () |
| Feed a random seed.
|
|
Mersenne Twister sampler for random variables.
Supports generating integers, doubles, and std::vectors and PLMD::Vectors within a given range.
◆ mt_eng()
std::mt19937_64 & PLMD::maze::rnd::mt_eng |
( |
| ) |
|
|
static |
Initialize MT sampler engine based on std::mt19937_64.
◆ next_cauchy()
double PLMD::maze::rnd::next_cauchy |
( |
double | m, |
|
|
double | s ) |
|
static |
Returns a random double from the Cauchy distribution.
- Parameters
-
◆ next_double() [1/4]
double PLMD::maze::rnd::next_double |
( |
| ) |
|
|
static |
◆ next_double() [2/4]
double PLMD::maze::rnd::next_double |
( |
double | e | ) |
|
|
inlinestatic |
◆ next_double() [3/4]
double PLMD::maze::rnd::next_double |
( |
double | f, |
|
|
double | e ) |
|
static |
Returns a random double from the uniform distribution from a [f, e) range.
◆ next_double() [4/4]
static std::vector< double > PLMD::maze::rnd::next_double |
( |
double | f, |
|
|
double | e, |
|
|
std::size_t | n ) |
|
static |
Returns a random vector<double> from the uniform distribution from a [f, e) range of length n.
◆ next_int() [1/2]
int PLMD::maze::rnd::next_int |
( |
int | e | ) |
|
|
static |
◆ next_int() [2/2]
int PLMD::maze::rnd::next_int |
( |
int | f, |
|
|
int | e ) |
|
static |
Returns a random int from the uniform distribution from a [f, e) range.
- Parameters
-
◆ next_plmd_vector() [1/2]
Vector PLMD::maze::rnd::next_plmd_vector |
( |
| ) |
|
|
inlinestatic |
◆ next_plmd_vector() [2/2]
Vector PLMD::maze::rnd::next_plmd_vector |
( |
double | r | ) |
|
|
inlinestatic |
◆ next_std_vector() [1/2]
std::vector< double > PLMD::maze::rnd::next_std_vector |
( |
| ) |
|
|
inlinestatic |
Returns a random std::vector of length r.
◆ next_std_vector() [2/2]
std::vector< double > PLMD::maze::rnd::next_std_vector |
( |
double | r | ) |
|
|
inlinestatic |
◆ randomize()
void PLMD::maze::rnd::randomize |
( |
| ) |
|
|
inlinestatic |
The documentation for this class was generated from the following files: