pl_me_llt — Moreau envelope, LLT algorithm
M = pl_me_llt(X,f,S,fusionopt)
column vector. A grid of points on which the function is sampled.
column vector. The value of the function on the grid X: usually f(i)=fu(X(i)) for some function fu.
column vector. The grid on which we want to compute the conjugate: f* is evaluated on S.
Optional. integer. Select the implementation of the fusion algorithm. fusionopt=1 (or omitted) selects fusionsci, a fast implementation using scilab syntax but with nonlinear complexity. Any over value selects the fusion implementation, a (slower) loop-based implementation that runs in linear-time.
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), i.e.
2 M(j) = min f(i) + || s(j) - x(i) ||. i
It reduces computation to computing the Legendre conjugate through the formula
2 2 M(j) = s(j) - 2 g*(j) with g*(j) = max [ s(j) * x(i) - 1/2 * (x(i) + f(i)) ] i
thereby resulting in a theta(n + m) linear-time algorithm with n=length(X)=length(f) and m=length(S).
</listitem>