returns the multilevel Toeplitz matrix tt generated by the multi-dimensional input vector x in the QTT format The size of the input vector is 2^(d(1) + 1) x ... x 2^(d(D) + 1), The output matrix is square of order 2^d(1) x ... x 2^d(D). The (i_1,...i_D)-th component of x is not used if at least one of i_1,...,i_D is equal to 1 (e. g., in the one-dimensional case the first component of x is not used) April 20, 2011 Vladimir Kazeev vladimir.kazeev@gmail.com INM RAS Moscow, Russia %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% For details please see the preprint http://www.mis.mpg.de/publications/preprints/2011/prepr2011-36.html Vladimir A. Kazeev, Boris N. Khoromskij and Eugene E. Tyrtyshnikov Multilevel Toeplitz matrices generated by QTT tensor-structured vectors and convolution with logarithmic complexity January 12, 2012 Vladimir Kazeev, Seminar for Applied Mathematics, ETH Zurich vladimir.kazeev@sam.math.ethz.ch %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function [tt]=tt_qtoepl(x,d) 0002 0003 % returns the multilevel Toeplitz matrix tt generated by the multi-dimensional input vector x 0004 % in the QTT format 0005 % 0006 % The size of the input vector is 2^(d(1) + 1) x ... x 2^(d(D) + 1), 0007 % The output matrix is square of order 2^d(1) x ... x 2^d(D). 0008 % The (i_1,...i_D)-th component of x is not used if at least one of i_1,...,i_D is equal to 1 0009 % (e. g., in the one-dimensional case the first component of x is not used) 0010 % 0011 % April 20, 2011 0012 % Vladimir Kazeev 0013 % vladimir.kazeev@gmail.com 0014 % INM RAS 0015 % Moscow, Russia 0016 % 0017 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0018 % For details please see the preprint 0019 % http://www.mis.mpg.de/publications/preprints/2011/prepr2011-36.html 0020 % Vladimir A. Kazeev, Boris N. Khoromskij and Eugene E. Tyrtyshnikov 0021 % Multilevel Toeplitz matrices generated by QTT tensor-structured vectors and convolution with logarithmic complexity 0022 % January 12, 2012 0023 % Vladimir Kazeev, 0024 % Seminar for Applied Mathematics, ETH Zurich 0025 % vladimir.kazeev@sam.math.ethz.ch 0026 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0027 0028 D=numel(d); 0029 tt=tt_qshiftstack(d); 0030 0031 sz=[]; 0032 for K=1:D 0033 sz=[sz;4*ones(d(K),1),2*ones(d(K),1);1,2]; 0034 end 0035 0036 tt=tt_qreshape(tt,3,sz); 0037 0038 tt=tt_mv(tt,x); 0039 0040 tt1=cell(sum(d),1); 0041 ind=0; 0042 ind1=0; 0043 for K=1:D 0044 for k=1:d(K)-1 0045 tt1{ind1+k}=tt{ind+k}; 0046 end 0047 0048 p=size(tt{ind+d(K)},2); 0049 q=size(tt{ind+d(K)},3); 0050 r=size(tt{ind+d(K)+1},3); 0051 tt1{ind1+d(K)}=reshape(reshape(tt{ind+d(K)},[4*p,q])*reshape(tt{ind+d(K)+1},[q,r]),[4,p,r]); 0052 0053 ind=ind+d(K)+1; 0054 ind1=ind1+d(K); 0055 end 0056 tt=tt1; 0057 0058 tt=tt_qreshape(tt,1,2*ones(sum(d),2)); 0059 0060 return 0061 end