Learn R Programming

rkeops (version 2.2.2)

atan2.LazyTensor: Element-wise 2-argument arc-tangent operation

Description

Symbolic element-wise 2-argument arc-tangent operation for LazyTensor objects.

Usage

# S3 method for LazyTensor
atan2(x, y)

Value

An object of class LazyTensor.

Arguments

x, y

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

Author

Chloe Serre-Combe, Amelie Vernay

Details

If x or y is a LazyTensor, atan2(x, y) returns a LazyTensor that encodes, symbolically, the element-wise 2-argument arc-tangent of x and y. i.e. atan2(x, y) == atan(x/y). (In case one of the arguments is a vector or a scalar, it is first converted to LazyTensor).

Note: x and y input arguments should have the same inner dimension.

See Also

Examples

Run this code
if (FALSE) {
x <- matrix(runif(150 * 3), 150, 3) # arbitrary R matrix, 150 rows, 3 columns
y <- matrix(runif(250 * 3), 250, 3) # arbitrary R matrix, 250 rows, 3 columns
x_i <- LazyTensor(x, index = 'i')   # creating LazyTensor from matrix x, 
                                    # indexed by 'i'
y_j <- LazyTensor(y, index = 'j')   # creating LazyTensor from matrix y, 
                                    # indexed by 'j'
Atan2_xy <- atan2(x_i, y_j)         # symbolic matrix
}

Run the code above in your browser using DataLab