if (FALSE) {
# Definition Model
Mod1<-setModel(drift=c("a1"), diffusion = matrix(c("s1"),1,1),
solve.variable = c("X"), time.variable = "s")
# In this example we define an integral of SDE such as
# \[
# I=\int^{t}_{0} b*exp(-a*(t-s))*(X_s-a1*s)dX_s
# \]
integ <- matrix("b*exp(-a*(t-s))*(X-a1*s)",1,1)
Integral <- setIntegral(yuima = Mod1,integrand = integ,
var.dx = "X", lower.var = "0", upper.var = "t",
out.var = "", nrow =1 ,ncol=1)
# Structure of slots
is(Integral)
# Function h in the above definition
Integral@Integral@Integrand@IntegrandList
# Dimension of Intgrand
Integral@Integral@Integrand@dimIntegrand
# all parameters are $\left(b,a,a1,s1\right)$
Integral@Integral@param.Integral@allparam
# the parameters in the integrand are $\left(b,a,a1\right)$ \newline
Integral@Integral@param.Integral@Integrandparam
# common parameters are $a1$
Integral@Integral@param.Integral@common
# integral variable dX_s
Integral@Integral@variable.Integral@var.dx
Integral@Integral@variable.Integral@var.time
# lower and upper vars
Integral@Integral@variable.Integral@lower.var
Integral@Integral@variable.Integral@upper.var
}
Run the code above in your browser using DataLab