Description Usage Arguments Value Author(s) Examples
Tensor products of Matrices.
1 | build_tensor(x, ...)
|
x |
a matrix, or list of numeric matrices, build the tensor product |
... |
additional numeric matrices to build the tensor product |
A matrix
Peter DeWitt dewittpe@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 | # see vignette("cpr-pkg", package = "cpr") for details on tensor products.
A <- matrix(1:4, nrow = 10, ncol = 20)
B <- matrix(1:6, nrow = 10, ncol = 6)
# Two ways of building the same tensor product
tensor1 <- build_tensor(A, B)
tensor2 <- build_tensor(list(A, B))
all.equal(tensor1, tensor2)
# a three matrix tensor product
tensor3 <- build_tensor(A, B, B)
str(tensor3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.