ttclass/sum.m

From Spinach Documentation Wiki
Revision as of 17:53, 5 June 2026 by Kuprov (talk | contribs) (Rename Arguments section heading to Parameters)
Jump to: navigation, search

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

Syntax

    answer=sum(ttrain,dim)

Parameters

    ttrain - tensor train object representing
             a matrix

    dim    - summation dimension, 1 or 2

Outputs

    answer - tensor train or flat representation
             of the summation result

See also

ttclass.m, ttclass/mean.m, ttclass/trace.m, Tensor train functions

Version 2.1, authors: Dmitry Savostyanov, Ilya Kuprov