direct_sum: Direct Sum of Matrices

Description Usage Arguments Details Value Author(s) Examples

View source: R/RcppExports.R

Description

Computes the direct sum of all matrices passed in via the list.

Usage

1

Arguments

x

list containing matrices

Details

Consider matrix A (mxn) and B (k x p). A direct sum is a diagonal matrix A (+) B with dimensions (m + k) x (n + p).

Value

ds_matrix matrix containing the direct sum in list.

Author(s)

James J Balamuta

Examples

1
2
3
4
5
6
7
8
x = list(matrix(0,nrow=5,ncol=3),
         matrix(1,nrow=5,ncol=3))
direct_sum(x)

x = list(matrix(rnorm(15),nrow=5,ncol=3),
         matrix(rnorm(30),nrow=5,ncol=6),
         matrix(rnorm(18),nrow=2,ncol=9))
direct_sum(x)

cIRT documentation built on May 29, 2017, 10:50 p.m.