lfg.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  AVLFG
 

Typedefs

typedef struct AVLFG AVLFG
 

Functions

void av_lfg_init (AVLFG *c, unsigned int seed)
 
static unsigned int av_lfg_get (AVLFG *c)
 Get the next random unsigned 32-bit number using an ALFG. More...
 
static unsigned int av_mlfg_get (AVLFG *c)
 Get the next random unsigned 32-bit number using a MLFG. More...
 
void av_bmg_get (AVLFG *lfg, double out[2])
 Get the next two numbers generated by a Box-Muller Gaussian generator using the random numbers issued by lfg. More...
 

Typedef Documentation

typedef struct AVLFG AVLFG

Function Documentation

void av_bmg_get ( AVLFG lfg,
double  out[2] 
)

Get the next two numbers generated by a Box-Muller Gaussian generator using the random numbers issued by lfg.

Parameters
outarray where the two generated numbers are placed

Definition at line 47 of file lfg.c.

Referenced by av_bmg_get(), and av_mlfg_get().

static unsigned int av_mlfg_get ( AVLFG c)
inlinestatic

Get the next random unsigned 32-bit number using a MLFG.

Please also consider av_lfg_get() above, it is faster.

Definition at line 48 of file lfg.h.