Skip to contents

Symbolic element-wise complex modulus (absolute value) operation for ComplexLazyTensor objects.

Usage

# S3 method for LazyTensor
Mod(z)

# S3 method for ComplexLazyTensor
Mod(z)

Arguments

z

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

Value

An object of class ComplexLazyTensor.

Details

If z is a ComplexLazyTensor, Mod(z) returns a ComplexLazyTensor that encodes, symbolically, the element-wise conjugate of complex z.

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

Warning: Do not confuse with mod().

See also

Author

Chloe Serre-Combe, Amelie Vernay

Examples

if (FALSE) {
z <- matrix(1i^ (-6:5), nrow = 4)                     # complex 4x3 matrix
z_i <- LazyTensor(z, index = 'i', is_complex = TRUE)  # ComplexLazyTensor
Mod_z_i <- Mod(z_i)                                   # symbolic matrix
}