amprod returns the \(k\)-mode product of an array with a
matrix.
Usage
amprod(A, M, k)
Arguments
A
A real valued array.
M
A real matrix.
k
An integer. The mode along which M is to be
multiplied to A.
Value
An array whose \(k\)-mode unfolding is M %*%
mat(A,k).
Details
The \(k\)-mode product of a tensor \(A\) with a matrix \(M\)
results in a tensor whose \(k\)-mode unfolding is \(M\) times
the \(k\)-mode unfolding of \(A\). That is
mat(amprod(A,M,k)) = M %*% mat(A,k). More details of the
\(k\)-mode product can be found in
Kolda and
Bader (2009).