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

# The proximal map of the distance squared

Proximal map $\prox_{\lambda f}$ for the function $f\colon\M\to\R,\quad f(x) = d^2_{\M}(x,y)$ for some fixed value $y\in\M$. Following , let $\geo{x}{y}$ denote the geodesic starting in $\geo{x}{y}(0)=x$ and reaching $\geo{x}{y}(1)=y$ at time $1$. Then

If a data item $x$ contains a NaN it is set to the minimizer of the distance, i.e. initialized to the fixed item. Values can be kept unchanged by activating the optional FixedMask boolean array.

### Matlab Documentation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
% proxDistanceSquared(M,x,f,lambda) prox of f(x) = d^2(x,y), y fixed,
% and prox paramater lambda. The fixedMask can be used to fix values, i.e.
% they are kept unchanged by hard reset.
%
% INPUT
%    M    : a manifold
%  x,f  : data point( sets/columns ) on the maifold M
%  lambda : stepsize towards f
%
% OPTIONAL
% FixedMask : fix a certain subset of x
%
% OUTPUT
%       x : result point( sets) of the proximal map
%       w : indicator which terms where proxed, here: all
% ---
% Manifold-valued Image Restoration Toolbox 1.0 ~ R. Bergmann, 2014-10-19