kronecker.seq: A sequence of kronecker products

Description Usage Arguments Value Examples

View source: R/kronecker.seq.R

Description

A sequence of kronecker products

Usage

1
2
3
4
5
6
7
kronecker.seq(X, FUN = "*", make.dimnames = FALSE, ...)

kronecker_seq(X, FUN = "*", make.dimnames = FALSE, ...)

kroneckerSeq(X, FUN = "*", make.dimnames = FALSE, ...)

KroneckerSeq(X, FUN = "*", make.dimnames = FALSE, ...)

Arguments

X

A list of numeric matrices or arrays

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

A matrix or array

Examples

1
2
3
4
5
6
7
x1 = matrix(rnorm(16), nrow = 4)
x2 = matrix(rnorm(25), nrow = 5)
x3 = matrix(rnorm(36), nrow = 6)
x4 = matrix(rnorm(49), nrow = 7)
p1 = x1 %x% x2 %x% x3 %x% x4
p2 = kronecker.seq(list(x1, x2, x3, x4))
all.equal(p1, p2)

hero documentation built on Jan. 25, 2020, 1:07 a.m.