kronecker-caracas_symbol-caracas_symbol-method: Kronecker product of two matrices

kronecker,caracas_symbol,caracas_symbol-methodR Documentation

Kronecker product of two matrices

Description

Computes the Kronecker product of two matrices.

Usage

## S4 method for signature 'caracas_symbol,caracas_symbol'
kronecker(X, Y, FUN = "*", make.dimnames = FALSE, ...)

Arguments

X, Y

matrices as caracas symbols.

FUN

a function; it may be a quoted string.

make.dimnames

Provide dimnames that are the product of the dimnames of ‘X’ and ‘Y’.

...

optional arguments to be passed to ‘FUN’.

Value

Kronecker product of A and B.

Examples

if (has_sympy()) {
  A <- matrix_sym(2, 2, "a")
  B <- matrix_sym(2, 2, "b")
  II <- matrix_sym_diag(2)
  EE <- eye_sym(2,2)
  JJ <- ones_sym(2,2)

  kronecker(A, B)
  kronecker(A, B, FUN = "+")
  kronecker(II, B)
  kronecker(EE, B)
  kronecker(JJ, B)
}


caracas documentation built on June 22, 2024, 10:59 a.m.