R: The matrix corresponding to a tensor seen as a linear mapping...
to.matrix.tensor
R Documentation
The matrix corresponding to a tensor seen as a linear mapping of tensors.
Description
A tensor can be seen as a linear mapping of a tensor to a tensor. This
function gives the corresponding matrix of the mapping.
Usage
to.matrix.tensor(X,i,j,by=NULL)
Arguments
X
The tensor
i
The image indices of the linear mapping
j
The domain indices of the linear mapping
by
the operation is done in parallel for these dimensions
Details
A tensor can be seen as a linear mapping of a tensor to a tensor. This
function computes the corresponding matrix, mapping the entries of the
domain tensor to the entries of the image tensor.
Value
if no by is given a matrix. Otherwise a tensor of level
2+length(dim(X))[by]
giving matrices for each specification of the by dimensions.