Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends
Random Class Reference

#include <Random.h>

List of all members.

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.)
Randomoperator= (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)

Detailed Description

Definition at line 147 of file Random.h.


Constructor & Destructor Documentation

Random::Random ( long  seed) [inline]

Definition at line 183 of file Random.h.

Random::Random ( void  ) [inline]

Definition at line 194 of file Random.h.

Random::~Random ( void  ) [inline]

Definition at line 203 of file Random.h.

Random::Random ( const Random r) [inline]

Definition at line 208 of file Random.h.


Member Function Documentation

static float Random::_parabola ( float  x,
float  xMin,
float  xMax 
) [inline, static, private]

Definition at line 1173 of file Random.h.

void Random::_seedTable ( void  ) [inline, private]

Definition at line 1138 of file Random.h.

float Random::_u ( void  ) [inline, private]

Definition at line 1155 of file Random.h.

float Random::arcsine ( float  xMin = 0.,
float  xMax = 1. 
) [inline]

Definition at line 255 of file Random.h.

float Random::avoidance ( void  ) [inline]

Definition at line 1027 of file Random.h.

void Random::avoidance ( float  x[],
unsigned  ndim 
) [inline]

Definition at line 1034 of file Random.h.

bool Random::bernoulli ( float  p = 0.5) [inline]

Definition at line 539 of file Random.h.

float Random::beta ( float  v,
float  w,
float  xMin = 0.,
float  xMax = 1. 
) [inline]

Definition at line 261 of file Random.h.

int Random::binomial ( int  n,
float  p 
) [inline]

Definition at line 546 of file Random.h.

cartesianCoord Random::bivariateNormal ( float  muX = 0.,
float  sigmaX = 1.,
float  muY = 0.,
float  sigmaY = 1. 
) [inline]

Definition at line 907 of file Random.h.

cartesianCoord Random::bivariateUniform ( float  xMin = -1.,
float  xMax = 1.,
float  yMin = -1.,
float  yMax = 1. 
) [inline]

Definition at line 920 of file Random.h.

float Random::cauchy ( float  a = 0.,
float  b = 1. 
) [inline]

Definition at line 270 of file Random.h.

float Random::chiSquare ( int  df) [inline]

Definition at line 280 of file Random.h.

cartesianCoord Random::corrNormal ( float  r,
float  muX = 0.,
float  sigmaX = 1.,
float  muY = 0.,
float  sigmaY = 1. 
) [inline]

Definition at line 945 of file Random.h.

cartesianCoord Random::corrUniform ( float  r,
float  xMin = 0.,
float  xMax = 1.,
float  yMin = 0.,
float  yMax = 1. 
) [inline]

Definition at line 965 of file Random.h.

float Random::cosine ( float  xMin = 0.,
float  xMax = 1. 
) [inline]

Definition at line 287 of file Random.h.

float Random::empirical ( void  ) [inline]

Definition at line 640 of file Random.h.

int Random::empiricalDiscrete ( void  ) [inline]

Definition at line 674 of file Random.h.

float Random::erlang ( float  b,
int  c 
) [inline]

Definition at line 308 of file Random.h.

float Random::exponential ( float  a = 0.,
float  c = 1. 
) [inline]

Definition at line 318 of file Random.h.

float Random::extremeValue ( float  a = 0.,
float  c = 1. 
) [inline]

Definition at line 325 of file Random.h.

float Random::floatLog ( float  xMin = -1.,
float  xMax = 1. 
) [inline]

Definition at line 297 of file Random.h.

float Random::fRatio ( int  v,
int  w 
) [inline]

Definition at line 332 of file Random.h.

float Random::gamma ( float  a,
float  b,
float  c 
) [inline]

Definition at line 339 of file Random.h.

int Random::geometric ( float  p) [inline]

Definition at line 555 of file Random.h.

int Random::hypergeometric ( int  n,
int  N,
int  K 
) [inline]

Definition at line 562 of file Random.h.

float Random::laplace ( float  a = 0.,
float  b = 1. 
) [inline]

Definition at line 377 of file Random.h.

float Random::logarithmic ( float  xMin = 0.,
float  xMax = 1. 
) [inline]

Definition at line 387 of file Random.h.

float Random::logistic ( float  a = 0.,
float  c = 1. 
) [inline]

Definition at line 399 of file Random.h.

float Random::lognormal ( float  a,
float  mu,
float  sigma 
) [inline]

Definition at line 406 of file Random.h.

void Random::multinomial ( int  n,
float  p[],
int  count[],
int  m 
) [inline]

Definition at line 575 of file Random.h.

