$\DeclareMathOperator{\arccosh}{arccosh} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator{\Exp}{Exp} \newcommand{\geo}[2]{\gamma_{\overset{\frown}{#1,#2}}} \newcommand{\geoS}{\gamma} \newcommand{\geoD}[2]{\gamma_} \newcommand{\geoL}[2]{\gamma(#2; #1)} \newcommand{\gradM}{\nabla_{\M}} \newcommand{\gradMComp}[1]{\nabla_{\M,#1}} \newcommand{\Grid}{\mathcal G} \DeclareMathOperator{\Log}{Log} \newcommand{\M}{\mathcal M} \newcommand{\N}{\mathcal N} \newcommand{\mat}[1]{\mathbf{#1}} \DeclareMathOperator{\prox}{prox} \newcommand{\PT}[3]{\mathrm{PT}_{#1\to#2}#3} \newcommand{\R}{\mathbb R} \newcommand{\SPD}[1]{\mathcal{P}(#1)} \DeclareMathOperator{\Tr}{Tr} \newcommand{\tT}{\mathrm{T}} \newcommand{\vect}[1]{\mathbf{#1}}$

List of helper functions

create a debug functional for algorithms
1
% createDebugFct(M,F,modIter) - creates a debug functional for algorithms


For all algorithms, i.e. CPP, gradient, and subgradient can all call a debug function. This function returns a handle @8x,xold,iter) to display the function value $F(x^{(k)})$ of the current iterate, the current iterate $k$ as well as the last maximal change of $x^{(k)}$ and $x^{(k-1)}$.

Conditional display
1
% dispIf(condition,str) display string if condition is true.


Computes the remainder of a value $x\in\mathbb R$ in $\bigl[-\tfrac{T}{2},\frac{T}{2}\bigr)$, which is mostly used for phase data, i.e. the manifold $S^1$ and $T=2\pi$.

export points, curves and tangents on the sphere $\mathbb S^2$ to asymptote
1
% fileStr = exportSphereSignals2Asymptote(pts,curves,xi,colors)


Export arrays (sorted in cell arrays) of points, curves, and tangent vectors to Asymptote, where they are plotted on a sphere.

plot data on the Sphere $\mathbb S^2$
1
% plotS2 - plot a signal on the sphere


Plot a set of points on the sphere $\mathbb S^2$.

step size rule based on the Armijo rule
1
% stepSizeAsrmijo(M,F,x,descentDir) compute the step size by Armijo's rule


Determines a step size $s>0$ such that

where $\eta$ is a descent direction, e.g. $\eta = -\nabla F(x)$. where the search is performed by $s^\rho$, $% $ and $c>0$ is a constant.

more
Create a maxiteration or minimal change stopping criterion
1
% stopCritMaxIterEpsilonCreator(M,maxIter,epsilon) a maxIt minEps criterion


Given a manifold $\M$, a maximal number of iterates $K$ and a minimal change $\varepsilon$, this small helper returns a function handle suitable for $\M$-valued data $x\colon\Grid\to\M$ of any dimension that returns true when in the current iterate $k$

This criterion is evaluated after running the $k$th iteration and hence stops after $K$ iterations.

Compute the remainder in $\bigl[-\tfrac{T}{2},\frac{T}{2}\bigr)$
1
% symMod(v,T) compute the modulus with respect to [-T/2, T/2)


Computes the remainder of a value $x\in\mathbb R$ in $\bigl[-\tfrac{T}{2},\frac{T}{2}\bigr)$, which is mostly used for phase data, i.e. the manifold $S^1$ and $T=2\pi$.