Difference between revisions of "Ttclass/vec.m"

From Spinach Documentation Wiki
Jump to: navigation, search
m (Kuprov moved page Vec.m to Ttclass/vec.m without leaving a redirect)
(Sync syntax/arguments/outputs with current Spinach source)
Line 2: Line 2:
 
ard (:) syntax is not available. Syntax:
 
ard (:) syntax is not available. Syntax:
  
−
                              A=vec(A)
+
 
−
+
    A=vec(A)
 
WARNING: for tensor trains this operation proceeds by stretching eve-
 
WARNING: for tensor trains this operation proceeds by stretching eve-
 
ry core of the tensor train. the result is not the same as
 
ry core of the tensor train. the result is not the same as

Revision as of 14:04, 5 April 2026

Stretches arrays into vectors - useful for situations when the stand- ard (:) syntax is not available. Syntax:


    A=vec(A)

WARNING: for tensor trains this operation proceeds by stretching eve- ry core of the tensor train. the result is not the same as column-wise matrix stretching (it is an element permutation away from it), but the resulting order of elements is consi- stent with tensor train Kronecker product operation output.