Tensor product for LazyTensor objects.
Details
If x and y are LazyTensor objects encoding matrices,
respectively of length nx*px and ny*py, then tensorprod(x, y) encodes,
symbolically, the tensor product between matrix x and y, which is
a symbolic matrix of dimension (nx*ny, px*py).
Examples
if (FALSE) {
x <- matrix(c(1, 2, 3), 2, 3) # arbitrary R matrix, 150 rows, 3 columns
x_i <- LazyTensor(x, index = 'i') # LazyTensor from matrix x, indexed by 'i'
y <- matrix(c(1, 1, 1), 2, 3) # arbitrary R matrix, 200 rows, 3 columns
y_i <- LazyTensor(y, index = 'i') # LazyTensor from matrix y, indexed by 'i'
tp_xy <- tensorprod(x_i, y_i) # symbolic (4, 9) matrix.
}