me_nep - Moreau envelope for convex functions, NEP algorithm
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 2 P(j) = Argmin f(i) + || s(j) - x(i) ||. iIt uses the non-expansiveness of the proximal (NEP) mapping P to run in linear time theta(n+m) with n=length(X)=length(f) and m=length(S).
The algorithm only returns correct result when the proximal mapping P is nonexpansive. Otherwise, the algorithms may return an incorrect result. Classes of functions f that have a nonexpansive proximal mapping include convex functions and prox-regular functions.
X=[-5:0.5:5]'; Y=X.^2; S=(Y(2:size(Y,1))-Y(1:size(Y,1)-1))./(X(2:size(X,1))-X(1:size(X,1)-1)); [M,p,P]=me_nep(X,Y,S)
me_nep2d, me_direct, me_llt, me_pe,
Yves Lucet, University of British Columbia, BC, Canada