Next: UGEN, Previous: DRANDINITIALIZEUSER, Up: User Supplied Generators
UINI
Specification for a user supplied initialization routine.
— Input: INTEGER GENID
On input: the ID associated with the generator. It may be used for anything you like.
— Input: INTEGER SUBID
On input: the sub-ID associated with the generator. It may be used for anything you like.
— Input/Output: INTEGER LSEED
On input: either the size of the SEED array, or a value < 1.
On output: if LSEED<1 on entry, LSEED must be set to the required size of the SEED array. This allows a caller ofUINI
to query the required size.— Output: INTEGER STATE(LSTATE)
On output: if LSTATE<1 on entry, STATE should be unchanged.
Otherwise, STATE is a state vector holding internal details required by your generator. On exit fromUINI
, the array STATE must hold the following information:
STATE(1)
=ESTATE
, whereESTATE
is your minimum allowed size of array STATE.
STATE(2)
=MAGIC
, whereMAGIC
is a magic number of your own choice. This can be used by your routineUGEN
as a check thatUINI
has previously been called.
STATE(3)
=GENID
STATE(4)
=SUBID
STATE(5)
...STATE(ESTATE-1)
= internal state values required by your generator routineUGEN
; for example, the current value of your seed.
STATE(ESTATE)
=MAGIC
, i.e. the same value asSTATE(2)
.— Input/Output: INTEGER LSTATE
On input: either the size of the STATE array, or a value < 1.
On output: if LSTATE<1 on entry, LSTATE should be set to the required size of the STATE array, i.e. the valueESTATE
as described above. This allows the caller ofUINI
to query the required size.
Constraint: either LSTATE<1 or LSTATE>=ESTATE .