Expands a tangent vector into an orthonormal basis in the Manopt framework vec = tangent2vec(M, x, basis, u) The inverse operation is lincomb (see below). M is a Manopt manifold structure obtained from a factory. x is a point on the manifold M. basis is a cell containing n orthonormal tangent vectors at x, forming an orthonormal basis of the tangent space at x. u is a tangent vector at x vec is a column vector of length n which contains the coefficients of the expansion of u into the basis. Thus: vec(k) = <basis{k}, u>_x <- vec = tangent2vec(M, x, basis, u) u = sum_{k=1}^n vec(k)*basis{k} <- u = lincomb(M, x, basis, vec) Note that tangent2vec is an isometry, that is, up to numerical round-off errors, with u and v two tangent vectors at x: M.inner(x, u, v) == uu'*vv, where uu = tangent2vec(M, x, basis, u), vv = tangent2vec(M, x, basis, v). See also: lincomb tangentorthobasis orthogonalize grammatrix hessianmatrix

- operator2matrix Forms a matrix representing a linear operator between two tangent spaces

0001 function vec = tangent2vec(M, x, basis, u) 0002 % Expands a tangent vector into an orthonormal basis in the Manopt framework 0003 % 0004 % vec = tangent2vec(M, x, basis, u) 0005 % 0006 % The inverse operation is lincomb (see below). 0007 % 0008 % M is a Manopt manifold structure obtained from a factory. 0009 % x is a point on the manifold M. 0010 % basis is a cell containing n orthonormal tangent vectors at x, forming an 0011 % orthonormal basis of the tangent space at x. 0012 % u is a tangent vector at x 0013 % 0014 % vec is a column vector of length n which contains the coefficients of the 0015 % expansion of u into the basis. Thus: 0016 % 0017 % vec(k) = <basis{k}, u>_x <- vec = tangent2vec(M, x, basis, u) 0018 % 0019 % u = sum_{k=1}^n vec(k)*basis{k} <- u = lincomb(M, x, basis, vec) 0020 % 0021 % Note that tangent2vec is an isometry, that is, up to numerical round-off 0022 % errors, with u and v two tangent vectors at x: 0023 % 0024 % M.inner(x, u, v) == uu'*vv, 0025 % 0026 % where uu = tangent2vec(M, x, basis, u), vv = tangent2vec(M, x, basis, v). 0027 % 0028 % See also: lincomb tangentorthobasis orthogonalize grammatrix hessianmatrix 0029 0030 % This file is part of Manopt: www.manopt.org. 0031 % Original author: Nicolas Boumal, Feb. 3, 2017. 0032 % Contributors: 0033 % Change log: 0034 0035 0036 n = numel(basis); 0037 0038 vec = zeros(n, 1); 0039 0040 for k = 1 : n 0041 0042 vec(k) = M.inner(x, basis{k}, u); 0043 0044 end 0045 0046 end

Generated on Sun 05-Sep-2021 17:57:00 by