int Random::negativeBinomial ( int  s,
float  p 
) [inline]

Definition at line 605 of file Random.h.

float Random::normal ( float  mu = 0.,
float  sigma = 1. 
) [inline]

Definition at line 411 of file Random.h.

Random& Random::operator= ( const Random r) [inline]

Definition at line 221 of file Random.h.

float Random::parabolic ( float  xMin = 0.,
float  xMax = 1. 
) [inline]

Definition at line 434 of file Random.h.

float Random::pareto ( float  c) [inline]

Definition at line 444 of file Random.h.

int Random::pascal ( int  s,
float  p 
) [inline]

Definition at line 614 of file Random.h.

float Random::pearson5 ( float  b,
float  c 
) [inline]

Definition at line 451 of file Random.h.

float Random::pearson6 ( float  b,
float  v,
float  w 
) [inline]

Definition at line 458 of file Random.h.

int Random::poisson ( float  mu) [inline]

Definition at line 619 of file Random.h.

float Random::power ( float  c) [inline]

Definition at line 465 of file Random.h.

float Random::rayleigh ( float  a,
float  b 
) [inline]

Definition at line 472 of file Random.h.

void Random::reset ( long  seed) [inline]

Definition at line 238 of file Random.h.

void Random::reset ( void  ) [inline]

Definition at line 246 of file Random.h.

float Random::sample ( bool  replace = true) [inline]

Definition at line 720 of file Random.h.

void Random::sample ( float  x[],
int  ndim 
) [inline]

Definition at line 761 of file Random.h.

sphericalCoord Random::spherical ( float  thMin = 0.,
float  thMax = M_PI,
float  phMin = 0.,
float  phMax = 2. * M_PI 
) [inline]

Definition at line 994 of file Random.h.

void Random::sphericalND ( float  x[],
int  n 
) [inline]

Definition at line 1008 of file Random.h.

Definition at line 800 of file Random.h.

float Random::studentT ( int  df) [inline]

Definition at line 479 of file Random.h.

bool Random::tausworthe ( unsigned  n) [inline]

Definition at line 1092 of file Random.h.

void Random::tausworthe ( bool *  bitvec,
unsigned  n 
) [inline]

Definition at line 1106 of file Random.h.

float Random::triangular ( float  xMin = 0.,
float  xMax = 1.,
float  c = 0.5 
) [inline]

Definition at line 486 of file Random.h.

float Random::uniform ( float  xMin = 0.,
float  xMax = 1. 
) [inline]

Definition at line 500 of file Random.h.

int Random::uniformDiscrete ( int  i,
int  j 
) [inline]

Definition at line 631 of file Random.h.

float Random::userSpecified ( float(*)(float, float, float)  usf,
float  xMin,
float  xMax,
float  yMin,
float  yMax 
) [inline]

Definition at line 507 of file Random.h.

float Random::weibull ( float  a,
float  b,
float  c 
) [inline]

Definition at line 530 of file Random.h.


Friends And Related Function Documentation

bool operator!= ( const Random p,
const Random q 
) [friend]

Definition at line 160 of file Random.h.

bool operator== ( const Random p,
const Random q 
) [friend]

Definition at line 152 of file Random.h.

istream& operator>> ( istream &  is,
Random rv 
) [friend]

Definition at line 167 of file Random.h.


Member Data Documentation

const long Random::_DIV = 1+(_M-1)/_NTAB [static, private]

Definition at line 1131 of file Random.h.

const float Random::_F = 1. / _M [static, private]

Definition at line 1129 of file Random.h.

const long Random::_M = 0x7fffffff [static, private]

Definition at line 1125 of file Random.h.

long Random::_next [private]

Definition at line 1133 of file Random.h.

const short Random::_NTAB = 32 [static, private]

Definition at line 1130 of file Random.h.

long Random::_seed [private]

Definition at line 1134 of file Random.h.

unsigned Random::_seed2 [private]

Definition at line 1135 of file Random.h.

long Random::_table[_NTAB] [private]

Definition at line 1132 of file Random.h.

const long Random::A_ = 0x10ff5 [static, private]

Definition at line 1126 of file Random.h.

const long Random::Q_ = 0x787d [static, private]

Definition at line 1127 of file Random.h.

const long Random::R_ = 0x5d5e [static, private]

Definition at line 1128 of file Random.h.

pthread_mutex_t Random::random_mutex [private]

Definition at line 1136 of file Random.h.


The documentation for this class was generated from the following file:


rl_common
Author(s):
autogenerated on Thu Jun 6 2019 22:00:08