Collection of different variate generators for different distributions. More...
#include <shark/Rng/GlobalRng.h>
Static Public Member Functions | |
static bool | coinToss (double p=0.5) |
creates a bernoulli distributed number with propability "p" More... | |
static std::size_t | discrete (std::size_t min=0, std::size_t max=1) |
creates a discrete uniform distributed number in the range from "min" to "max" More... | |
static double | uni (double min=0.0, double max=1.0) |
creates a uniform distributed number in the range from "min" to "max" More... | |
static double | logNormal (double location=0.0, double scale=1.0) |
creates a log-normal distributed number with location "location" and scale "scale" More... | |
static double | gauss (double mean=0.0, double sigma=1.0) |
creates a normal distributed number with mean "mean" and variance "sigma" More... | |
static double | cauchy (double median=0.0, double gamma=1.0) |
creates a cauchy distributed number More... | |
static int | geom (double p=0.0) |
creates a number using the geometric distribution and propability "p" More... | |
static int | diffGeom (double mean=0.5) |
creates a number using the diff-geometric distribution with mean "mean" More... | |
static double | poisson (double mean=0.01) |
creates a poission distributed number with mean "mean" More... | |
static double | gam (double k, double theta) |
creates a number using the gamma distribution More... | |
static std::vector< double > | dir (size_t n, double alpha) |
creates a dirichlet distributed number More... | |
static std::vector< double > | dir (const std::vector< double > &alphas) |
creates a dirichlet distributed number More... | |
static void | seed (typename rng_type::result_type s) |
Sets the seed for all random number generators to "s". More... | |
Static Public Attributes | |
static rng_type | globalRng = typename BaseRng<Rng>::rng_type() |
The global random number generator used by all distributions. More... | |
Collection of different variate generators for different distributions.
RNG | The underlying random number generator, needs to model the boost rng concept. |
Definition at line 117 of file GlobalRng.h.
|
inlinestatic |
creates a cauchy distributed number
Definition at line 160 of file GlobalRng.h.
Referenced by shark::BaseRng< RNG >::gam().
|
inlinestatic |
creates a bernoulli distributed number with propability "p"
Definition at line 127 of file GlobalRng.h.
|
inlinestatic |
creates a number using the diff-geometric distribution with mean "mean"
Definition at line 172 of file GlobalRng.h.
References shark::mean().
|
inlinestatic |
creates a dirichlet distributed number
Definition at line 190 of file GlobalRng.h.
|
inlinestatic |
creates a dirichlet distributed number
Definition at line 195 of file GlobalRng.h.
|
inlinestatic |
creates a discrete uniform distributed number in the range from "min" to "max"
Definition at line 133 of file GlobalRng.h.
References remora::max(), and remora::min().
|
inlinestatic |
creates a number using the gamma distribution
Definition at line 184 of file GlobalRng.h.
References shark::BaseRng< RNG >::cauchy().
|
inlinestatic |
creates a normal distributed number with mean "mean" and variance "sigma"
Definition at line 154 of file GlobalRng.h.
References shark::mean().
|
inlinestatic |
creates a number using the geometric distribution and propability "p"
Definition at line 166 of file GlobalRng.h.
|
inlinestatic |
creates a log-normal distributed number with location "location" and scale "scale"
Definition at line 148 of file GlobalRng.h.
|
inlinestatic |
creates a poission distributed number with mean "mean"
Definition at line 178 of file GlobalRng.h.
References shark::mean().
|
inlinestatic |
Sets the seed for all random number generators to "s".
Definition at line 201 of file GlobalRng.h.
|
inlinestatic |
creates a uniform distributed number in the range from "min" to "max"
Definition at line 141 of file GlobalRng.h.
References remora::max(), and remora::min().
|
static |
The global random number generator used by all distributions.
Definition at line 124 of file GlobalRng.h.