Collection of different variate generators for different distributions. More...
#include <shark/Rng/GlobalRng.h>
Collaboration diagram for shark::BaseRng< RNG >:Static Public Member Functions | |
| static bool | coinToss (double p=0.5) |
| creates a bernoulli distributed number with propability "p" More... | |
| static int | discrete (int min=0, int 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 114 of file GlobalRng.h.
|
inlinestatic |
creates a cauchy distributed number
Definition at line 155 of file GlobalRng.h.
References shark::BaseRng< RNG >::globalRng.
Referenced by shark::BaseRng< RNG >::gam().
|
inlinestatic |
creates a bernoulli distributed number with propability "p"
Definition at line 124 of file GlobalRng.h.
References shark::BaseRng< RNG >::globalRng.
|
inlinestatic |
creates a number using the diff-geometric distribution with mean "mean"
Definition at line 167 of file GlobalRng.h.
References shark::BaseRng< RNG >::globalRng, and shark::mean().
|
inlinestatic |
creates a dirichlet distributed number
Definition at line 185 of file GlobalRng.h.
References shark::BaseRng< RNG >::globalRng.
|
inlinestatic |
creates a dirichlet distributed number
Definition at line 190 of file GlobalRng.h.
References shark::BaseRng< RNG >::globalRng.
|
inlinestatic |
creates a discrete uniform distributed number in the range from "min" to "max"
Definition at line 130 of file GlobalRng.h.
References shark::BaseRng< RNG >::globalRng, shark::blas::max(), and shark::blas::min().
|
inlinestatic |
creates a number using the gamma distribution
Definition at line 179 of file GlobalRng.h.
References shark::BaseRng< RNG >::cauchy(), and shark::BaseRng< RNG >::globalRng.
|
inlinestatic |
creates a normal distributed number with mean "mean" and variance "sigma"
Definition at line 149 of file GlobalRng.h.
References shark::BaseRng< RNG >::globalRng, and shark::mean().
|
inlinestatic |
creates a number using the geometric distribution and propability "p"
Definition at line 161 of file GlobalRng.h.
References shark::BaseRng< RNG >::globalRng.
|
inlinestatic |
creates a log-normal distributed number with location "location" and scale "scale"
Definition at line 143 of file GlobalRng.h.
References shark::BaseRng< RNG >::globalRng.
|
inlinestatic |
creates a poission distributed number with mean "mean"
Definition at line 173 of file GlobalRng.h.
References shark::BaseRng< RNG >::globalRng, and shark::mean().
|
inlinestatic |
Sets the seed for all random number generators to "s".
Definition at line 196 of file GlobalRng.h.
References shark::BaseRng< RNG >::globalRng.
|
inlinestatic |
creates a uniform distributed number in the range from "min" to "max"
Definition at line 137 of file GlobalRng.h.
References shark::BaseRng< RNG >::globalRng, shark::blas::max(), and shark::blas::min().
|
static |
The global random number generator used by all distributions.
Definition at line 121 of file GlobalRng.h.
Referenced by shark::BaseRng< RNG >::cauchy(), shark::BaseRng< RNG >::coinToss(), shark::BaseRng< RNG >::diffGeom(), shark::BaseRng< RNG >::dir(), shark::BaseRng< RNG >::discrete(), shark::BaseRng< RNG >::gam(), shark::BaseRng< RNG >::gauss(), shark::BaseRng< RNG >::geom(), shark::BaseRng< RNG >::logNormal(), shark::BaseRng< RNG >::poisson(), shark::BaseRng< RNG >::seed(), and shark::BaseRng< RNG >::uni().