Learn R Programming

rkeops (version 2.2.2)

imaginary2complex: Element-wise "imaginary to complex" operation.

Description

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

Usage

imag2complex(x)

# S3 method for LazyTensor imag2complex(x)

# S3 method for ComplexLazyTensor imag2complex(x)

Value

An object of class ComplexLazyTensor.

Arguments

x

a LazyTensor.

Author

Chloe Serre-Combe, Amelie Vernay

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

Run this code
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
}

Run the code above in your browser using DataLab