Symbolically applies opstr
operation to x
, y
and z
.
Arguments
- x
A
LazyTensor
, aComplexLazyTensor
, a vector of numeric values, or a scalar value.- y
A
LazyTensor
, aComplexLazyTensor
, a vector of numeric values, or a scalar value.- z
A
LazyTensor
, aComplexLazyTensor
r, a vector of numeric values, or a scalar value.- opstr
A text string corresponding to an operation.
- dim_check_type
A string to specify if, and how, we should check input dimensions. Supported values are:
"same"
:x
andy
should have the same inner dimension; -"sameor1"
(default):x
andy
should have the same inner dimension or at least one of them should be of dimension 1;NA
: no dimension restriction.
- dim_res
NA (default) or an integer corresponding to the inner dimension of the output
LazyTensor
. If NA, dim_res is set to the maximum between the inner dimensions of the three inputLazyTensor
s.
Examples
if (FALSE) {
# basic example
D <- 3
M <- 100
N <- 150
P <- 200
x <- matrix(runif(M * D), M, D)
y <- matrix(runif(N * D), N, D)
z <- matrix(runif(P * D), P, D)
x_i <- LazyTensor(x, index = 'i')
y_j <- LazyTensor(y, index = 'j')
z_i <- LazyTensor(z, index = 'i')
# symbolic matrix:
tern_xyz <- ternaryop.LazyTensor(x_i, y_j, z_i, "IfElse")
}