Home > tt2 > core > tt_effrank.m

tt_effrank

PURPOSE ^

Effective rank of the TT-tensor (correct memory definition)

SYNOPSIS ^

function [reff]=tt_effrank(tt,s)

DESCRIPTION ^

Effective rank of the TT-tensor (correct memory definition)
   [REFF]=TT_EFFRANK(TT,S)
 May 26, 2011
 Vladimir Kazeev
 vladimir.kazeev@gmail.com
 INM RAS
 Moscow, Russia

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [reff]=tt_effrank(tt,s)
0002 %Effective rank of the TT-tensor (correct memory definition)
0003 %   [REFF]=TT_EFFRANK(TT,S)
0004 % May 26, 2011
0005 % Vladimir Kazeev
0006 % vladimir.kazeev@gmail.com
0007 % INM RAS
0008 % Moscow, Russia
0009 
0010 d=size(tt,1);
0011 sz=tt_qsize(tt,s);
0012 n=prod(sz,2);
0013 mem=0;
0014 for k=1:d
0015     mem=mem+numel(tt{k});
0016 end
0017 a=sum(n(2:d-1));
0018 b=n(1)+n(d);
0019 reff=sqrt(mem/a+b^2/a^2/4)-b/a/2;
0020 
0021 return
0022 end

Generated on Wed 08-Feb-2012 18:20:24 by m2html © 2005