naginterfaces.library.rand.quasi_​uniform_​bydim

naginterfaces.library.rand.quasi_uniform_bydim(n, fdim, ldim, comm, sorder=1)[source]

quasi_uniform_bydim generates a uniformly distributed low-discrepancy sequence as proposed by Sobol or Niederreiter. Values are generated for a subset of dimensions. It must be preceded by a call to one of the initialization functions quasi_init() or quasi_init_scrambled().

For full information please refer to the NAG Library document for g05yp

https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/g05/g05ypf.html

Parameters
nint

The number of quasi-random numbers required.

fdimint

The first dimension to return.

ldimint

The last dimension to return.

commdict, communication object, modified in place

Communication structure.

This argument must have been initialized by a prior call to quasi_init() or quasi_init_scrambled().

sorderint, optional

The order in which the generated values are returned.

Returns
quasfloat, ndarray, shape

Contains the quasi-random numbers for the required dimensions of a sequence with idim dimensions.

For , the th value for the th dimension is held in , where .

Raises
NagValueError
(errno )

On entry, .

Constraint: or .

(errno )

On entry, .

Constraint: .

(errno )

On entry, value of would result in too many calls to the generator: , generator has previously been called times.

(errno )

On entry, and .

Constraint:

(errno )

On entry, and .

Constraint:

(errno )

On entry, and .

Constraint: .

(errno )

On entry, [‘iref’] has either not been initialized or has been corrupted.

(errno )

On entry, [‘iref’] is too short to use with quasi_uniform_bydim.

(errno )

On entry, the specified dimensions are out of sync.

A different number of values have been generated from at least one of the specified dimensions.

(errno )

quasi_uniform_bydim can not be used with the Faure generator.

Notes

quasi_uniform_bydim generates a sequence of low discrepancy (quasi-random) values for a specified subset of dimensions. See the G05 Introduction for more details.

Prior to calling this function one of the initialization functions quasi_init() or quasi_init_scrambled() must be called and the type of sequence returned by quasi_uniform_bydim can include the low-discrepancy sequences proposed by Sobol or Niederreiter, depending on the arguments supplied to the initialization routine used. If the initialization function quasi_init_scrambled() was used then the returned sequence is scrambled (see Notes for quasi_init_scrambled for details).

References

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