26_MatrixArray: Matrix Arrays

Description Usage Arguments Value See Also Examples

Description

A MatrixArray is a subclass of ObjectArray.
These represent a (currently one dimensional) array of matrices.

The package provides binary operators to apply matrix multiplication over the entire array.

NOTE:
INTERNAL STRUCTURE OF OBJECTS IS SUBJECT TO CHANGE.
DO NOT USE SLOTS, DIRECTLY.

Usage

1
2
MatrixArray (n, ..., NR, NC, conform=TRUE, default.value=ZERO)
as.MatrixArray (v, ..., n, NR, NC, conform=TRUE)

Arguments

n

Integer, the length
Currently, the top-level object is constrained to one dimension.

v

A suitable object.
Such as a list of matrices.

NR, NC

Currently, these need to be set to NA.

conform

Logical, if true, submatrices are required to have conformable dimensions.

default.value

The default value.

...

Ignored.

Value

A MatrixArray object.

See Also

ObjectArray

NestMatrix, GeomArray

Binary Operators

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
v <- MatrixArray (2, NR=NA, NC=NA)
v [[1]] <- matrix (1:4, 2, 2)
v [[2]] <- matrix (5:8, 2, 2)
v

t <- diag (c (2, 2) )
u <- t 

u
u [[1]]
u [[2]]

vectools documentation built on June 7, 2021, 9:08 a.m.