Defines | Functions

Random.h File Reference

#include <math.h>
#include <vector>
Include dependency graph for Random.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define INIT_RANDOM(SEED)   init_genrand(SEED)
#define RANDOM()   genrand_real2()
#define IRAND(LOW, HIGH)   ((int)((LOW)+(int)(((HIGH)-(LOW)+1)*RANDOM())))
#define URAND(LOW, HIGH)   ((double)((LOW)+(((HIGH)-(LOW))*RANDOM())))

Functions

double genrand_real2 ()
void init_genrand (unsigned long s)
int draw_poisson (double lambda)
double draw_exponential (double lambda)
int draw_from_distribution (int n, double *dist)
double draw_standard_normal ()
double draw_normal (double mu, double sigma)
template<typename T >
void FYShuffle (vector< T > &array)

Define Documentation

#define INIT_RANDOM (   SEED  )     init_genrand(SEED)
#define IRAND (   LOW,
  HIGH 
)    ((int)((LOW)+(int)(((HIGH)-(LOW)+1)*RANDOM())))
#define RANDOM (  )     genrand_real2()
#define URAND (   LOW,
  HIGH 
)    ((double)((LOW)+(((HIGH)-(LOW))*RANDOM())))

Function Documentation

double draw_exponential ( double  lambda  ) 
int draw_from_distribution ( int  n,
double *  dist 
)
double draw_normal ( double  mu,
double  sigma 
)
int draw_poisson ( double  lambda  ) 
double draw_standard_normal (  ) 
template<typename T >
void FYShuffle ( vector< T > &  array  ) 
double genrand_real2 (  ) 
void init_genrand ( unsigned long  s  ) 
 All Classes Files Functions Variables Typedefs Defines