Learn R Programming

rkeops (version 2.2.2)

check_inner_dim: Check inner dimensions for binary or ternary operations.

Description

Verifies that the inner dimensions of two or three given LazyTensor are the same.

Usage

check_inner_dim(x, y, z = NA, check_type = "sameor1")

Value

A boolean TRUE or FALSE.

Arguments

x

A LazyTensor or a ComplexLazyTensor.

y

A LazyTensor or a ComplexLazyTensor.

z

A LazyTensor or a ComplexLazyTensor (optional, default = NA).

check_type

A character string among "same" and "sameor1" (default), to specify the desired type of inner dimension verification (see @details section).

Author

Chloe Serre-Combe, Amelie Vernay

Details

If x and y are of class LazyTensor or ComplexLazyTensor, check_inner_dim(x, y, check_type = "same") returns TRUE if x and y inner dimensions are the same, and FALSE otherwise, while check_inner_dim(x, y, check_type = "sameor1") returns TRUE if x and y inner dimensions are the same or if at least one of these equals 1, and FALSE otherwise. Same idea with a third input z.