frobenius_piece: Frobenius Norm of a rank-3 Matrix

View source: R/frobenius.R

frobenius_pieceR Documentation

Frobenius Norm of a rank-3 Matrix

Description

Calculates the Frobenius norm of a single sub-matrix of the difference of the Van Loan's permutations of a separable-plus-banded covariance, which must be at most rank 3, with left factors a1, b1 and 1, and right factors a2, b2, 1. Gram-Schmidt orthogonalization can be used to calculate the Frobenius norm of such a matrix of size K x K in only 3*K operations, where K is the dimension of the matrix.

Usage

frobenius_piece(a1, b1, a2, b2, beta)

Arguments

a1

left singular vector of the minuend

b1

right singular vector of the minuend

a2

left singular vector of the subtrahend

b2

left singular vector of the minuend

beta

corresponding to the constant matrix 1 otimes 1

Value

a number, the Frobenius norm

Examples

a1 <- runif(5)
b1 <- runif(10)
a2 <- runif(5)
b2 <- runif(10)
beta <- runif(1)
frobenius_piece(a1,b1,a2,b2,beta)

TMasak/surfcov documentation built on April 25, 2022, 12:15 a.m.