|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
#include "ran_array.h"Go to the source code of this file.
Macros | |
| #define | KK 100 /* the long lag */ |
| #define | LL 37 /* the short lag */ |
| #define | MM (1L<<30) /* the modulus */ |
| #define | mod_diff(x, y) (((x)-(y))&(MM-1)) /* subtraction mod MM */ |
| #define | TT 70 /* guaranteed separation between streams */ |
| #define | is_odd(x) ((x)&1) /* units bit of x */ |
| #define | evenize(x) ((x)&(MM-2)) /* make x even */ |
| #define | QUALITY 1009 /* recommended quality level for high-res use */ |
| #define | TT 70 /* guaranteed separation between streams */ |
| #define | is_odd(x) ((x)&1) /* units bit of x */ |
Functions | |
| static void | ran_array (long *aa, int n) |
| void | ran_start (long seed) |
| long | ran_arr_cycle (void) |
Variables | |
| static long | ran_x [100] |
| static long | ran_arr_buf [1009] |
| static long | ran_arr_dummy =-1 |
| static long | ran_arr_started =-1 |
| long * | ran_arr_ptr =&ran_arr_dummy |
| #define evenize | ( | x | ) | ((x)&(MM-2)) /* make x even */ |
Definition at line 31 of file ran_array.c.
| #define is_odd | ( | x | ) | ((x)&1) /* units bit of x */ |
Definition at line 30 of file ran_array.c.
| #define is_odd | ( | x | ) | ((x)&1) /* units bit of x */ |
Definition at line 30 of file ran_array.c.
| #define KK 100 /* the long lag */ |
Definition at line 23 of file ran_array.c.
| #define LL 37 /* the short lag */ |
Definition at line 24 of file ran_array.c.
| #define MM (1L<<30) /* the modulus */ |
Definition at line 25 of file ran_array.c.
Definition at line 26 of file ran_array.c.
| #define QUALITY 1009 /* recommended quality level for high-res use */ |
Definition at line 55 of file ran_array.c.
| #define TT 70 /* guaranteed separation between streams */ |
Definition at line 29 of file ran_array.c.
| #define TT 70 /* guaranteed separation between streams */ |
Definition at line 29 of file ran_array.c.
| long ran_arr_cycle | ( | void | ) |
Definition at line 97 of file ran_array.c.
References QUALITY, ran_arr_buf, ran_arr_dummy, ran_arr_ptr, ran_array(), and ran_start().
|
static |
Definition at line 40 of file ran_array.c.
References KK, LL, mod_diff, and ran_x.
Referenced by ran_arr_cycle(), and ran_start().
| void ran_start | ( | long | seed | ) |
Definition at line 66 of file ran_array.c.
References is_odd, KK, LL, MM, mod_diff, ran_arr_ptr, ran_arr_started, ran_array(), ran_x, and TT.
Referenced by ran_arr_cycle().
|
static |
Definition at line 56 of file ran_array.c.
Referenced by ran_arr_cycle().
|
static |
Definition at line 57 of file ran_array.c.
Referenced by ran_arr_cycle().
| long* ran_arr_ptr =&ran_arr_dummy |
Definition at line 58 of file ran_array.c.
Referenced by ran_arr_cycle(), and ran_start().
|
static |
Definition at line 57 of file ran_array.c.
Referenced by ran_start().
|
static |
Definition at line 35 of file ran_array.c.
Referenced by ran_array(), and ran_start().