Skip to contents

Symbolic element-wise clampint function (ternary operation) for LazyTensor objects.

Usage

clampint(x, y, z)

Arguments

x

A LazyTensor, a vector of numeric values, or a scalar value.

y

An integer.

z

An integer.

Value

An object of class LazyTensor.

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.

Author

Chloe Serre-Combe, Amelie Vernay

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)
}