Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

arma_mult_cube_vec

Cube multiply over first dimension


Description

The result is transposed since that is what apply will give you

Usage

arma_mult_cube_vec(cub, v)

Arguments

cub

A cube (3D array)

v

A vector

Value

Transpose of multiplication over first dimension of cub time v

Examples

d1 <- 10
d2 <- 1e2
d3 <- 2e2
aa <- array(data = rnorm(d1*d2*d3), dim = c(d1, d2, d3))
bb <- rnorm(d3)
t1 <- apply(aa, 1, function(U) {U%*%bb})
t2 <- arma_mult_cube_vec(aa, bb)
dd <- t1 - t2

summary(dd)
image(dd)
table(dd)
# microbenchmark::microbenchmark(apply(aa, 1, function(U) {U%*%bb}),
#                                arma_mult_cube_vec(aa, bb))

GauPro

Gaussian Process Fitting

v0.2.4
GPL-3
Authors
Collin Erickson
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.