[Yuima-commits] r775 - pkg/yuima/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Dec 27 13:19:30 CET 2021


Author: phoenix844
Date: 2021-12-27 13:19:30 +0100 (Mon, 27 Dec 2021)
New Revision: 775

Modified:
   pkg/yuima/R/ae.R
Log:
Fixed calculus::: in ae.R

Modified: pkg/yuima/R/ae.R
===================================================================
--- pkg/yuima/R/ae.R	2021-12-26 19:15:31 UTC (rev 774)
+++ pkg/yuima/R/ae.R	2021-12-27 12:19:30 UTC (rev 775)
@@ -287,8 +287,8 @@
       paste0(AE$u,"^",nu, collapse = "*") %prod% array(calculus::wrap(c))
     })
     
-    if(is.null(dim(E))) E <- calculus:::cpp_collapse(E, ' + ')
-    else E <- apply(E, 1, function(x) calculus:::cpp_collapse(x, ' + ')) 
+    if(is.null(dim(E))) E <- cpp_collapse(E, ' + ')
+    else E <- apply(E, 1, function(x) cpp_collapse(x, ' + ')) 
     
     E <- array(E, dim = rep(AE$d, length(K)))
     
@@ -301,7 +301,7 @@
     martingale <- sprintf('exp(%s)', (calculus::wrap(1i*AE$Mu) %inner% AE$u) %sum% (-0.5 * AE$Sigma) %inner% (AE$u %outer% AE$u))
     
     if(m>0){
-      psi <- calculus:::cpp_collapse(paste0(AE$eps.var, "^", (1:m)) %prod% calculus::wrap(AE$P.m[1:m]), " + ")
+      psi <- cpp_collapse(paste0(AE$eps.var, "^", (1:m)) %prod% calculus::wrap(AE$P.m[1:m]), " + ")
       psi <- 1 %sum% psi
     }
     else {
@@ -781,7 +781,7 @@
         calculus::wrap((1i)^l) %prod% calculus::wrap((calculus::wrap(TVE(K = K)) %inner% AE$ul[[l]]))
       }))
       
-      expr <- (1/factorial(l)) %prod% calculus::wrap(calculus:::cpp_collapse(psi.m.l, ' + '))
+      expr <- (1/factorial(l)) %prod% calculus::wrap(cpp_collapse(psi.m.l, ' + '))
       AE$psi[[m]][[l]] <- calculus::taylor(expr, var = AE$u, order = m+2*l)$f
       
     }
@@ -788,7 +788,7 @@
     
   }
   
-  AE$P.m = sapply(AE$psi, function(p.m.l) calculus:::cpp_collapse(unlist(p.m.l), " + "))
+  AE$P.m = sapply(AE$psi, function(p.m.l) cpp_collapse(unlist(p.m.l), " + "))
   AE$c.gamma <- lapply(1:AE$m, function(m) {
     p <- calculus::taylor(AE$P.m[m], var = AE$u, order = 3*m)
     coef <- Re(p$terms$coef/(1i)^p$terms$degree)



More information about the Yuima-commits mailing list