GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LCBT / V1-1-0
Constituent: ssrsimOld     Tag: mv2304
This graph shows which files directly or indirectly include this file:
Data Structures | |
struct | _RND_lc0 |
Structure giving the parameters of a simply linear congruent random number generator. More... | |
struct | _RND_normal_lc0 |
Structure giving the parameters of a simple normal distribution random number generator. More... | |
struct | _RND_poisson_lc0 |
Structure giving the parameters of a poisson distribution. More... | |
Typedefs | |
typedef _RND_lc0 | RND_lc0 |
Typedef for the struct _RND_lc0. | |
typedef _RND_normal_lc0 | RND_normal_lc0 |
Typedef for the struct _RND_normal0. | |
typedef _RND_poisson_lc0 | RND_poisson_lc0 |
Typedef for the struct _LSI_poisson_lco. | |
Functions | |
void | RND_lc0_init (RND_lc0 *ctx, unsigned int seed) |
Init. | |
unsigned int | RND_lc0_gen (RND_lc0 *ctx) |
Produces a random number in the range 0 - 2**32-1 using a linear congruent method. | |
int | RND_normal_lc0_gen (RND_normal_lc0 *ctx) |
Produces a normal distribution. |
CVS $Id: RND.h,v 1.1 2004/07/19 20:04:00 ebacho Exp $
|
Typedef for the struct _RND_lc0. This random number generator uses the formula x_{n+1} = (a x_n + c) Suggested choices are
The seed value must be odd. It has been selected since it is relatively fast, involving only a multiply and an addition. Probably not a great choice for real math, but for generating random patterns, not bad |
|
Typedef for the struct _RND_normal0. This is a very simplistic generator, just adding 6 random numbers from the LC generator |
|
Typedef for the struct _LSI_poisson_lco. This is just a scaled exponential distribution, using a linear congruent |
|
Produces a random number in the range 0 - 2**32-1 using a linear congruent method.
r = RND__lc0_args (...) % 256; To produce a number from 0 - 255. Rather do
r = RND__lco_args (...) >> 24; |
Here is the call graph for this function:
|
Init.
|
|
Produces a normal distribution.
|
Here is the call graph for this function: