NAG Library Routine Document
G05YLF initializes a quasi-random generator prior to calling G05YJF
||GENID, IDIM, IREF(LIREF), LIREF, ISKIP, IFAIL
G05YLF selects a quasi-random number generator through the input value of GENID
and initializes the IREF
communication array for use by the routines G05YJF
One of three types of quasi-random generator may be chosen, allowing the low-discrepancy sequences proposed by Sobol, Faure or Niederreiter to be generated.
Two sets of Sobol sequences are supplied, the first, is based on the work of Joe and Kuo (2008)
. The second, referred to in the documentation as "Sobol (A659)", is based on Algorithm 659 of Bratley and Fox (1988)
with the extension to 1111 dimensions proposed by Joe and Kuo (2003)
. Both sets of Sobol sequences should satisfy the so-called Property A, up to
dimensions, but the first set should have better two-dimensional projections than those produced using Algorithm 659.
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
Joe S and Kuo F Y (2003) Remark on Algorithm 659: implementing Sobol's quasirandom sequence generator ACM Trans. Math. Software (TOMS) 29 49–57
Joe S and Kuo F Y (2008) Constructing Sobol sequences with better two-dimensional projections SIAM J. Sci. Comput. 30 2635–2654
- 1: GENID – INTEGERInput
: must identify the quasi-random generator to use.
- Sobol generator.
- Sobol (A659) generator.
- Niederreiter generator.
- Faure generator.
, , or .
- 2: IDIM – INTEGERInput
On entry: the number of dimensions required.
- if , ;
- if , ;
- if , ;
- if , .
- 3: IREF(LIREF) – INTEGER arrayCommunication Array
: contains initialization information for use by the generator routines G05YJF
must not be altered in any way between initialization and calls of the generator routines.
- 4: LIREF – INTEGERInput
: the dimension of the array IREF
as declared in the (sub)program from which G05YLF is called.
- if , or , ;
- if , .
- 5: ISKIP – INTEGERInput
: the number of terms of the sequence to skip on initialization for the Sobol and Niederreiter generators. If
if , or , .
- 6: IFAIL – INTEGERInput/Output
must be set to
. If you are unfamiliar with this parameter you should refer to Section 3.3
in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is
. When the value is used it is essential to test the value of IFAIL on exit.
unless the routine detects an error or a warning has been flagged (see Section 6
6 Error Indicators and Warnings
If on entry
, explanatory error messages are output on the current error message unit (as defined by X04AAF
Errors or warnings detected by the routine:
|or||IDIM is too large.|
On entry, LIREF
is too small.
The value of
is too large.
The primitive polynomials and direction numbers used for the Sobol generator (
) were calculated by Joe and Kuo (2008)
using the search critera