Symbolic element-wise clampint function (ternary operation) for LazyTensor
objects.
Arguments
- x
A
LazyTensor
, a vector of numeric values, or a scalar value.- y
An
integer
.- z
An
integer
.
Details
clampint(x, y, z)
returns a LazyTensor
that encodes,
symbolically, the element-wise clamping of x
in (y, z)
which are
integers. See clamp()
for more details.
Broadcasting rules apply.
Examples
if (FALSE) {
# basic example
D <- 3
M <- 100
x <- matrix(runif(M * D), M, D)
x_i <- LazyTensor(x, index = 'i')
# call clampint function
clp_int <- clamp(x_i, 7, 2)
}