Skip to contents

Symbolic element-wise complex imaginery part operation for ComplexLazyTensor objects.

Usage

# S3 method for LazyTensor
Im(z)

# S3 method for ComplexLazyTensor
Im(z)

Arguments

z

A ComplexLazyTensor or any type of values accepted by R default base::Im() function.

Value

An object of class ComplexLazyTensor.

Details

If z is a ComplexLazyTensor, Im(z) returns a ComplexLazyTensor that encodes, symbolically, the element-wise imaginary part of complex z.

Note: Im(z) will exit with an error if z is a LazyTensor but not a ComplexLazyTensor.

See also

Author

Chloe Serre-Combe, Amelie Vernay

Examples

if (FALSE) {
z <- matrix(2 + 1i^ (-6:5), nrow = 4)        # complex matrix
z_i <- LazyTensor(z, "i", is_complex = TRUE) # creating ComplexLazyTensor
Im_z <- Im(z_i)                              # symbolic matrix
}