Random generator


Functions

void mt19937_srand (unsigned int seed)
void mt19937_srand_by_array (unsigned int init_key[], unsigned int key_length)
unsigned int mt19937_rand_int32 (void)
int mt19937_rand_int31 (void)
double mt19937_rand_real1 (void)
double mt19937_rand_real2 (void)
double mt19937_rand_real3 (void)
double mt19937_rand_res53 (void)
void it_randomize (void)
void it_seed (int seed)
double it_rand (void)
double it_randn (void)
double it_randpdf (double a, double b, it_function_t pdf, it_args_t args)
int it_rand_memoryless (vec pdf)

Detailed Description


Function Documentation

int it_rand_memoryless ( vec  pdf  ) 

Definition at line 680 of file random.c.

References it_rand(), vec_cum_sum(), vec_delete(), vec_ins, and vec_length().

double it_randn ( void   ) 

void it_randomize ( void   ) 

Definition at line 581 of file random.c.

References it_seed().

double it_randpdf ( double  a,
double  b,
it_function_t  pdf,
it_args_t  args 
)

Definition at line 661 of file random.c.

References it_rand().

Referenced by source_pdf().

void it_seed ( int  seed  ) 

Definition at line 603 of file random.c.

References mt19937_srand().

Referenced by it_randomize().

int mt19937_rand_int31 ( void   ) 

Definition at line 483 of file random.c.

References left, mt19937_next_state(), and next.

unsigned int mt19937_rand_int32 ( void   ) 

Definition at line 465 of file random.c.

References left, mt19937_next_state(), and next.

Referenced by it_randn(), and mt19937_rand_res53().

double mt19937_rand_real1 ( void   ) 

Definition at line 501 of file random.c.

References left, mt19937_next_state(), and next.

Referenced by getSamples().

double mt19937_rand_real2 ( void   ) 

Definition at line 520 of file random.c.

References left, mt19937_next_state(), and next.

Referenced by mt19937_rand().

double mt19937_rand_real3 ( void   ) 

Definition at line 539 of file random.c.

References left, mt19937_next_state(), and next.

Referenced by it_randn().

double mt19937_rand_res53 ( void   ) 

Definition at line 558 of file random.c.

References mt19937_rand_int32().

void mt19937_srand ( unsigned int  seed  ) 

Definition at line 380 of file random.c.

References idx, initf, left, N, and state.

Referenced by it_seed(), mt19937_next_state(), and mt19937_srand_by_array().

void mt19937_srand_by_array ( unsigned int  init_key[],
unsigned int  key_length 
)

Definition at line 399 of file random.c.

References initf, left, mt19937_srand(), N, and state.


Hosted by
Copyright (C) 2005-2006 Hervé Jégou
Vivien Chappelier
Francois Cayre
libit logo courtesy of Jonathan Delhumeau