
# Create a maxiteration or minimal change stopping 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.

### Matlab Documentation

1
2
3
4
5
6
7
8
9
10
11
12
13
% stopCritMaxIterEpsilonCreator(M,maxIter,epsilon) a maxIt minEps criterion
% based on a maximal number of iterations or a minimal max-norm change
%
% INPUT
%   M      : the manifold the data lives on
%  maxIter : the maximal number of iterations
%  epsilon : the maximal change within an iteration
%
% OUTPUT
%   fct : a functional @(x,xold,s,iter) suitable for both (sub) gradient
%           descent or cyclic proximal point
% ---
% MVIRT 1.1 | R. Bergmann | 2018-01-25