naginterfaces.library.rand.quasi_​lognormal_​bydim

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

quasi_lognormal_bydim generates a quasi-random sequence from a log-normal distribution. 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 g05yr

https://www.nag.com/numeric/nl/nagdoc_29.3/flhtml/g05/g05yrf.html

Parameters
nint

The number of quasi-random numbers required.

xmeanfloat, array-like, shape

Specifies, for each dimension, the mean of the underlying Normal distribution.

stdfloat, array-like, shape

Specifies, for each dimension, the standard deviation of the underlying Normal distribution.

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 , and , the th value for the th dimension is held in

, if ,

, if .

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, 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_lognormal_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_lognormal_bydim can not be used with the Faure generator.

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

quasi_lognormal_bydim generates a quasi-random sequence, for a specified subset of dimensions, from a log-normal distribution by first generating a uniform quasi-random sequence, for the specified subset of dimensions, 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 quasi_init_scrambled() was used then the underlying uniform sequence is first scrambled prior to being transformed (see Notes for quasi_init_scrambled for details).