File: random.h

package info (click to toggle)
fitsh 0.9.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,024 kB
  • sloc: ansic: 56,150; makefile: 1,147; sh: 806
file content (30 lines) | stat: -rw-r--r-- 900 bytes parent folder | download | duplicates (3)
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

/*****************************************************************************/