Home > manopt > manifolds > ttfixedrank > TTeMPS_1.1 > @TTeMPS_block > disp.m

disp

PURPOSE ^

DISP Display TT/MPS block-mu tensor.

SYNOPSIS ^

function disp( x, name )

DESCRIPTION ^

DISP Display TT/MPS block-mu tensor. 
   disp(X) displays the TT/MPS block-mu tensor X as a tensor network.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function disp( x, name )
0002     %DISP Display TT/MPS block-mu tensor.
0003     %   disp(X) displays the TT/MPS block-mu tensor X as a tensor network.
0004 
0005     %   TTeMPS Toolbox.
0006     %   Michael Steinlechner, 2013-2016
0007     %   Questions and contact: michael.steinlechner@epfl.ch
0008     %   BSD 2-clause license, see LICENSE.txt
0009 
0010 
0011     if (nargin < 2 || ~ischar(name))
0012       name = inputname(1);
0013     end
0014     
0015     
0016     disp([name, ' is a TT/MPS block-', num2str(x.mu), ' (with block size ', num2str(x.p), ') tensor of order ', num2str(x.order), ...
0017                         ' with size (', num2str(x.size), ...
0018                         ') and ranks (', num2str(x.rank), ')']);
0019     disp('');
0020 
0021     row1 = '';
0022     row2 = '';
0023     row3 = '';
0024     row4 = '';
0025 
0026     for i=1:x.order
0027         if i == x.mu
0028             row1 = [row1, sprintf('      p=%i    ', x.p)];
0029         else
0030             row1 = [row1, '            '];
0031         end
0032         row2 = [row2, sprintf('%3i--(U%2i)--', x.rank(i), i)];
0033         row3 = [row3, '       |    '];
0034         row4 = [row4, sprintf('     %3i    ', x.size(i))];   
0035     end
0036     row2 = [row2, sprintf( '%3i', x.rank(end) )]; 
0037     disp(row1)
0038     disp(row2)
0039     disp(row3)
0040     disp(row4)
0041 
0042 end

Generated on Fri 30-Sep-2022 13:18:25 by m2html © 2005