| class MS_RANDOM_GEN < $RANDOM_GEN |
|---|
| **** | The "minimal standard" generator described in "Random Number Generators: Good Ones are Hard to Find" by Stephen Park and Keith Miller, Communications of the ACM, October 1988, Volume 31, Number 10, p. 1192. Linear congruential, produces a value in `[0.,1.)' including `0.' but not `1.' Any seed value in the range `[1,2147483646]' is equally good. |
| $RANDOM_GEN |
| attr seed:INT; |
|---|
| **** | Current state of generator. |
| attr seed:INT; |
|---|
| **** | Current state of generator. |
| shared ms_m:FLTD; |
|---|
| **** | `(2^31)-1', prime |
| shared ms_md:FLTD; |
|---|
| **** | to avoid continual recomputation |
| shared ms_m:FLTD; |
|---|
| **** | `(2^31)-1', prime |
| shared ms_md:FLTD; |
|---|
| **** | to avoid continual recomputation |
| const ms_a:FLTD:=16807.0d; |
|---|
| **** | `7^5' |
| create:SAME |
|---|
| **** | A minimal standard generator with `seed=1'. |
| get:FLTD |
|---|
| **** | Pseudo-random value in `[0.,1.)' generated by minimal std generator. |
| init(nseed:INT) |
|---|
| **** | Initialize the generator. |