Home > tt2 > core > tt_ranks.m

tt_ranks

PURPOSE ^

Compute all ranks of the TT-decomposition in TT1.0 format

SYNOPSIS ^

function [rks]=tt_ranks(tt)

DESCRIPTION ^

Compute all ranks of the TT-decomposition in TT1.0 format
   [RKS]=TT_RANKS(TT) Computes all ranks of TT decomposition in TT1.0
   format. Please avoid its usage: it will be removed in
   future releases. Use rank() from the object-oriented version.


 TT-Toolbox 2.2, 2009-2012

This is TT Toolbox, written by Ivan Oseledets et al.
Institute of Numerical Mathematics, Moscow, Russia
webpage: http://spring.inm.ras.ru/osel

For all questions, bugs and suggestions please mail
ivan.oseledets@gmail.com
---------------------------

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [rks]=tt_ranks(tt)
0002 %Compute all ranks of the TT-decomposition in TT1.0 format
0003 %   [RKS]=TT_RANKS(TT) Computes all ranks of TT decomposition in TT1.0
0004 %   format. Please avoid its usage: it will be removed in
0005 %   future releases. Use rank() from the object-oriented version.
0006 %
0007 %
0008 % TT-Toolbox 2.2, 2009-2012
0009 %
0010 %This is TT Toolbox, written by Ivan Oseledets et al.
0011 %Institute of Numerical Mathematics, Moscow, Russia
0012 %webpage: http://spring.inm.ras.ru/osel
0013 %
0014 %For all questions, bugs and suggestions please mail
0015 %ivan.oseledets@gmail.com
0016 %---------------------------
0017 
0018 d=size(tt,1);
0019 if ( d == 1 ) 
0020   rks=[];
0021   return
0022 end
0023 rks=zeros(d-1,1);
0024 rks(1)=size(tt{1},2);
0025 
0026 for i=2:d-2
0027   rks(i) = size(tt{i},3);
0028 end
0029 rks(d-1)=size(tt{d},2);
0030 return
0031 end

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