Difference between revisions of "Ttclass/hdot.m"

From Spinach Documentation Wiki
Jump to: navigation, search
m (Kuprov moved page Hdot.m to Ttclass/hdot.m)
(Sync syntax/arguments/outputs with current Spinach source)
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:  
 
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:  
  
−
                              H=hdot(A,B)
+
 
 +
    c=hdot(a,b)
  
 
This function is also available for tensor train representations of matrices.
 
This function is also available for tensor train representations of matrices.

Revision as of 15:04, 5 April 2026

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:


    c=hdot(a,b)

This function is also available for tensor train representations of matrices.