driftWn2D: Drift of the WN diffusion in 2D

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

Computes the drift of the WN diffusion in 2D in a vectorized way.

Usage

1
driftWn2D(x, A, mu, sigma, rho = 0, maxK = 2L, expTrc = 30)

Arguments

x

a matrix of dimension c(n, 2) containing angles. They all must be in [π,π) so that the truncated wrapping by maxK windings is able to capture periodicity.

A

drift matrix of size c(2, 2).

mu

a vector of length 2 giving the mean.

sigma

vector of length 2 containing the square root of the diagonal of Σ, the diffusion matrix.

rho

correlation coefficient of Σ.

maxK

maximum absolute value of the windings considered in the computation of the WN.

expTrc

truncation for exponential: exp(x) with x <= -expTrc is set to zero. Defaults to 30.

Value

A matrix of size c(n, 2) containing the drift evaluated at x.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
alpha <- 3:1
mu <- c(0, 0)
sigma <- 1:2
rho <- 0.5
Sigma <- diag(sigma^2)
Sigma[1, 2] <- Sigma[2, 1] <- rho * prod(sigma)
A <- alphaToA(alpha = alpha, sigma = sigma, rho = rho)
x <- rbind(c(0, 1), c(1, 0.1), c(pi, pi), c(-pi, -pi), c(pi / 2, 0))
driftWn2D(x = x, A = A, mu = mu, sigma = sigma, rho = rho)
driftWn(x = x, A = A, mu = c(0, 0), Sigma = Sigma)

sdetorus documentation built on Aug. 19, 2021, 9:06 a.m.

Related to driftWn2D in sdetorus...