Kronecker product of two QTT_Tuckers [C]=KRON(A,B) computes Kronecker product of A and B, where A and B are in the QTT-Tucker format 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 [c] = kron(a,b) 0002 %Kronecker product of two QTT_Tuckers 0003 % [C]=KRON(A,B) computes Kronecker product of A and B, where A and B are 0004 % in the QTT-Tucker format 0005 % 0006 % 0007 % TT-Toolbox 2.2, 2009-2012 0008 % 0009 %This is TT Toolbox, written by Ivan Oseledets et al. 0010 %Institute of Numerical Mathematics, Moscow, Russia 0011 %webpage: http://spring.inm.ras.ru/osel 0012 % 0013 %For all questions, bugs and suggestions please mail 0014 %ivan.oseledets@gmail.com 0015 %--------------------------- 0016 0017 if ( isempty(a) ) 0018 c=b; 0019 return 0020 elseif ( isempty(b) ) 0021 c=a; 0022 return 0023 end 0024 0025 c = qtt_tucker; 0026 c.dphys = a.dphys+b.dphys; 0027 c.tuck = cell(c.dphys, 1); 0028 c.core = kron(a.core, b.core); 0029 c.tuck(1:a.dphys) = a.tuck; 0030 c.tuck(a.dphys+1:c.dphys) = b.tuck; 0031 0032 end