Skip to contents

Insert a given value (stored in a LazyTensor) in a symbolic vector of zeros.

Usage

elemT(x, m, n)

Arguments

x

a LazyTensor or a ComplexLazyTensor encoding a single parameter value.

m

an integer corresponding to the position m (starting from 0) of the created vector of zeros at which we want to insert the value x.

n

an integer corresponding to the length of the vector of zeros.

Value

a LazyTensor or a ComplexLazyTensor.

Details

elemT(x, m, n) insert scalar value x (encoded as a LazyTensor) at position m+1 in a vector of zeros of length n (encoded as a LazyTensor of inner dimension n).

Note: Input x should be a LazyTensor encoding a single parameter value.

IMPORTANT: IN THIS CASE, INDICES START AT ZERO, therefore, m should be in [0, n).

Author

Chloe Serre-Combe, Amelie Vernay

Examples

if (FALSE) {
# basic example
x <- 3.14              # arbitrary value
Pm_x <- LazyTensor(x)  # creating scalar parameter LazyTensor from x

m <- 2
n <- 3

elemT_x <- elemT(Pm_x, m, n)  # symbolic vector
}