Skip to contents

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

Usage

# S3 method for LazyTensor
Re(z)

# S3 method for ComplexLazyTensor
Re(z)

Arguments

z

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

Value

An object of class ComplexLazyTensor.

Details

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

Note: Re(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
Re_z <- Re(z_i)                              # symbolic matrix
}