Merges two options structures with one having precedence over the other. function opts = mergeOptions(opts1, opts2) input: opts1 and opts2 are two structures. output: opts is a structure containing all fields of opts1 and opts2. Whenever a field is present in both opts1 and opts2, it is the value in opts2 that is kept. The typical usage is to have opts1 contain default options and opts2 contain user-specified options that overwrite the defaults. See also: getGlobalDefaults

- low_rank_dist_completion Perform low-rank distance matrix completion w/ automatic rank detection.
- conjugategradient Conjugate gradient minimization algorithm for Manopt.
- approxgradientFD Gradient approx. fnctn handle based on finite differences of the cost.
- approxhessianFD Hessian approx. fnctn handle based on finite differences of the gradient.
- linesearch Standard line-search algorithm (step size selection) for descent methods.
- linesearch_adaptive Adaptive line search algorithm (step size selection) for descent methods.
- linesearch_decrease Backtracking line-search aiming merely for a decrease in cost value.
- linesearch_hint Armijo line-search based on the line-search hint in the problem structure.
- neldermead Nelder Mead optimization algorithm for derivative-free minimization.
- preconhessiansolve Preconditioner based on the inverse Hessian, by solving linear systems.
- pso Particle swarm optimization (PSO) for derivative-free minimization.
- steepestdescent Steepest descent (gradient descent) minimization algorithm for Manopt.
- trustregions Riemannian trust-regions solver for optimization on manifolds.
- hessianextreme Compute an extreme eigenvector / eigenvalue of the Hessian of a problem.
- manoptsolve Gateway helper function to call a Manopt solver, chosen in the options.

0001 function opts = mergeOptions(opts1, opts2) 0002 % Merges two options structures with one having precedence over the other. 0003 % 0004 % function opts = mergeOptions(opts1, opts2) 0005 % 0006 % input: opts1 and opts2 are two structures. 0007 % output: opts is a structure containing all fields of opts1 and opts2. 0008 % Whenever a field is present in both opts1 and opts2, it is the value in 0009 % opts2 that is kept. 0010 % 0011 % The typical usage is to have opts1 contain default options and opts2 0012 % contain user-specified options that overwrite the defaults. 0013 % 0014 % See also: getGlobalDefaults 0015 0016 % This file is part of Manopt: www.manopt.org. 0017 % Original author: Nicolas Boumal, Dec. 30, 2012. 0018 % Contributors: 0019 % Change log: 0020 0021 0022 if isempty(opts1) 0023 opts1 = struct(); 0024 end 0025 if isempty(opts2) 0026 opts2 = struct(); 0027 end 0028 0029 opts = opts1; 0030 fields = fieldnames(opts2); 0031 for i = 1 : length(fields) 0032 opts.(fields{i}) = opts2.(fields{i}); 0033 end 0034 0035 end

Generated on Sat 12-Nov-2016 14:11:22 by