Home > manopt > autodiff > findA_anchors.m

findA_anchors

PURPOSE ^

Find the indices of the anchors for the anchoredrotationsfactory

SYNOPSIS ^

function A = findA_anchors(problem)

DESCRIPTION ^

 Find the indices of the anchors for the anchoredrotationsfactory

 function A = findA_anchors(problem)

 Returns the indices of the anchors for the rotation matrices manifold.

 See also: anchoredrotationsfactory

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function A = findA_anchors(problem)
0002 % Find the indices of the anchors for the anchoredrotationsfactory
0003 %
0004 % function A = findA_anchors(problem)
0005 %
0006 % Returns the indices of the anchors for the rotation matrices manifold.
0007 %
0008 % See also: anchoredrotationsfactory
0009 
0010 % This file is part of Manopt: www.manopt.org.
0011 % Original author: Xiaowen Jiang, Aug. 31, 2021.
0012 % Contributors: Nicolas Boumal
0013 % Change log:
0014 
0015     % check availability
0016     assert(isfield(problem,'M'),'problem structure must contain the field M.');
0017     problem_name = problem.M.name();
0018     % The manifold must be rotation matrices with anchors
0019     assert(contains(problem_name,'Product rotations manifold') &&..., 
0020             contains(problem_name,'anchors') &&...,
0021             ~startsWith(problem_name,'Product manifold'),['The manifold must '... 
0022             'be rotation matrices with anchors'])
0023     % find indices of the anchors
0024     indexA = strfind(problem_name,'indices ') + 8;
0025     A = str2double(problem_name(indexA));
0026     for i = indexA+3:3:length(problem_name)
0027         A = [A,str2double(problem_name(i))];
0028     end
0029 
0030 end

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