#include <Random.h>
Classes | |
struct | dSquared |
Public Member Functions | |
float | arcsine (float xMin=0., float xMax=1.) |
float | avoidance (void) |
void | avoidance (float x[], unsigned ndim) |
bool | bernoulli (float p=0.5) |
float | beta (float v, float w, float xMin=0., float xMax=1.) |
int | binomial (int n, float p) |
cartesianCoord | bivariateNormal (float muX=0., float sigmaX=1., float muY=0., float sigmaY=1.) |
cartesianCoord | bivariateUniform (float xMin=-1., float xMax=1., float yMin=-1., float yMax=1.) |
float | cauchy (float a=0., float b=1.) |
float | chiSquare (int df) |
cartesianCoord | corrNormal (float r, float muX=0., float sigmaX=1., float muY=0., float sigmaY=1.) |
cartesianCoord | corrUniform (float r, float xMin=0., float xMax=1., float yMin=0., float yMax=1.) |
float | cosine (float xMin=0., float xMax=1.) |
float | empirical (void) |
int | empiricalDiscrete (void) |
float | erlang (float b, int c) |
float | exponential (float a=0., float c=1.) |
float | extremeValue (float a=0., float c=1.) |
float | floatLog (float xMin=-1., float xMax=1.) |
float | fRatio (int v, int w) |
float | gamma (float a, float b, float c) |
int | geometric (float p) |
int | hypergeometric (int n, int N, int K) |
float | laplace (float a=0., float b=1.) |
float | logarithmic (float xMin=0., float xMax=1.) |
float | logistic (float a=0., float c=1.) |
float | lognormal (float a, float mu, float sigma) |
void | multinomial (int n, float p[], int count[], int m) |
int | negativeBinomial (int s, float p) |
float | normal (float mu=0., float sigma=1.) |
Random & | operator= (const Random &r) |
float | parabolic (float xMin=0., float xMax=1.) |
float | pareto (float c) |
int | pascal (int s, float p) |
float | pearson5 (float b, float c) |
float | pearson6 (float b, float v, float w) |
int | poisson (float mu) |
float | power (float c) |
Random (long seed) | |
Random (void) | |
Random (const Random &r) | |
float | rayleigh (float a, float b) |
void | reset (long seed) |
void | reset (void) |
float | sample (bool replace=true) |
void | sample (float x[], int ndim) |
sphericalCoord | spherical (float thMin=0., float thMax=M_PI, float phMin=0., float phMax=2.*M_PI) |
void | sphericalND (float x[], int n) |
cartesianCoord | stochasticInterpolation (void) |
float | studentT (int df) |
bool | tausworthe (unsigned n) |
void | tausworthe (bool *bitvec, unsigned n) |
float | triangular (float xMin=0., float xMax=1., float c=0.5) |
float | uniform (float xMin=0., float xMax=1.) |
int | uniformDiscrete (int i, int j) |
float | userSpecified (float(*usf)(float, float, float), float xMin, float xMax, float yMin, float yMax) |
float | weibull (float a, float b, float c) |
~Random (void) | |
Private Member Functions | |
void | _seedTable (void) |
float | _u (void) |
Static Private Member Functions | |
static float | _parabola (float x, float xMin, float xMax) |
Private Attributes | |
long | _next |
long | _seed |
unsigned | _seed2 |
long | _table [_NTAB] |
pthread_mutex_t | random_mutex |
Static Private Attributes | |
static const long | _DIV = 1+(_M-1)/_NTAB |
static const float | _F = 1. / _M |
static const long | _M = 0x7fffffff |
static const short | _NTAB = 32 |
static const long | A_ = 0x10ff5 |
static const long | Q_ = 0x787d |
static const long | R_ = 0x5d5e |
Friends | |
bool | operator!= (const Random &p, const Random &q) |
bool | operator== (const Random &p, const Random &q) |
istream & | operator>> (istream &is, Random &rv) |
Random::Random | ( | long | seed | ) | [inline] |
Random::Random | ( | void | ) | [inline] |
Random::~Random | ( | void | ) | [inline] |
Random::Random | ( | const Random & | r | ) | [inline] |
static float Random::_parabola | ( | float | x, |
float | xMin, | ||
float | xMax | ||
) | [inline, static, private] |
void Random::_seedTable | ( | void | ) | [inline, private] |
float Random::_u | ( | void | ) | [inline, private] |
float Random::arcsine | ( | float | xMin = 0. , |
float | xMax = 1. |
||
) | [inline] |
float Random::avoidance | ( | void | ) | [inline] |
void Random::avoidance | ( | float | x[], |
unsigned | ndim | ||
) | [inline] |
bool Random::bernoulli | ( | float | p = 0.5 | ) | [inline] |
float Random::beta | ( | float | v, |
float | w, | ||
float | xMin = 0. , |
||
float | xMax = 1. |
||
) | [inline] |
int Random::binomial | ( | int | n, |
float | p | ||
) | [inline] |
cartesianCoord Random::bivariateNormal | ( | float | muX = 0. , |
float | sigmaX = 1. , |
||
float | muY = 0. , |
||
float | sigmaY = 1. |
||
) | [inline] |
cartesianCoord Random::bivariateUniform | ( | float | xMin = -1. , |
float | xMax = 1. , |
||
float | yMin = -1. , |
||
float | yMax = 1. |
||
) | [inline] |
float Random::cauchy | ( | float | a = 0. , |
float | b = 1. |
||
) | [inline] |
float Random::chiSquare | ( | int | df | ) | [inline] |
cartesianCoord Random::corrNormal | ( | float | r, |
float | muX = 0. , |
||
float | sigmaX = 1. , |
||
float | muY = 0. , |
||
float | sigmaY = 1. |
||
) | [inline] |
cartesianCoord Random::corrUniform | ( | float | r, |
float | xMin = 0. , |
||
float | xMax = 1. , |
||
float | yMin = 0. , |
||
float | yMax = 1. |
||
) | [inline] |
float Random::cosine | ( | float | xMin = 0. , |
float | xMax = 1. |
||
) | [inline] |
float Random::empirical | ( | void | ) | [inline] |
int Random::empiricalDiscrete | ( | void | ) | [inline] |
float Random::erlang | ( | float | b, |
int | c | ||
) | [inline] |
float Random::exponential | ( | float | a = 0. , |
float | c = 1. |
||
) | [inline] |
float Random::extremeValue | ( | float | a = 0. , |
float | c = 1. |
||
) | [inline] |
float Random::floatLog | ( | float | xMin = -1. , |
float | xMax = 1. |
||
) | [inline] |
float Random::fRatio | ( | int | v, |
int | w | ||
) | [inline] |
float Random::gamma | ( | float | a, |
float | b, | ||
float | c | ||
) | [inline] |
int Random::geometric | ( | float | p | ) | [inline] |
int Random::hypergeometric | ( | int | n, |
int | N, | ||
int | K | ||
) | [inline] |
float Random::laplace | ( | float | a = 0. , |
float | b = 1. |
||
) | [inline] |
float Random::logarithmic | ( | float | xMin = 0. , |
float | xMax = 1. |
||
) | [inline] |
float Random::logistic | ( | float | a = 0. , |
float | c = 1. |
||
) | [inline] |
float Random::lognormal | ( | float | a, |
float | mu, | ||
float | sigma | ||
) | [inline] |
void Random::multinomial | ( | int | n, |
float | p[], | ||
int | count[], | ||
int | m | ||
) | [inline] |
int Random::negativeBinomial | ( | int | s, |
float | p | ||
) | [inline] |
float Random::normal | ( | float | mu = 0. , |
float | sigma = 1. |
||
) | [inline] |
float Random::parabolic | ( | float | xMin = 0. , |
float | xMax = 1. |
||
) | [inline] |
float Random::pareto | ( | float | c | ) | [inline] |
int Random::pascal | ( | int | s, |
float | p | ||
) | [inline] |
float Random::pearson5 | ( | float | b, |
float | c | ||
) | [inline] |
float Random::pearson6 | ( | float | b, |
float | v, | ||
float | w | ||
) | [inline] |
int Random::poisson | ( | float | mu | ) | [inline] |
float Random::power | ( | float | c | ) | [inline] |
float Random::rayleigh | ( | float | a, |
float | b | ||
) | [inline] |
void Random::reset | ( | long | seed | ) | [inline] |
void Random::reset | ( | void | ) | [inline] |
float Random::sample | ( | bool | replace = true | ) | [inline] |
void Random::sample | ( | float | x[], |
int | ndim | ||
) | [inline] |
sphericalCoord Random::spherical | ( | float | thMin = 0. , |
float | thMax = M_PI , |
||
float | phMin = 0. , |
||
float | phMax = 2. * M_PI |
||
) | [inline] |
void Random::sphericalND | ( | float | x[], |
int | n | ||
) | [inline] |
cartesianCoord Random::stochasticInterpolation | ( | void | ) | [inline] |
float Random::studentT | ( | int | df | ) | [inline] |
bool Random::tausworthe | ( | unsigned | n | ) | [inline] |
void Random::tausworthe | ( | bool * | bitvec, |
unsigned | n | ||
) | [inline] |
float Random::triangular | ( | float | xMin = 0. , |
float | xMax = 1. , |
||
float | c = 0.5 |
||
) | [inline] |
float Random::uniform | ( | float | xMin = 0. , |
float | xMax = 1. |
||
) | [inline] |
int Random::uniformDiscrete | ( | int | i, |
int | j | ||
) | [inline] |
float Random::userSpecified | ( | float(*)(float, float, float) | usf, |
float | xMin, | ||
float | xMax, | ||
float | yMin, | ||
float | yMax | ||
) | [inline] |
float Random::weibull | ( | float | a, |
float | b, | ||
float | c | ||
) | [inline] |
const long Random::_DIV = 1+(_M-1)/_NTAB [static, private] |
const float Random::_F = 1. / _M [static, private] |
const long Random::_M = 0x7fffffff [static, private] |
long Random::_next [private] |
const short Random::_NTAB = 32 [static, private] |
long Random::_seed [private] |
unsigned Random::_seed2 [private] |
long Random::_table[_NTAB] [private] |
const long Random::A_ = 0x10ff5 [static, private] |
const long Random::Q_ = 0x787d [static, private] |
const long Random::R_ = 0x5d5e [static, private] |
pthread_mutex_t Random::random_mutex [private] |