Skip to contents

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

Usage

Mod(z)

Arguments

z

input for Mod.default() or Mod.LazyTensor().

Value

See value of Mod.default() or Mod.LazyTensor().

Details

If z is a LazyTensor, see Mod.LazyTensor(), else see Mod.default().

Warning: Do not confuse with mod().

Author

Chloe Serre-Combe, Amelie Vernay

Examples

if (FALSE) {
# R base operation
Mod(1)
Mod(1+1i)
# LazyTensor symbolic element-wise complex modulus (absolute value)
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
}