All or individual TT-ranks of a TT-matrix [R]=RANK(A) Returns all (d+1) ranks of a TT-matrix A [R]=RANK(A,IND) Return the TT-rank with the index IND 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 ---------------------------
0001 function [r]=rank(a,varargin) 0002 %All or individual TT-ranks of a TT-matrix 0003 % [R]=RANK(A) Returns all (d+1) ranks of a TT-matrix A 0004 % 0005 % [R]=RANK(A,IND) Return the TT-rank with the index IND 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 if (nargin==1) 0018 r=a.tt.r; 0019 else 0020 i=varargin{1}; 0021 r=rank(a.tt,i); 0022 end 0023 return 0024 end