MeatAxe  2.4
ztm - Tensor Multiply

Command Line

ztm [Options] A B Vectors Result 
Options
Standard options, see Standard Command Line Options.
-s Start
Start with the given seed vector number instead of 1.
A
Input file: Left factor (square matrix).
B
Input file: Right factor (square matrix).
Vectors
Input file: Vectors to be multiplied.
Result
Output file: Vectors.

Input Files

A
Left factor, m×m matrix.
B
Right factor, n×n matrix.
Vectors
Vectors to be multiplied, a r×(mn) matrix.

Output Files

Result
Vectors.

Description

This program reads two matrices from A and B, a list of vectors, and calculates the image of the vectors under A⊗B. A and B must be square matrices of dimension m and n, respetively This calculation could be done with the zte and zmu programs, but using ztm avoids the memory-consuming calculation of A⊗B.

Implementation Details

Let m, n be the dimensions of A and B, respectively. For each input vector v∊F1×mn, the program computes the m×n matrix $\hat{v}$ with

\[ \hat{v}_{ik} = v_{(i-1)n + k}\qquad (1\leq i\leq m,\ 1\leq k\leq n) \]

Then, v(A⊗B) can be computed by ordinary matrix operations:

\[ \widehat{v(A\otimes B)} = A^{tr}\cdot\hat{v}\cdot B \]

Both matrices and one vector must fit into memory at the same time.


MeatAxe 2.4 documentation, generated on Mon Jun 7 2021 11:42:24