Difference between revisions of "Ttclass/hdot.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Sync syntax/arguments/outputs with current Spinach source)
(Normalise remaining wiki page to current Spinach source header)
Line 1: Line 1:
−
Hadamard matrix product. Useful as a replacement for trace(A'*B) because trace(A'*B)=hadm(conj(A),B) and the latter only needs O(n^2) multiplications as opposed to O(n^3) for trace(A'*B). Syntax:
+
{{DISPLAYTITLE:ttclass/hdot.m}} __NOTOC__
  
 +
Haramard dot product between two tensor train matrices.
  
 +
==Syntax==
  
−
    c=hdot(a,b)
+
c=hdot(a,b)
  
−
This function is also available for tensor train representations of matrices.
+
==Arguments==
 +
 
 +
a,b  - tensor train objects representing numerical
 +
          arrays of the same dimensions and having
 +
          the same internal topology
 +
 
 +
==Outputs==
 +
 
 +
c    - Hadamard product of a and b, a scalar
 +
 
 +
d.savostyanov@soton.ac.uk

Revision as of 15:13, 5 April 2026


Haramard dot product between two tensor train matrices.

Syntax

c=hdot(a,b)

Arguments

a,b  - tensor train objects representing numerical
          arrays of the same dimensions and having
          the same internal topology

Outputs

c    - Hadamard product of a and b, a scalar
d.savostyanov@soton.ac.uk