The routine may be called by the names g05ylf or nagf_rand_quasi_init.
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,g05ykforg05ymf.
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. Software14(1) 88–100
Fox B L (1986) Algorithm 647: implementation and relative efficiency of quasirandom sequence generators ACM Trans. Math. Software12(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: – IntegerInput
On entry: must identify the quasi-random generator to use.
Sobol (A659) generator.
, , or .
2: – IntegerInput
On entry: the number of dimensions required.
if , ;
if , ;
if , ;
if , .
3: – Integer arrayCommunication Array
On exit: contains initialization information for use by the generator routines g05yjf,g05ykfandg05ymf. iref must not be altered in any way between initialization and calls of the generator routines.
4: – IntegerInput
On entry: the dimension of the array iref as declared in the (sub)program from which g05ylf is called.
if , or , ;
if , .
5: – IntegerInput
On entry: the number of terms of the sequence to skip on initialization for the Sobol and Niederreiter generators. If , iskip is ignored.
if , or , .
6: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
On entry, .
Constraint: , , or .
On entry, .
On entry, liref is too small: , minimum length is .
On entry, or iskip is too large: , maximum value is .
An unexpected error has been triggered by this routine. Please
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
8Parallelism and Performance
g05ylf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.
The primitive polynomials and direction numbers used for the Sobol generator () were calculated by Joe and Kuo (2008) using the search critera .