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

# orthogonalize

## PURPOSE

ORTHOGONALIZE Orthogonalize TT/MPS Block-mu tensor.

## SYNOPSIS

function res = orthogonalize( x )

## DESCRIPTION

```ORTHOGONALIZE Orthogonalize TT/MPS Block-mu tensor.
X = ORTHOGONALIZE( X ) orthogonalizes all cores of the TTeMPS_block tensor X
except the supercore at position X.MU. Cores 1...X.MU-1 are left-, cores X.MU+1...end
are right-orthogonalized.```

## CROSS-REFERENCE INFORMATION

This function calls:
• orthogonalize ORTHOGONALIZE Orthogonalize tensor.
• orthogonalize ORTHOGONALIZE Orthogonalize TT/MPS Block-mu tensor.
• orthogonalize Orthonormalizes a basis of tangent vectors in the Manopt framework.
This function is called by:

## SOURCE CODE

```0001 function res = orthogonalize( x )
0002     %ORTHOGONALIZE Orthogonalize TT/MPS Block-mu tensor.
0003     %   X = ORTHOGONALIZE( X ) orthogonalizes all cores of the TTeMPS_block tensor X
0004     %   except the supercore at position X.MU. Cores 1...X.MU-1 are left-, cores X.MU+1...end
0005     %   are right-orthogonalized.
0006
0007     %   TTeMPS Toolbox.
0008     %   Michael Steinlechner, 2013-2016
0009     %   Questions and contact: michael.steinlechner@epfl.ch
0010     %   BSD 2-clause license, see LICENSE.txt
0011
0012
0013     y = TTeMPS_block_to_TTeMPS( x );
0014     yorth = orthogonalize(y, x.mu );
0015     res = TTeMPS_block.TTeMPS_to_TTeMPS_block( yorth, x.mu, x.p );
0016
0017     %tmp = permute( y.U{mu}, [1 2 4 3] );
0018     %tmp = reshape( tmp, [x.rank(mu), x.size(mu)*x.p, x.rank(mu+1)];
0019
0020     %X = TTeMPS({x.U{1:mu-1}, tmp, x.U{1:mu+1} );
0021
0022
0023
0024     % left orthogonalization till x.mu (from left)
0025     %for i = 1:x.mu-1
0026     %    [Q,R] = qr( unfold( x.U{i}, 'left' ), 0);
0027     %    x.U{pos} = reshape( Q, [x.rank(pos), x.size(pos), size(Q,2)] );
0028     %    if apply
0029     %        x.U{pos+1} = tensorprod_ttemps( x.U{pos+1}, R, 1);
0030     %    end
0031     %end
0032
0033     %% right orthogonalization till x.mu (from right)
0034     %for i = x.order:-1:x.mu+1
0035     %
0036     %end
0037
0038 end
0039```

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