Ttclass/hdot.m

From Spinach Documentation Wiki
Revision as of 12:31, 25 April 2026 by Kuprov (talk | contribs) (Normalise sequential blank lines)
Jump to: navigation, search

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.

See also

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