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

orthogonalize

PURPOSE ^

ORTHOGONALIZE Orthogonalize tensor.

SYNOPSIS ^

function x = orthogonalize( x, pos )

DESCRIPTION ^

ORTHOGONALIZE Orthogonalize tensor.
   X = ORTHOGONALIZE( X, POS ) orthogonalizes all cores of the TTeMPS tensor X
   except the core at position POS. Cores 1...POS-1 are left-, cores POS+1...end
   are right-orthogonalized. Therefore,

   X = ORTHOGONALIZE( X, 1 ) right-orthogonalizes the full tensor,

   X = ORTHOGONALIZE( X, X.order ) left-orthogonalizes the full tensor.

   See also ORTH_AT.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function x = orthogonalize( x, pos )
0002     %ORTHOGONALIZE Orthogonalize tensor.
0003     %   X = ORTHOGONALIZE( X, POS ) orthogonalizes all cores of the TTeMPS tensor X
0004     %   except the core at position POS. Cores 1...POS-1 are left-, cores POS+1...end
0005     %   are right-orthogonalized. Therefore,
0006     %
0007     %   X = ORTHOGONALIZE( X, 1 ) right-orthogonalizes the full tensor,
0008     %
0009     %   X = ORTHOGONALIZE( X, X.order ) left-orthogonalizes the full tensor.
0010     %
0011     %   See also ORTH_AT.
0012     
0013     %   TTeMPS Toolbox.
0014     %   Michael Steinlechner, 2013-2014
0015     %   Questions and contact: michael.steinlechner@epfl.ch
0016     %   BSD 2-clause license, see LICENSE.txt
0017 
0018     % left orthogonalization till pos (from left)
0019     for i = 1:pos-1
0020         x = orth_at( x, i, 'left' );
0021     end
0022 
0023     % right orthogonalization till pos (from right)
0024     for i = x.order:-1:pos+1
0025         x = orth_at( x, i, 'right' );
0026     end
0027 end

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