Symbolic Euclidean scalar product binary operation for LazyTensor
objects.
Details
If x
or y
is a LazyTensor
, x|y
returns a
LazyTensor
that encodes, symbolically, the Euclidean scalar product between
x
and y
, which must have the same shape. (In case one of the arguments is
a vector or a scalar, it is first converted to LazyTensor
).
Note: x
and y
input arguments should have the same inner dimension.
Examples
if (FALSE) {
x <- matrix(runif(150 * 3), 150, 3) # arbitrary R matrix, 150 rows, 3 columns
y <- matrix(runif(250 * 3), 250, 3) # arbitrary R matrix, 250 rows, 3 columns
x_i <- LazyTensor(x, index = 'i') # creating LazyTensor from matrix x,
# indexed by 'i'
y_j <- LazyTensor(y, index = 'j') # creating LazyTensor from matrix y,
# indexed by 'j'
x_sp_y <- x_i | y_j # symbolic matrix
}