Skip to contents

Symbolic element-wise exponential operation for LazyTensor objects.

Usage

# S3 method for LazyTensor
exp(x)

# S3 method for ComplexLazyTensor
exp(x)

Arguments

x

a LazyTensor, a ComplexLazyTensor, a vector of numeric values, or a scalar value.

Value

An object of class LazyTensor or ComplexLazyTensor depending on input.

Details

Different use cases:

  • If x is a LazyTensor, exp(x) returns a LazyTensor that encodes, symbolically, the element-wise exponential of x, i.e. \(e^x\).

  • If x is a ComplexLazyTensor, exp(x) returns a LazyTensor that encodes, symbolically, the element-wise complex exponential of x

See also

Author

Chloe Serre-Combe, Amelie Vernay

Examples

if (FALSE) {
# basic example
x <- matrix(runif(150 * 3), 150, 3) # arbitrary R matrix, 150 rows, 3 columns
x_i <- LazyTensor(x, index = 'i')   # creating LazyTensor from matrix x, 
                                    # indexed by 'i'
Exp_x <- exp(x_i)                   # symbolic matrix, 150 rows and 3 columns

# basic example with complex exponential
z <- matrix(1i^ (-6:5), nrow = 4)        # create a complex 4x3 matrix
z_i <- LazyTensor(z, index = 'i', is_complex = TRUE) # create a ComplexLazyTensor
Exp_z_i <- exp(z_i)                                  # symbolic matrix
}