Element-wise "imaginary to complex" operation.
Source:R/lazytensor_operations.R
imaginary2complex.Rd
Symbolic operation for element-wise "imaginary to complex".
Usage
imag2complex(x)
# S3 method for LazyTensor
imag2complex(x)
# S3 method for ComplexLazyTensor
imag2complex(x)
Details
imag2complex(x)
returns a ComplexLazyTensor
that encodes,
symbolically, the element-wise "imaginary to complex" transformation
of x
(i.e. with additional zero real part: 0 + x*i
).
Note: imag2complex(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 <- imag2complex(x_i) # ComplexLazyTensor object
}