1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
/*****************************************************************************/
/* random.h */
/*****************************************************************************/
#ifndef __RANDOM_H_INCLUDED
#define __RANDOM_H_INCLUDED 1
#include <stdint.h>
/*****************************************************************************/
struct random_state
{ uint32_t u,v;
uint32_t w1,w2;
};
int random_state_seed(struct random_state *state,int j);
uint32_t random_state_uint32(struct random_state *state);
double random_state_double(struct random_state *state);
int random_seed(int j);
uint32_t random_uint32(void);
double random_double(void);
/*****************************************************************************/
#endif
/*****************************************************************************/
|