Learn R Programming

salad (version 1.2)

matmult: 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 dual,numericOrArray %*%(x, y)

# S4 method for numericOrArray,dual %*%(x, y)

# S4 method for dual,dual %*%(x, y)

# S4 method for dual,dual crossprod(x, y)

# S4 method for dual,numericOrArray crossprod(x, y)

# S4 method for numericOrArray,dual crossprod(x, y)

# S4 method for dual,missing crossprod(x, y)

# S4 method for dual,dual tcrossprod(x, y)

# S4 method for dual,numericOrArray tcrossprod(x, y)

# S4 method for numericOrArray,dual tcrossprod(x, y)

# S4 method for dual,missing tcrossprod(x, y)

Value

A dual object.

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.

Examples

Run this code
x <- dual( matrix(c(0,1,3,1), 2, 2) )
y <- x %*% c(2,-2)
d(y, "x1.1")

Run the code above in your browser using DataLab