Skip to contents

Symbolic operation for element-wise "imaginary to complex".

Usage

imag2complex(x)

# S3 method for LazyTensor
imag2complex(x)

# S3 method for ComplexLazyTensor
imag2complex(x)

Arguments

x

a LazyTensor.

Value

An object of class ComplexLazyTensor.

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.

Author

Chloe Serre-Combe, Amelie Vernay

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
}