Checks whether the given input is a LazyTensor
encoding
a single scalar value. That is, if the input is a fixed parameter
LazyTensor
of dimension 1.
Details
If x
is a fixed scalar parameter LazyTensor
,
is.LazyParameter(x)
returns TRUE, else, returns FALSE.
Examples
if (FALSE) {
# basic example
scal <- 3.14
cplx <- 2 + 3i
v <- rep(3, 10)
x <- matrix(runif(100 * 3), 100, 3)
# create LazyTensor and ComplexLazyTensor
scal_LT <- LazyTensor(scal)
cplx_LT <- LazyTensor(cplx)
v_LT <- LazyTensor(v)
x_i <- LazyTensor(x, index = 'i')
# call is.LazyParameter
is.LazyParameter(scal_LT) # returns TRUE
is.LazyParameter(cplx_LT) # returns FALSE
is.LazyParameter(v_LT) # returns FALSE
is.LazyParameter(x_i) # returns FALSE
}