Home > manopt > tools > orthogonalizetwice.m

orthogonalizetwice

PURPOSE ^

Orthonormalizes a basis of tangent vectors twice for increased accuracy.

SYNOPSIS ^

function [Q, R] = orthogonalizetwice(M, x, A)

DESCRIPTION ^

 Orthonormalizes a basis of tangent vectors twice for increased accuracy.

 function [orthobasis, R] = orthogonalizetwice(M, x, basis)

 See help for orthogonalize. This function calls that algorithm twice.
 This is useful if elements in the input basis are close to being linearly
 dependent (ill conditioned). See in code for details.

 See also: orthogonalize grammatrix tangentorthobasis

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [Q, R] = orthogonalizetwice(M, x, A)
0002 % Orthonormalizes a basis of tangent vectors twice for increased accuracy.
0003 %
0004 % function [orthobasis, R] = orthogonalizetwice(M, x, basis)
0005 %
0006 % See help for orthogonalize. This function calls that algorithm twice.
0007 % This is useful if elements in the input basis are close to being linearly
0008 % dependent (ill conditioned). See in code for details.
0009 %
0010 % See also: orthogonalize grammatrix tangentorthobasis
0011 
0012 % This file is part of Manopt: www.manopt.org.
0013 % Original author: Nicolas Boumal, Oct. 5, 2017.
0014 % Contributors:
0015 % Change log:
0016 
0017     [Q1, R1] = orthogonalize(M, x, A);
0018     [Q , R2] = orthogonalize(M, x, Q1);
0019 
0020     R = R2*R1; % This is upper triangular since R1 and R2 are.
0021 
0022 end

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