Home > manopt > manifolds > ttfixedrank > TTeMPS_1.1 > @TTeMPS_block > norm.m

norm

PURPOSE ^

NORM Norm of a TT/MPS block-mu tensor.

SYNOPSIS ^

function res = norm( x )

DESCRIPTION ^

NORM Norm of a TT/MPS block-mu tensor.
   norm(X) computes the Frobenius norm of the TTeMPS_block tensor X.
   for each of the individual vectors 1 ... X.p seperately.
   Result is a column vector of norms with length X.p 

   See also INNERPROD

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function res = norm( x )
0002     %NORM Norm of a TT/MPS block-mu tensor.
0003     %   norm(X) computes the Frobenius norm of the TTeMPS_block tensor X.
0004     %   for each of the individual vectors 1 ... X.p seperately.
0005     %   Result is a column vector of norms with length X.p
0006     %
0007     %   See also INNERPROD
0008     
0009     %   TTeMPS Toolbox.
0010     %   Michael Steinlechner, 2013-2016
0011     %   Questions and contact: michael.steinlechner@epfl.ch
0012     %   BSD 2-clause license, see LICENSE.txt
0013 
0014     x = orthogonalize( x );
0015     block = x.U{x.mu};
0016 
0017     res = zeros(x.p,1);
0018     for i = 1:x.p
0019         tmp = block(:,:,:,i);
0020         res(i) = norm( tmp(:) );
0021     end
0022 
0023 end

Generated on Fri 30-Sep-2022 13:18:25 by m2html © 2005