<< pl_me_brute_2d pl pl_me_direct_2d >>

CCA (Computational Convex Analysis) >> pl > pl_me_direct

pl_me_direct

[For comparison only] Moreau envelope, direct computation

Calling Sequence

[M,p,P] = pl_me_direct(X,f,S)

Parameters

X

column vector. A grid of points on which the function is sampled.

f

column vector. The value of the function on the grid X: usually f(i)=fu(X(i)) for some function fu.

S

column vector. The grid on which we want to compute the conjugate: f* is evaluated on S.

M

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)

p

selection of the proximal mapping, p(j) is in Argmin(||S(j) - X(i)||^2 + f(i) | over all indexes i)

P

proximal mapping, P(j)=Argmin(||S(j) - X(i)||^2 + f(i) | over all indexes i)

Description

Warning: This function is provided only for comparison purposes and unit testing, use more efficient linear-time algorithms for faster computation.

Compute numerically the discrete Moreau envelope of a set of planar points (X(i),f(i)) at slopes S(j), i.e.

It uses straight computation for a quadratic-time algorithm theta(n*m) with n=length(X)=length(f) and m=length(S).

Examples

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]=pl_me_direct(X,Y,S)

See Also

Authors

Yves Lucet, University of British Columbia, BC, Canada

<< pl_me_brute_2d pl pl_me_direct_2d >>