#include <random>
#include <shark/Core/DLLSupport.h>
Go to the source code of this file.
|
template<class RngType > |
bool | shark::random::coinToss (RngType &rng, double pHeads=0.5) |
| Flips a coin with probability of heads being pHeads by drawing random numbers from rng. More...
|
|
template<class RngType > |
double | shark::random::uni (RngType &rng, double lower=0.0, double upper=1.0) |
| Draws a number uniformly in [lower,upper] by drawing random numbers from rng. More...
|
|
template<class RngType , class T > |
T | shark::random::discrete (RngType &rng, T low, T high) |
| Draws a discrete number in {low,low+1,...,high} by drawing random numbers from rng. More...
|
|
template<class RngType > |
double | shark::random::gauss (RngType &rng, double mean=0.0, double variance=1.0) |
| Draws a number from the normal distribution with given mean and variance by drawing random numbers from rng. More...
|
|
template<class RngType > |
double | shark::random::logNormal (RngType &rng, double m=0.0, double v=1.0) |
| Draws a number from the log-normal distribution as exp(gauss(m,v)) More...
|
|
template<class RngType > |
double | shark::random::truncExp (RngType &rng, double lambda, double maximum, double Z=-1.0) |
| draws a number from the truncated exponential distribution More...
|
|