Skip to contents

Checks whether the given input is a LazyTensor encoding a vector or a single value.

Usage

is.LazyVector(x)

Arguments

x

A LazyTensor object that we want to know if it is a LazyVector.

Value

A boolean, TRUE or FALSE.

Details

If x is a vector parameter LazyTensor, is.LazyVector(x) returns TRUE, else, returns FALSE.

Author

Chloe Serre-Combe, Amelie Vernay

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.LazyVector
is.LazyVector(scal_LT) # returns TRUE
is.LazyVector(cplx_LT) # returns TRUE
is.LazyVector(v_LT) # returns TRUE
is.LazyVector(x_i) # returns FALSE
}