matmult {salad} | R Documentation |
Matrix Arithmetic
Description
Methods and functions for dual matrix arithmetic
Usage
matrixprod_dn(x, y)
matrixprod_nd(x, y)
matrixprod_dd(x, y)
## S4 method for signature 'dual,numericOrArray'
x %*% y
## S4 method for signature 'numericOrArray,dual'
x %*% y
## S4 method for signature 'dual,dual'
x %*% y
## S4 method for signature 'dual,dual'
crossprod(x, y)
## S4 method for signature 'dual,numericOrArray'
crossprod(x, y)
## S4 method for signature 'numericOrArray,dual'
crossprod(x, y)
## S4 method for signature 'dual,missing'
crossprod(x, y)
## S4 method for signature 'dual,dual'
tcrossprod(x, y)
## S4 method for signature 'dual,numericOrArray'
tcrossprod(x, y)
## S4 method for signature 'numericOrArray,dual'
tcrossprod(x, y)
## S4 method for signature 'dual,missing'
tcrossprod(x, y)
Arguments
x , y |
Dual or numeric matrices or vectors |
Details
All methods are the analog of the corresponding methods for matrices. The functions 'matrixprod_dd', 'matrixprod_nd' and 'matrixprod_dn' are for multiplication of two dual objects, of a numeric and a dual object, or of a dual and a numeric object, respectively. You may use these functions to save the method dispatching time.
Value
A dual object.
Examples
x <- dual( matrix(c(0,1,3,1), 2, 2) )
y <- x %*% c(2,-2)
d(y, "x1.1")
[Package salad version 1.0 Index]