Defines | Functions | Variables

Go4EventServer/random-coll.c File Reference

#include "random-coll.h"
#include <math.h>

Go to the source code of this file.

Defines

#define BETA_TURNING_POINT   2
#define GAMMA_TURNING_POINT   7
#define GEOMETRIC_TURNING_POINT   0.38
#define _Mult   1664525
#define _Cons   1
#define _Mask   0xFFFF
#define _Lo(X)   (X&_Mask)
#define _Hi(X)   ((X>>16)&_Mask)

Functions

double p_dBeta (double a, double b, unsigned int *seed)
double p_dUniform ()
int p_iBinomial (double p, int n, unsigned int *seed)
double log ()
double p_dExponential (double lambda, unsigned int *seed)
double exp ()
double sqrt ()
double tan ()
double pow ()
double floor ()
double p_dGammaInt (int a, unsigned int *seed)
double p_dGammaGen (double A, unsigned *seed)
double ceil ()
int p_iGeometric (double p, unsigned int *seed)
double p_dNormal (double mean, double sigma, unsigned int *seed)
int p_iPoisson (double mu, unsigned *seed)
unsigned p_iUniform (unsigned *seed)
double p_dUniform (unsigned *seed)

Variables

static unsigned Scal = 0xFFFFFFFF

Define Documentation

#define _Cons   1

Definition at line 475 of file random-coll.c.

Referenced by p_dUniform(), and p_iUniform().

#define _Hi (   X  )     ((X>>16)&_Mask)

Definition at line 478 of file random-coll.c.

Referenced by p_dUniform(), and p_iUniform().

#define _Lo (   X  )     (X&_Mask)

Definition at line 477 of file random-coll.c.

Referenced by p_dUniform(), and p_iUniform().

#define _Mask   0xFFFF

Definition at line 476 of file random-coll.c.

#define _Mult   1664525

Definition at line 474 of file random-coll.c.

Referenced by p_dUniform(), and p_iUniform().

#define BETA_TURNING_POINT   2

Definition at line 89 of file random-coll.c.

Referenced by p_dBeta().

#define GAMMA_TURNING_POINT   7

Definition at line 231 of file random-coll.c.

Referenced by p_dGammaInt().

#define GEOMETRIC_TURNING_POINT   0.38

Definition at line 366 of file random-coll.c.

Referenced by p_iGeometric().


Function Documentation

double ceil (  ) 

Referenced by p_iGeometric().

double exp (  ) 
double floor (  ) 
double log (  ) 
double p_dBeta ( double  a,
double  b,
unsigned int *  seed 
)

Definition at line 91 of file random-coll.c.

References BETA_TURNING_POINT, p_dGammaGen(), p_dUniform(), and pow().

double p_dExponential ( double  lambda,
unsigned int *  seed 
)

Definition at line 189 of file random-coll.c.

References log(), and p_dUniform().

Referenced by TGo4MbsRandom::rand_event().

double p_dGammaGen ( double  A,
unsigned *  seed 
)

Definition at line 282 of file random-coll.c.

References b, exp(), floor(), log(), p_dGammaInt(), p_dUniform(), pow(), sqrt(), and tan().

Referenced by p_dBeta().

double p_dGammaInt ( int  a,
unsigned int *  seed 
)

Definition at line 240 of file random-coll.c.

References exp(), GAMMA_TURNING_POINT, log(), p_dUniform(), sqrt(), and tan().

Referenced by p_dGammaGen().

double p_dNormal ( double  mean,
double  sigma,
unsigned int *  seed 
)

Definition at line 404 of file random-coll.c.

References log(), p_dUniform(), and sqrt().

Referenced by TGo4MbsRandom::rand_event().

double p_dUniform (  ) 
double p_dUniform ( unsigned *  seed  ) 

Definition at line 512 of file random-coll.c.

References _Cons, _Hi, _Lo, _Mult, and Scal.

int p_iBinomial ( double  p,
int  n,
unsigned int *  seed 
)

Definition at line 148 of file random-coll.c.

References p_dUniform().

int p_iGeometric ( double  p,
unsigned int *  seed 
)

Definition at line 368 of file random-coll.c.

References ceil(), GEOMETRIC_TURNING_POINT, log(), and p_dUniform().

int p_iPoisson ( double  mu,
unsigned *  seed 
)

Definition at line 439 of file random-coll.c.

References exp(), and p_dUniform().

unsigned p_iUniform ( unsigned *  seed  ) 

Definition at line 497 of file random-coll.c.

References _Cons, _Hi, _Lo, and _Mult.

double pow (  ) 

Referenced by p_dBeta(), and p_dGammaGen().

double sqrt (  ) 
double tan (  ) 

Referenced by p_dGammaGen(), and p_dGammaInt().


Variable Documentation

unsigned Scal = 0xFFFFFFFF [static]

Definition at line 511 of file random-coll.c.

Referenced by p_dUniform().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines