Learn R Programming

MultiwayRegression (version 1.2)

ctprod: Compute the contracted tensor product between two multiway arrays.

Description

Computes the contracted tensor product between two multiway arrays.

Usage

ctprod(A,B,K)

Arguments

A

An array of dimension P_1 x ... x P_L x R_1 x ... x R_K.

B

An array of dimension R_1 x ... x R_K x Q_1 x ... x Q_M.

K

A positive integer, giving the number of modes to collapse.

Value

An array C of dimension P_1 x ... x P_L x Q_1 x ... x Q_M, given by the contracted tensor product of A and B.