Home > tt2 > core > tt_qshiftstack.m

tt_qshiftstack

PURPOSE ^

returns a stack S of non-periodic shift matrices

SYNOPSIS ^

function [tt]=tt_qshiftstack(d)

DESCRIPTION ^

 returns a stack S of non-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 2N-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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [tt]=tt_qshiftstack(d)
0002 
0003 % returns a stack S of non-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 2N-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 
0031 D=numel(d);
0032 tt=cell(sum(d)+D,1);
0033 ind=0;
0034 for K=1:D
0035     
0036     tt{ind+1}=zeros([1,1,2,2]);
0037     tt{ind+1}(1,1,2,1)=1;
0038     tt{ind+1}(1,1,1,2)=1;
0039     tt{ind+1}=permute(tt{ind+1},[1,2,3,5,4]);
0040 
0041     for k=2:d(K)
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}(:,:,1)=[I;O];
0048     tt{ind+d(K)+1}(:,:,2)=[J';J];
0049     tt{ind+d(K)+1}=permute(reshape(tt{ind+d(K)+1},[2,2,2,2]),[1,3,4,2]);
0050     
0051     ind=ind+d(K)+1;
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

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