Add two matrices: ret = alpha*x + beta*y.

linalg_add(
  transx = FALSE,
  transy = FALSE,
  alpha = 1,
  beta = 1,
  x,
  y,
  ret = NULL
)

Arguments

transx, transy

Should x/y be transposed?

alpha, beta

Scalars.

x, y

Input data.

ret

Either NULL or an already allocated fml matrix of the same class and type as x.

Value

Returns the matrix sum.