marithops: Basic Matrix Arithmetic Operations.

Description Usage Arguments Author(s) Examples

Description

These perform basic matrix arithmetic on madness objects: matrix multiplication, cross product, Kronecker product.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
## S4 method for signature 'madness,madness'
x %*% y

## S4 method for signature 'madness,array'
x %*% y

## S4 method for signature 'array,madness'
x %*% y

## S4 method for signature 'madness,madness'
crossprod(x, y)

## S4 method for signature 'madness,ANY'
crossprod(x, y)

## S4 method for signature 'madness,missing'
crossprod(x, y)

## S4 method for signature 'ANY,madness'
crossprod(x, y)

## S4 method for signature 'madness,madness'
tcrossprod(x, y)

## S4 method for signature 'madness,ANY'
tcrossprod(x, y)

## S4 method for signature 'madness,missing'
tcrossprod(x, y)

## S4 method for signature 'ANY,madness'
tcrossprod(x, y)

Arguments

x, y

madness or numeric matrix values.

Author(s)

Steven E. Pav shabbychef@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
set.seed(123)
y <- array(rnorm(3*3),dim=c(3,3))
dy <- matrix(rnorm(length(y)*2),ncol=2)
dx <- crossprod(matrix(rnorm(ncol(dy)*100),nrow=100))
obj0 <- madness(val=y,vtag='y',xtag='x',dvdx=dy,varx=dx)
z <- array(rnorm(3*3),dim=c(3,3))

anobj <- obj0 %*% obj0
anobj <- z %*% obj0
anobj <- crossprod(obj0)
anobj <- crossprod(obj0,z)
anobj <- tcrossprod(obj0,obj0)
# NYI: 
# anobj <- obj0 %x% obj0

shabbychef/madness documentation built on April 11, 2021, 11:03 p.m.