g05tf generates a vector of pseudorandom integers from the discrete logarithmic distribution with parameter .
public static void g05tf( mode, n, a,  r, G05..::.G05State g05state,  x, out ifail )
|Visual Basic (Declaration)|
Public Shared Sub g05tf ( _ mode As , _ n As , _ a As , _ r As (), _ g05state As G05..::.G05State, _ x As (), _ < > ByRef ifail As _ )
public: static void g05tf( mode, n, a, array< >^ r, G05..::.G05State^ g05state, array< >^ x, [ ] % ifail )
static member g05tf : mode: * n: * a: * r:  * g05state:G05..::.G05State * x:  * ifail: byref -> unit
On entry: a code for selecting the operation to be performed by the method.
Constraint: , , or .
- Set up reference vector only.
- Generate variates using reference vector set up in a prior call to g05tf.
- Set up reference vector and generate variates.
- Generate variates without using the reference vector.
On entry: , the number of pseudorandom numbers to be generated.Constraint: .
On entry: , the parameter of the logarithmic distribution.Constraint: .
- Type: array<
>()An array of size [lr]Note: lr must satisfy the constraint:
On entry: if , the reference vector from the previous call to g05tf.On exit: the reference vector.
- if or , lr must not be too small, but the lower limit is too complicated to specify;
- if , lr must remain unchanged from the previous call to g05tf.
- Type: array<
>()An array of size [n]On exit: the pseudorandom numbers from the specified logarithmic distribution.
On exit: unless the method detects an error (see [Error Indicators and Warnings]).
g05tf generates integers from a discrete logarithmic distribution, where the probability of is
The variates can be generated with or without using a search table and index. If a search table is used then it is stored with the index in a reference vector and subsequent calls to g05tf with the same parameter value can then use this reference vector to generate further variates.
Errors or warnings detected by the method:
Some error messages may refer to parameters that are dropped from this interface (lr, lstate) In these cases, an error in another parameter has usually caused an incorrect value to be inferred.
On entry, the r vector was not initialized correctly, or has been corrupted.
On entry, g05state vector was not initialized or has been corrupted.
This example prints pseudorandom integers from a logarithmic distribution with parameter , generated by a single call to g05tf, after initialization by the state constructor (for a repeatable sequence).