-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrandom.h
More file actions
34 lines (26 loc) · 766 Bytes
/
random.h
File metadata and controls
34 lines (26 loc) · 766 Bytes
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
#ifndef _RANDOM_H_
#define _RANDOM_H_
#include <cstdlib>
using namespace std;
//Programmer: Andrew M. Morgan
//Purpose: Provide some simple functionality to generate
//pseudo-random numbers for multiple distribution types.
//This is called once at the beginning of program execution
//to set the seed of the pseudo-random number generator.
void setSeed(
const int seedVal
);
//Returns an integer value from a uniform distribution
//between the specified min and max values.
int getUniform(
const int min,
const int max
);
//Returns an integer drawn from a normal distribution
//described by the input mean and standard deviation
//values...
int getNormal(
const double mean,
const double stdDev
);
#endif // _RANDOM_H_