Learn R Programming

rkeops (version 2.2.2)

Mod.LazyTensor: Element-wise complex modulus (absolute value)

Description

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

Usage

# S3 method for LazyTensor
Mod(z)

# S3 method for ComplexLazyTensor Mod(z)

Value

An object of class ComplexLazyTensor.

Arguments

z

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

Author

Chloe Serre-Combe, Amelie Vernay

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

Examples

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

Run the code above in your browser using DataLab