blob: a6b09f2849b1921cd9f1674a4fb545d63d1433f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* util.h
*
* headers for randomizing utilities
*
* By: Martin C. Carlisle
* Date: Feb 23, 1994
*
*/
/* initialize the random number generator for a particular processor */
void init_random(int myid);
/* return a random number from 0 to range-1 */
int gen_number(int range);
/* return a random number in [-range+1,range-1] */
int gen_signed_number(int range);
/* Generate a double from 0.0 to 1.0 */
double gen_uniform_double();
/* Return 1, percent percent of the time and 0 otherwise */
int check_percent(int percent);
|