Learn R Programming

FieldSim (version 2.1)

hypersim: Random hyperbolo�d indexed field simulation by the mifieldsim method on visual grid

Description

The function hypersim yields discretization of sample path of a Gaussian hyperbolo�d indexed field following the procedure described in Brouste et al. (2009).

Usage

hypersim(R,Ne=100,Nr=100,Ng=100,nbNeighbor=4)

Arguments

R
a covariance function (defined on the hyperbolo�d) of a Random hyperbolo�d indexed field to simulate.
Ne
a positive integer. $\code{Ne}$ is the number of simulation points associated with the uniform distributed discretization of the hyperbolo�d for the first step of the algorithm (Accurate simulation step)
Nr
a positive integer. $\code{Nr}$ is the number of simulation points associated with the uniform distributed discretization of the sphere for the second step of the algorithm (Refined simulation step).
Ng
a positive integer. $\code{Nr}$ is the number of simulation points associated with the visual grid discretization of the hyperbolo�d for the third step of the algorithm (Visual refined simulation step).
nbNeighbor
a positive integer. nbNeighbor must be between 1 and 32. nbNeighbor is the number of neighbors to use in the second step of the algorithm.

Value

  • A list with the following components:
  • Xthe vector of length at more $\code{Ne}+\code{Nr}+\code{Nr}^2$ containing the discretization of the x axis.
  • Ythe vector of length at more $\code{Ne}+\code{Nr}+\code{Nr}^2$ containing the discretization of the y axis.
  • Zthe vector of length at more $\code{Ne}+\code{Nr}+\code{Nr}^2$ containing the discretization of the z axis.
  • Wthe vector of length at more $\code{Ne}+\code{Nr}+\code{Nr}^2$ containing the value of the simulated field at point (X[n],Y[n],Z[n])
  • W1the matrice of size $\code{Ng}^2$ that give values of the simulated hyperbolo�d indexed field at the points of the visual grid
  • timethe CPU time

encoding

latin1

Details

The function hypersim yields discretization of sample path of a Gaussian hyperbolo�d indexed field associated with the covariance function given by R.

References

A. Brouste, J. Istas and S. Lambert-Lacroix (2009). On simulation of manifold indexed fractional Gaussian fields.

See Also

hypersimgrid,fieldsim,spheresim.

Examples

Run this code
# Load FieldSim library
library(FieldSim)

d<-function(x){    #Distance on the hyperbolo�d
u <- -x[1]*x[4]-x[2]*x[5]+x[3]*x[6]
if (u<1){u<-1}
acosh(u)
}


#Example 1: Hyperbolo�d indexed Brownian fractional Field with RH1 covariance function

RH1<-function(x){
H<-0.45          # H can vary from 0 to 0.5
1/2*(d(c(0,0,1,x[1:3]))^{2*H}+d(c(0,0,1,x[4:6]))^{2*H}-d(x)^{2*H})
}

resh1<- hypersim(RH1,Ne=100,Nr=1000,Ng=50,nbNeighbor=4)

library(rgl)
library(RColorBrewer)
printhyper(resh1)

#Example 2: Hyperbolo�d indexed Brownian Field with RH4 covariance function

RH4<-function(x){
H<-0.45
1/(1+d(x)^{2*H})
}

resh4<- hypersim(RH4,Ne=100,Nr=1000,Ng=50,nbNeighbor=4)
printhyper(resh4)

Run the code above in your browser using DataLab