kronecker | R Documentation |
Computes the generalised kronecker product of two arrays, X
and
Y
.
kronecker.spam(X, Y, FUN = "*", make.dimnames = FALSE, ...)
X |
sparse matrix of class |
Y |
sparse matrix of class |
FUN |
a function; it may be a quoted string. See details |
make.dimnames |
Provide dimnames that are the product of the dimnames of
|
... |
optional arguments to be passed to |
The sparsity structure is determined by the ordinary
%x%
. Hence, the result of kronecker(X, Y, FUN = "+")
is
different depending on the input.
An array A
with dimensions
dim(X) * dim(Y)
.
Reinhard Furrer
# Starting with non-spam objects, we get a spam matrix
kronecker.spam( diag(2), array(1:4, c(2, 2)))
kronecker( diag.spam(2), array(1:4, c(2, 2)))
# Notice the preservation of sparsity structure:
kronecker( diag.spam(2), array(1:4, c(2, 2)), FUN="+")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.