Symbolic element-wise "real to complex" operation.
Usage
real2complex(x)
# S3 method for LazyTensor
real2complex(x)
# S3 method for ComplexLazyTensor
real2complex(x)Details
real2complex(x) returns a ComplexLazyTensor that encodes,
symbolically, the element-wise "real to complex" transformation of x
(i.e. with additional zero imaginary part: x + 0*i).
Note: real2complex(x) will exit with an error if x is
a ComplexLazyTensor.
Examples
if (FALSE) {
x <- matrix(runif(150 * 3), 150, 3) # arbitrary R matrix, 150 rows, 3 columns
x_i <- LazyTensor(x, "i") # creating LazyTensor from matrix x,
# indexed by 'i'
z <- real2complex(x_i) # ComplexLazyTensor object
}