returns a stack P of periodic shift matrices in the QTT format The size of the shift matrices matrices is N x N and the output is an N x N x N-tensor, where N=2^d(1) x ... x 2^d(end) 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_qshiftstack_p(d) 0002 0003 % returns a stack P of periodic shift matrices 0004 % in the QTT format 0005 % 0006 % The size of the shift matrices matrices is N x N 0007 % and the output is an N x N x N-tensor, 0008 % where N=2^d(1) x ... x 2^d(end) 0009 % 0010 % April 20, 2011 0011 % Vladimir Kazeev 0012 % vladimir.kazeev@gmail.com 0013 % INM RAS 0014 % Moscow, Russia 0015 % 0016 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0017 % For details please see the preprint 0018 % http://www.mis.mpg.de/publications/preprints/2011/prepr2011-36.html 0019 % Vladimir A. Kazeev, Boris N. Khoromskij and Eugene E. Tyrtyshnikov 0020 % Multilevel Toeplitz matrices generated by QTT tensor-structured vectors and convolution with logarithmic complexity 0021 % January 12, 2012 0022 % Vladimir Kazeev, 0023 % Seminar for Applied Mathematics, ETH Zurich 0024 % vladimir.kazeev@sam.math.ethz.ch 0025 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0026 0027 I=eye(2); 0028 J=[0,1;0,0]; 0029 O=zeros(2); 0030 P=J+J'; 0031 0032 D=numel(d); 0033 tt=cell(sum(d),1); 0034 ind=0; 0035 for K=1:D 0036 tt{ind+1}(:,:,1)=[I,P]; 0037 tt{ind+1}(:,:,2)=[P,I]; 0038 tt{ind+1}=permute(reshape(tt{ind+1},[2,2,2,2]),[1,2,4,3]); 0039 tt{ind+1}=permute(tt{ind+1},[1,2,3,5,4]); 0040 0041 for k=2:d(K)-1 0042 tt{ind+k}(:,:,1)=[I,J';O,J]; 0043 tt{ind+k}(:,:,2)=[J',O;J,I]; 0044 tt{ind+k}=permute(reshape(tt{ind+k},[2,2,2,2,2]),[1,3,5,2,4]); 0045 end 0046 0047 tt{ind+d(K)}(:,:,1)=[I;O]; 0048 tt{ind+d(K)}(:,:,2)=[J';J]; 0049 tt{ind+d(K)}=permute(reshape(tt{ind+d(K)},[2,2,2,2]),[1,3,4,2]); 0050 0051 ind=ind+d(K); 0052 end 0053 0054 tt{1}=permute(tt{1},[1,2,3,5,4]); 0055 0056 tt=tt_reverse(tt,3); 0057 0058 return 0059 end