Uniform random distribution. More...
#include <rutz/rand.h>
Public Member Functions | |
urand (long s=0) | |
void | seed (long s) |
double | fdraw () |
Uniform random distribution in the interval [0.0:1.0[. | |
double | fdraw_range (double min, double max) |
Uniform random distribution in the interval [min:max[. | |
bool | booldraw () |
Uniform random distribution between true:false. | |
int | idraw (int n) |
Uniform random distribution in the interval [0:n[. | |
int | idraw_range (int lo, int hi) |
Uniform random distribution in the interval [lo:hi[. | |
int | operator() (int n) |
Uniform random distribution in the interval [0:n[. |
Uniform random distribution.
Definition at line 65 of file rand.h.
bool rutz::urand::booldraw | ( | ) | [inline] |
double rutz::urand::fdraw | ( | ) | [inline] |
Uniform random distribution in the interval [0.0:1.0[.
Definition at line 80 of file rand.h.
Referenced by booldraw(), fdraw_range(), idraw(), and GameOfLifeInput::readFrame().
double rutz::urand::fdraw_range | ( | double | min, | |
double | max | |||
) | [inline] |
int rutz::urand::idraw | ( | int | n | ) | [inline] |
int rutz::urand::idraw_range | ( | int | lo, | |
int | hi | |||
) | [inline] |
int rutz::urand::operator() | ( | int | n | ) | [inline] |