Scilab Function
Last update : 22/07/2008

me_direct - [For comparison only] Moreau envelope, direct computation

Calling Sequence

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

Parameters

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.

                                          2
       M(j) = min f(i) + || s(j) - x(i) ||.
               i
                                              2
       p(j) in Argmin f(i) + || s(j) - x(i) ||.
                 i
                                             2
       P(j) = Argmin f(i) + || s(j) - x(i) ||.
                i
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]=me_direct(X,Y,S)

See Also

me_direct2d,  me_llt,  me_nep,  me_pe,  me_brute2d,  

Author

Yves Lucet, University of British Columbia, BC, Canada

Bibliography

Y. Lucet, 2007, Fast Moreau Envelope Computation I: Numerical Algorithms, Numerical Algorithms, 43(3):235-249