naginterfaces.library.rand.field_​fracbm_​generate¶

naginterfaces.library.rand.field_fracbm_generate(ns, s, xmax, h, lam, rho, statecomm)[source]

field_fracbm_generate produces realizations of a fractional Brownian motion, using the circulant embedding method. The square roots of the eigenvalues of the extended covariance matrix (or embedding matrix) need to be input, and can be calculated using field_1d_predef_setup().

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

https://support.nag.com/numeric/nl/nagdoc_30.1/flhtml/g05/g05ztf.html

Parameters
nsint

The number of steps (points) to be generated in realizations of the increments of the fractional Brownian motion. This must be the same value as supplied to field_1d_predef_setup() when calculating the eigenvalues of the embedding matrix.

Note: in the context of fractional Brownian motion, represents the number of steps from a zero starting state. Realizations returned in include this starting state and so values are returned for each realization.

sint

, the number of realizations of the fractional Brownian motion to simulate.

xmaxfloat

The upper bound for the interval over which the fractional Brownian motion is to be simulated, as input to field_1d_user_setup() or field_1d_predef_setup().

hfloat

The Hurst parameter, , for the fractional Brownian motion. This must be the same value as supplied to field_1d_predef_setup() in , when the eigenvalues of the embedding matrix were calculated.

lamfloat, array-like, shape

Contains the square roots of the eigenvalues of the embedding matrix, as returned by field_1d_user_setup() or field_1d_predef_setup().

rhofloat

Indicates the scaling of the covariance matrix, as returned by field_1d_user_setup() or field_1d_predef_setup().

statecommdict, RNG communication object, modified in place

RNG communication structure.

This argument must have been initialized by a prior call to init_repeat() or init_nonrepeat().

Returns
zfloat, ndarray, shape

Contains the realizations of the fractional Brownian motion, . The th realization, for the th point , is stored in , for , for .

xxfloat, ndarray, shape

The points at which values of the fractional Brownian motion are output. The first point is always zero, and the subsequent points represent the equispaced steps towards the last point, . Note that in field_1d_user_setup() and field_1d_predef_setup(), the returned sample points are the mid-points of the grid returned in here.

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, , and .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, at least one element of was negative.

Constraint: all elements of must be non-negative.

(errno )

On entry, .

Constraint: .

(errno )

On entry, [‘state’] vector has been corrupted or not initialized.

Notes

The functions field_1d_predef_setup() and field_fracbm_generate are used to simulate a fractional Brownian motion process with Hurst parameter over an interval , using a set of equally spaced points. Fractional Brownian motion itself cannot be simulated directly using this method, since it is not a stationary Gaussian random field; however its increments can be simulated like a stationary Gaussian random field. The circulant embedding method is described in the documentation for field_1d_predef_setup().

field_fracbm_generate takes the square roots of the eigenvalues of the embedding matrix as returned by field_1d_predef_setup() when , and its size , as input and outputs realizations of the fractional Brownian motion in .

One of the initialization functions init_repeat() (for a repeatable sequence if computed sequentially) or init_nonrepeat() (for a non-repeatable sequence) must be called prior to the first call to field_fracbm_generate.

References

Dietrich, C R and Newsam, G N, 1997, Fast and exact simulation of stationary Gaussian processes through circulant embedding of the covariance matrix, SIAM J. Sci. Comput. (18), 1088–1107

Schlather, M, 1999, Introduction to positive definite functions and to unconditional simulation of random fields, Technical Report ST 99–10, Lancaster University

Wood, A T A and Chan, G, 1994, Simulation of stationary Gaussian processes in , Journal of Computational and Graphical Statistics (3(4)), 409–432