pl_me_pe — Moreau envelope, PE algorithm
M = pl_me_pe(x0,xn,f)
real number. Lower bound of the interval.
real number. Upper bound of the interval.
column vector. The value of the function on the grid X=(x0:h:xn)'; where n=length(f), and h=(xn-x0)/(n-1); so f(i)=fu(X(i)) for some function fu.
column vector. Contains the value of the Moreau envelope M of the function f evaluated on at the points S(j). In other words: M(j) = Min(||S(j) - X(i)||^2 + f(i) | over all indexes i)
Compute numerically the discrete Moreau envelope of a set of planar points (X(i),f(i)) at slopes S(j)=X(j), i.e.
2 M(j) = min f(i) + || s(j) - x(i) ||. i
It reduces computation to a 1,..,n grid with
2 2 2 M(j)= h * min [ ||j-i|| + f(x_0 + i * h) / h ] i
The algorithms runs in linear time Theta(n) with n=length(X)=length(f) by computing the lower parabolic envelope (PE).
</listitem>