Ttclass/sum.m

From Spinach Documentation Wiki
Revision as of 14:04, 5 April 2026 by Kuprov (talk | contribs) (Sync syntax/arguments/outputs with current Spinach source)
Jump to: navigation, search

Sum of elements of a tensor train representation of a matrix. Syntax:


    answer=sum(ttrain,dim)

The sum is taken along the specified dimension (dim=1 or dim=2).