matrix.kronecker_eye: Creates a Kronecker product with an identity matrix.

View source: R/matrix.R

matrix.kronecker_eyeR Documentation

Creates a Kronecker product with an identity matrix.

Description

Creates a Kronecker product with an identity matrix.

Usage

matrix.kronecker_eye(mat, K = 1, n_threads = 1)

Arguments

mat

The matrix to view as a Kronecker product.

K

Dimension of the identity matrix (default is 1, which does essentially nothing).

n_threads

Number of threads.

Value

Kronecker product with identity matrix. If mat is n x p, the the resulting matrix will be nK x np. The object is an S4 class with methods for efficient computation by adelie.

Author(s)

James Yang, Trevor Hastie, and Balasubramanian Narasimhan
Maintainer: Trevor Hastie hastie@stanford.edu

Examples

n <- 100
p <- 20
K <- 2
mat <- matrix(rnorm(n * p), n, p)
out <- matrix.kronecker_eye(mat, K)
mat <- matrix.dense(mat)
out <- matrix.kronecker_eye(mat, K)

adelie documentation built on Sept. 11, 2024, 6:36 p.m.