-
Notifications
You must be signed in to change notification settings - Fork 0
/
mt19937ar.h
34 lines (27 loc) · 1.02 KB
/
mt19937ar.h
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
31
32
33
34
#pragma once
#include <circle/types.h>
/* initializes mt[N] with a seed */
void init_genrand(unsigned long s);
/* initialize by an array with array-length */
/* init_key is the array for initializing keys */
/* key_length is its length */
/* slight change for C++, 2004/2/26 */
void init_by_array(const unsigned long init_key[], int key_length);
/* generates a random number on [0,0xffffffff]-interval */
u32 genrand_int32();
/* generates a random number on [0,0x7fffffff]-interval */
long genrand_int31();
///* generates a random number on [0,1]-real-interval */
//double genrand_real1(void);
//
///* generates a random number on [0,1)-real-interval */
//double genrand_real2(void);
//
///* generates a random number on (0,1)-real-interval */
//double genrand_real3(void);
//
///* generates a random number on [0,1) with 53-bit resolution*/
//double genrand_res53(void);
///* These real versions are due to Isaku Wada, 2002/01/09 added */
/* generates a random number on [min,max)-interval */
u32 genrand_range(long min, long max);