Difference between revisions of "Ttclass/hdot.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Normalise sequential blank lines)
m (Update tensor-train hdot page from 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 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.
+
The inputs should be tensor train objects representing numerical arrays
 +
of the same dimensions and having the same internal topology. The output
 +
is the Hadamard product of the two tensor trains, returned as a scalar.
  
 
==See also==
 
==See also==
 
[[ttclass.m]], [[ttclass/dot.m]], [[hdot.m]], [[Tensor_train_module#Tensor_train_functions|Tensor train functions]]
 
[[ttclass.m]], [[ttclass/dot.m]], [[hdot.m]], [[Tensor_train_module#Tensor_train_functions|Tensor train functions]]

Revision as of 15:30, 5 June 2026

Hadamard dot product between two tensor train matrices. Syntax:

    c=hdot(a,b)

The inputs should be tensor train objects representing numerical arrays of the same dimensions and having the same internal topology. The output is the Hadamard product of the two tensor trains, returned as a scalar.

See also

ttclass.m, ttclass/dot.m, hdot.m, Tensor train functions