g05ykc generates a quasi-random sequence from a log-normal distribution. It must be preceded by a call to one of the initialization functions
g05ylc or
g05ync.
g05ykc generates a quasi-random sequence from a log-normal distribution by first generating a uniform quasi-random sequence which is then transformed into a log-normal sequence using the exponential of the inverse of the Normal CDF. The type of uniform sequence used depends on the initialization function called and can include the low-discrepancy sequences proposed by Sobol, Faure or Niederreiter. If the initialization function
g05ync was used then the underlying uniform sequence is first scrambled prior to being transformed (see
Section 3 in
g05ync for details).
Bratley P and Fox B L (1988) Algorithm 659: implementing Sobol's quasirandom sequence generator ACM Trans. Math. Software 14(1) 88–100
Fox B L (1986) Algorithm 647: implementation and relative efficiency of quasirandom sequence generators ACM Trans. Math. Software 12(4) 362–376
Wichura (1988) Algorithm AS 241: the percentage points of the Normal distribution Appl. Statist. 37 477–484
Note: the following variables are used in the parameter descriptions:
- , the number of dimensions required, see g05ylc or g05ync;
- , the length of iref as supplied to the initialization functions g05ylc or g05ync.
-
1:
– Nag_OrderType
Input
-
On entry: the
order argument specifies the two-dimensional storage scheme being used, i.e., row-major ordering or column-major ordering. C language defined storage is specified by
. See
Section 3.1.3 in the Introduction to the NAG Library CL Interface for a more detailed explanation of the use of this argument.
Constraint:
or .
-
2:
– const double
Input
-
On entry: specifies, for each dimension, the mean of the underlying Normal distribution.
Constraint:
, for .
-
3:
– const double
Input
-
On entry: specifies, for each dimension, the standard deviation of the underlying Normal distribution.
Constraint:
, for .
-
4:
– Integer
Input
-
On entry: the number of quasi-random numbers required.
Constraint:
and .
-
5:
– double
Output
-
Note: the dimension,
dim, of the array
quas
must be at least
-
when ;
-
when .
where
appears in this document, it refers to the array element
- when ;
- when .
On exit: holds the th value for the th dimension.
-
6:
– Integer
Input
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
quas.
Constraints:
- if ,
;
- if , .
-
7:
– Integer
Communication Array
Note: the dimension,
dim, of the array
iref
must be at least
.
On entry: contains information on the current state of the sequence.
On exit: contains updated information on the state of the sequence.
-
8:
– NagError *
Input/Output
-
The NAG error argument (see
Section 7 in the Introduction to the NAG Library CL Interface).
Not applicable.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
The Sobol, Sobol (A659) and Niederreiter quasi-random number generators in g05ykc have been parallelized, but require quite large problem sizes to see any significant performance gain. Parallelism is only enabled when . The Faure generator is serial.
None.
This example calls
g05ylc to initialize the generator and then
g05ykc to produce a sequence of five four-dimensional quasi-random numbers variates.
None.