TTeMPS_op_laplace_to_TTeMPS Convert to TT_op_laplace to TTeMPS_op format. See also TTeMPS_to_TT, TTeMPS_op_to_TT, TTeMPS_op_laplace_to_TTeMPS_op.
0001 function res = TTeMPS_op_laplace_to_TTeMPS_op( A ) 0002 %TTeMPS_op_laplace_to_TTeMPS Convert to TT_op_laplace to TTeMPS_op format. 0003 % 0004 % See also TTeMPS_to_TT, TTeMPS_op_to_TT, TTeMPS_op_laplace_to_TTeMPS_op. 0005 0006 % TTeMPS Toolbox. 0007 % Michael Steinlechner, 2013-2016 0008 % Questions and contact: michael.steinlechner@epfl.ch 0009 % BSD 2-clause license, see LICENSE.txt 0010 0011 C = cell(1, A.order); 0012 for i = 1:A.order 0013 % make a 4D tensor out of it again 0014 tmp = reshape( full(A.U{i}), [A.rank(i), A.rank(i+1), A.size_col(i), A.size_row(i)] ); 0015 % inverse permute the indices 0016 C{i} = ipermute( tmp, [1 4 2 3] ); 0017 end 0018 res = TTeMPS_op(C); 0019 end