if (FALSE) {
x <- matrix(runif(100 * 3), 100, 3) # arbitrary R matrix, 100 rows, 3 columns
y <- matrix(runif(100 * 3), 100, 3) # arbitrary R matrix, 100 rows, 3 columns
s <- matrix(runif(100 * 3), 100, 3) # arbitrary R matrix, 100 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'
s_i <- LazyTensor(s, index = 'i') # creating LazyTensor from matrix s,
# indexed by 'i'
wsqd_xy <- weightedsqdist(x_i, y_j, s_i) # symbolic matrix
}
Run the code above in your browser using DataLab