Skip to contents

Euclidean scalar product symbolic binary operation for LazyTensor objects, i.e. \(\langle x, y\rangle\), or default element-wise logical "or" for other types, i.e. x OR y.

Usage

x | y

Arguments

x, y

input for |.default() or |.LazyTensor().

Value

See value of |.default() or |.LazyTensor().

Details

If x or y is a LazyTensor, see |.LazyTensor(), else see |.default().

Examples

if (FALSE) {
# R base element-wise logical or operation
TRUE | FALSE
x <- 1:10
(x < 2) | (x > 8)
# LazyTensor symbolic scalar product operation
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
}