forwardsolve.kron {telefit}R Documentation

Solves a triangular system with a Kronecker product structure

Description

Solves kron(A, B) x = y where A and B are lower triangular matrices.

Usage

forwardsolve.kron(A, B, y)

Arguments

A

an m x n matrix

B

an p x q matrix

y

an mp x s matrix

Value

x

Examples

set.seed(2018)

coord.s = matrix(runif(100), ncol=2)
coord.r = matrix(runif(50), ncol=2)

d.s = as.matrix(dist(coord.s))
d.r = as.matrix(dist(coord.r))

S1 = exp(-d.s)
S2 = exp(-d.r)

A = t(chol(S1))
B = t(chol(S2))

s = 15
  
x = matrix(runif(nrow(S1)*nrow(S2)*s), ncol=s)

y = kronecker(A,B) %*% x

x.solved = forwardsolve.kron(A, B, y)

max(abs(x - x.solved))

[Package telefit version 1.0.3 Index]