Skip to content

Commit c2ec784

Browse files
committedMar 21, 2014
source edits
1 parent ccab46d commit c2ec784

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed
 

‎_posts/2014-03-21-simple-array-class.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ partial model matrices where the entries in the vector `X%*%theta` (with
2828
`nd*...*n2*n1` entries) are the same as the entries in the array with
2929
dimension `c(n1, n2, ..., nd)` returned by `RH(Xd, ... , RH(X2, RH(X1,
3030
Theta))...)`.
31-
`Theta` is an array with dimensions `c(c1, c2, ..., cd)` containing `theta` and `RH(X, A)` -- the "rotated H-transform" -- is an operation generalizing transposed pre-multiplication `t(X %*% A)` of a matrix `A` by a matrix `X` to the case of higher dimensional array-valued `A`.
31+
`Theta` is an array with dimensions `c(c1, c2, ..., cd)` containing `theta`
32+
and `RH(X, A)` -- the "rotated H-transform" -- is an operation generalizing
33+
transposed pre-multiplication `t(X %*% A)` of a matrix `A` by a matrix `X` to
34+
the case of higher dimensional array-valued `A`.
3235

3336
The code below implements a simple array class for numeric arrays and the
3437
rotated H-transform in `RcppArmadillo` and compares the performance to both
@@ -280,7 +283,7 @@ benchmark(
280283

281284
<pre class="output">
282285
test elapsed relative
283-
1 array(X %*% theta_vec, dim = c(n1, n2, n3)) 27.159 198.241
286+
1 array(X %*% theta_vec, dim = c(n1, n2, n3)) 27.252 198.920
284287
3 Reduce(RH, list(X3, X2, X1), Theta, TRUE) 0.137 1.000
285288
2 Reduce(RH_r, list(X3, X2, X1), Theta, TRUE) 0.325 2.372
286289
</pre>

‎src/2014-03-21-simple-array-class.Rmd

+4-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ partial model matrices where the entries in the vector `X%*%theta` (with
2626
`nd*...*n2*n1` entries) are the same as the entries in the array with
2727
dimension `c(n1, n2, ..., nd)` returned by `RH(Xd, ... , RH(X2, RH(X1,
2828
Theta))...)`.
29-
`Theta` is an array with dimensions `c(c1, c2, ..., cd)` containing `theta` and `RH(X, A)` -- the "rotated H-transform" -- is an operation generalizing transposed pre-multiplication `t(X %*% A)` of a matrix `A` by a matrix `X` to the case of higher dimensional array-valued `A`.
29+
`Theta` is an array with dimensions `c(c1, c2, ..., cd)` containing `theta`
30+
and `RH(X, A)` -- the "rotated H-transform" -- is an operation generalizing
31+
transposed pre-multiplication `t(X %*% A)` of a matrix `A` by a matrix `X` to
32+
the case of higher dimensional array-valued `A`.
3033

3134
The code below implements a simple array class for numeric arrays and the
3235
rotated H-transform in `RcppArmadillo` and compares the performance to both

0 commit comments

Comments
 (0)
Please sign in to comment.